#45258 closed defect (fixed)
CSSC @1.4.0 does not build: #error "Please include config.h first."
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.1 |
Keywords: | snowleopard | Cc: | RJVB (René Bertin), cooljeanius (Eric Gallager) |
Port: | CSSC |
Description
René J.V. Bertin reported on the mailing list that CSSC @1.4.0 does not build on Snow Leopard:
:info:build In file included from /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/os_defines.h:61, :info:build from /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h:41, :info:build from /usr/include/c++/4.2.1/cstdio:50, :info:build from bodyio.h:26, :info:build from bodyio.cc:26: :info:build ../gl/lib/unistd.h:135:3: error: #error "Please include config.h first."
I am able to reproduce this issue on Snow Leopard with gcc 4.2.1, but it builds fine on later versions of OS X with clang. The problem may be specific to older versions of GCC. It was also reported to the developers by someone using GCC 4.4.7 on Linux. I am not able to reproduce it with GCC 4.8.3 on OS X 10.10 beta.
The problem seems to be that the project provides a wrapper around the system header unistd.h, which requires that the project-specific file config.h first be included, but this is not being done in every instance.
The developers provided a patch. The patch did not apply cleanly to the 1.4.0 sources (in the portion targeting the file file.cc). After fixing that, the build still failed with a similar error, this time in version.cc. version.cc does not include unistd.h, but it includes another system header, stdio.h. Perhaps stdio.h or one of the files it eventually includes includes unistd.h.
Attachments (2)
Change History (5)
Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | patch-config.h.diff added |
---|
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Running autoreconf didn't help, but just making a similar change in version.cc seems to be all that was still needed. Committed in r126199.
I just realized some of the file being patched are autotools files, so I should be running autoreconf. I'll try that later.