ports/108953: libcdio port not robust wrt. C_INCLUDE_PATH
Tuure Laurinolli
tuure at laurinolli.net
Thu Feb 8 23:50:15 UTC 2007
>Number: 108953
>Category: ports
>Synopsis: libcdio port not robust wrt. C_INCLUDE_PATH
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Feb 08 23:50:14 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Tuure Laurinolli
>Release: 6.1-RC
>Organization:
>Environment:
FreeBSD vortex.home.lan 6.1-RC FreeBSD 6.1-RC #0: Fri Apr 14 22:32:04 EEST 2006 root at vortex.home.lan:/usr/obj/usr/src/sys/VORTEX2 i386
>Description:
When trying to install libcdio with "sudo make build", build fails with :
..
if cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib/driver -I../include/ -I/usr/local/include -O2 -pipe -march=pentium3 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -MT cd-info.o -MD -MP -MF ".deps/cd-info.Tpo" -c -o cd-info.o cd-info.c; \
then mv -f ".deps/cd-info.Tpo" ".deps/cd-info.Po"; else rm -f ".deps/cd-info.Tpo"; exit 1; fi
In file included from cd-info.c:29:
getopt.h:82: error: redefinition of `struct option'
gmake[3]: *** [cd-info.o] Error 1
gmake[3]: Leaving directory `/usr/ports/sysutils/libcdio/work/libcdio-0.77/src'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/sysutils/libcdio/work/libcdio-0.77/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/sysutils/libcdio/work/libcdio-0.77'
gmake: *** [all] Error 2
*** Error code 2
Apparently this is because '/usr/include' leaks into include path from my C_INCLUDE_PATH, and some files in libcdio do #include <getopt.h> instead of #include "getopt.h".
My C_INCLUDE_PATH setting in .zshrc is:
C_INCLUDE_PATH=/usr/include:/usr/local/include:/usr/X11R6/include:$C_INCLUDE_PATH
>How-To-Repeat:
Running 'sudo make build' in the port directory repeats the problem.
>Fix:
Setting C_INCLUDE_PATH="" on the build command line enables completion of the build, but a real fix would be cleaning up C_INCLUDE_PATH in the Makefile, I think.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list