Boost logo

Boost :

From: Patrick Hartling (patrick_at_[hidden])
Date: 2005-05-08 10:00:23

Rene Rivera wrote:
> Patrick Hartling wrote:
>> I haven't seen any posts about this, so please pardon me if I have missed
>> it, but Boost does not currently build on Mac OS X Tiger with the
>> 'darwin'
>> toolset because the option -fcoalesce-templates has been removed from the
>> Apple build of GCC 4.0. I have made simple modifications to my
>> checked out
>> copy of the latest Boost source to allow the libraries I need to
>> build, but
>> my changes would break the usability of Boost libraries on previous
>> versions
>> of OS X that need -fcoalesce-templates. I would be happy to submit a
>> patch
>> and run any tests if someone could suggest how I would go about modifying
>> boost/tools/build/v1/darwin-tools.jam in a backwards compatible
>> manner. Thanks.
> You can test the $(JAMUNAME) variable to see which OS, machine, version,
> etc. you are on. It mirrors the output of "uname", so the third item
> tells you the darwin kernel version. For me, on 10.2, it has: "Darwin"
> "six" "6.8" <long descriptive string> "Power Macintosh". To test it you
> would do something like:
> if $(JAMUNAME[3]) == "6.8"
> {
> ...
> }
> HTH.

It did help. I have attached a patch that I think should do the job. I
have also attached error output from building the Boost source from the
anonymous CVS repository as of about an hour ago. The majority of the
errors come from the iostreams library. I cannot get it to build on Fedora
Core 3 using GCC 3.4.3 either, so I may be doing something wrong. The
errors from the two platforms are not exactly the same, and I cannot say for
sure at this time why I cannot get it to build.

The error that is disappointing to me is an internal compiler error when
trying to compile an optimized version of one of the Boost.Python .cpp files
(boost/libs/python/src/object/function.cpp to be specific). The only way I
can get it to compile is to change the speed optimization setting from -O3
to -O0. I have submitted a bug report to Apple. My hope with that is that
it's a bug in the GCC 4.0 pre-release snapshot used for OS X Tiger that will
be fixed in Mac OS X 10.4.1.

On the upside, I can compile the boost_wserialization library with GCC 4.0
on OS X Tiger. GCC 3.3 in OS X Panther used to get stuck indefinitely on
the file boost/libs/serialization/src/xml_grammar.cpp when building the
optimized version of boost_wserialization, but that doesn't happen with GCC 4.0.


Patrick L. Hartling                    | VP Engineering, Infiscape Corp.
PGP:          |

Index: darwin-tools.jam
RCS file: /cvsroot/boost/boost/tools/build/v1/darwin-tools.jam,v
retrieving revision 1.19
diff -u -r1.19 darwin-tools.jam
--- darwin-tools.jam 22 Apr 2005 02:59:51 -0000 1.19
+++ darwin-tools.jam 8 May 2005 14:41:57 -0000
@@ -97,7 +97,10 @@
     flags darwin CFLAGS : -Wno-long-double -no-cpp-precomp ;
-if ! [ MATCH "(g[+][+])" : $(.GXX) ]
+# GCC 4.0, the default compiler in Darwin 8.0.0, does not have
+# -fcoalesce-templates. GCC 3.3 needs it.
+if ! [ MATCH "(g[+][+])" : $(.GXX) ] && $(JAMUNAME[3]) < "8.0.0" ||
+ [ MATCH "(g[+][+]-3.3)" : $(.GXX) ]
     flags darwin C++FLAGS : -fcoalesce-templates ;

Boost list run by bdawes at, gregod at, cpdaniel at, john at