Bug 108953 - libcdio port not robust wrt. C_INCLUDE_PATH
Summary: libcdio port not robust wrt. C_INCLUDE_PATH
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Michael Landin
Depends on:
Reported: 2007-02-08 23:50 UTC by Tuure Laurinolli
Modified: 2007-03-12 14:20 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Tuure Laurinolli 2007-02-08 23:50:14 UTC
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:


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.
How-To-Repeat: Running 'sudo make build' in the port directory repeats the problem.
Comment 1 Edwin Groothuis freebsd_committer 2007-02-09 00:04:04 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mich

Over to maintainer
Comment 2 dfilter service freebsd_committer 2007-03-12 14:19:44 UTC
mich        2007-03-12 14:19:39 UTC

  FreeBSD ports repository

  Added files:
    sysutils/libcdio/files patch-src_cd-drive.c 
  - Use "getopt.h" , not <getopt.h>
      (Also fixed upstream)
  PR:             ports/108953
  Submitted by:   Tuure Laurinolli <tuure@laurinolli.net>
  Revision  Changes    Path
  1.1       +14 -0     ports/sysutils/libcdio/files/patch-src_cd-drive.c (new)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Michael Landin freebsd_committer 2007-03-12 14:20:13 UTC
State Changed
From-To: open->closed

Patch committed