Opened 19 years ago
Closed 19 years ago
#2110 closed defect (fixed)
LPRng does not compile with recent make/gcc
Reported by: | Moody | Owned by: | |
---|---|---|---|
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.
Change History (9)
by , 19 years ago
Attachment: | LPRng-3.8.28-make-1.patch added |
---|
comment:1 by , 19 years ago
comment:2 by , 19 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 , 19 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 , 19 years ago
Attachment: | printargs.c added |
---|
comment:4 by , 19 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 , 19 years ago
Attachment: | testexec.c added |
---|
comment:5 by , 19 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:6 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Added Makefile.in and lpq.c seds.
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.