Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#45258 closed defect (fixed)

CSSC @1.4.0 does not build: #error "Please include config.h first."

Reported by: ryandesign (Ryan Schmidt) Owned by: ryandesign (Ryan 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 Schmidt) 3 years ago.
patch-config.h.diff (16.8 KB) - added by ryandesign (Ryan Schmidt) 3 years ago.

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by ryandesign (Ryan Schmidt)

Changed 3 years ago by ryandesign (Ryan Schmidt)

comment:1 Changed 3 years ago by ryandesign (Ryan 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 3 years ago by ryandesign (Ryan Schmidt)

  • Resolution set to fixed
  • Status changed from new to 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.

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

  • Cc egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.