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

MacPorts noreply at macports.org
Sat Oct 4 19:12:21 PDT 2014


#45258: CSSC @1.4.0 does not build: #error "Please include config.h first."
--------------------------+--------------------------
 Reporter:  ryandesign@…  |      Owner:  ryandesign@…
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.3.1
 Keywords:  snowleopard   |       Port:  CSSC
--------------------------+--------------------------
 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
 [http://lists.gnu.org/archive/html/bug-cssc/2014-08/msg00003.html 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 [http://lists.gnu.org/archive/html/bug-
 cssc/2014-09/msg00003.html provided]
 [http://git.savannah.gnu.org/cgit/cssc.git/commit/?id=9737f41b5d2a49e61061e9f896b5a9ae19e3a3ac
 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/45258>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list