Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

cssc.diff (462 bytes) - added by ryandesign (Ryan Carsten Schmidt) 10 years ago.
patch-config.h.diff (16.8 KB) - added by ryandesign (Ryan Carsten Schmidt) 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: cssc.diff added

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)

I just realized some of the file being patched are autotools files, so I should be running autoreconf. I'll try that later.

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

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.

comment:3 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.