Opened 18 years ago

Closed 18 years ago

#2110 closed defect (fixed)

LPRng does not compile with recent make/gcc

Reported by: Moody Owned by: djensen@…
Priority: normal Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

i found a problem compiling lprng with make version 3.81 and gcc-4.1.1

First, make crashes on the main Makefile with an error msg like in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=356048. I solved it with a sed

sed -i "s/^SHELL=/#&/" Makefile

after configure.

Second, a compile error message "./common/lpq.c:452: warning: not enough variable arguments to fit a sentinel" which caused compile stop. I removed the -Werror switch using a

sed -i "s;-Werror ; ;g" src/Makefile

after the configure but i don't know whether this would be the prefered solution. With this two seds, LPRng-3.8.28 compiles/installs fine.

Attachments (3)

LPRng-3.8.28-make-1.patch (810 bytes ) - added by djensen@… 18 years ago.
printargs.c (277 bytes ) - added by djensen@… 18 years ago.
testexec.c (233 bytes ) - added by djensen@… 18 years ago.

Download all attachments as: .zip

Change History (9)

by djensen@…, 18 years ago

Attachment: LPRng-3.8.28-make-1.patch added

comment:1 by djensen@…, 18 years ago

I attached a patch taken from debian for the make. I have no problem with make here, someone verify it works!

The Werror can be fixed with a sed: sed -i 's:CLEAR,0:CLEAR,CLEAR,NULL:' src/common/lpq.c

Some feedback desired.

comment:2 by djensen@…, 18 years ago

Instead of the make patch, a sed could be used:

sed -i '127,129 s/ [
]/;&/' Makefile.in

Line indexing is hard to maintain, but keeps it short. Maybe it's educational, I learned something.

comment:3 by dnicholson@…, 18 years ago

Another possibility that doesn't make use of line indexing:

sed -i.bak 's/\(fi\|done\)
/\1;
/' Makefile.in

For my own education, could you explain the CLEAR sed? Why is execl() supposed to be called this way?

Another option would be --disable-werror, but fixing it is better, IMO.

by djensen@…, 18 years ago

Attachment: printargs.c added

comment:4 by djensen@…, 18 years ago

I'll have to test your sed.

Attached 2 c progs to show that execl is misused.

./printargs should show bash correctly passes the invocation string.

./testargs should show as used excl will not.

by djensen@…, 18 years ago

Attachment: testexec.c added

comment:5 by djensen@…, 18 years ago

Owner: changed from blfs-book@… to djensen@…
Status: newassigned

comment:6 by djensen@…, 18 years ago

Resolution: fixed
Status: assignedclosed

Added Makefile.in and lpq.c seds.

Note: See TracTickets for help on using tickets.