Building Boost on Snow Leopard (with Xcode 3.2 installed)

View: New views
8 Messages — Rating Filter:   Alert me  

Building Boost on Snow Leopard (with Xcode 3.2 installed)

by Manfred Schwind :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to build boost 1.40 on Mac OS X 10.6 Snow Leopard (with  
Xcode 3.2 is installed).
This is the command I used to use on Mac OS X 10.5 Leopard and Xcode  
3.1.x:

bjam --prefix=/somepath --layout=versioned toolset=darwin  
architecture=combined address-model=32_64 link=static install

This used to give me great universal binaries (ppc/intel, 32-/64-bit).
But since installing Snow Leopard and Xcode 3.2 it does not build  
anymore. No binaries are created and I get strange compiler errors  
like this:

/usr/include/time.h:77: error: expected constructor, destructor, or  
type conversion before ‘typedef’
/usr/include/time.h:124: error: ‘clock_t’ does not name a type
In file included from /usr/include/c++/4.2.1/cwchar:52,
                  from /usr/include/c++/4.2.1/bits/postypes.h:46,
                  from /usr/include/c++/4.2.1/iosfwd:49,
                  from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
                  from /usr/include/c++/4.2.1/bits/char_traits.h:46,
                  from /usr/include/c++/4.2.1/string:47,
                  from ./boost/program_options/errors.hpp:12,
                  from ./boost/program_options/options_description.hpp:
12,
                  from libs/program_options/src/
options_description.cpp:10:

I _assume_ the problem is gcc 4.2 that was probably installed by Xcode  
3.2. I am also not sure if gcc 4.2 even supports PCC code generation.
So is there a way to switch to gcc 4.0? Or any other solution for the  
problem?
I tried toolset=gcc-4.0 instead of darwin. This resulted in some  
binaries, but they are not universal anymore, as far as I can see.

Any ideas/hints how to successfully build boost on Snow Leopard?

Thank you very much,
Mani
--
http://mani.de - friendly software
iVolume - listen to music freehand
LittleSecrets - the encrypted notepad
Sahara - sand in your pocket
Watchdog - baffle the curious

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by Manfred Schwind :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some corrections to my last post:

The problem is _not_ the PPC code generation and/or the GCC version; I  
was on the wrong track with that.
The problem seems to be with 64-bit code.
The following command works fine to built the 32-bit versions of boost:

bjam --prefix=/somepath --layout=versioned toolset=darwin  
architecture=combined link=static install

I've just removed the address-model=32_64 parameter.
Anyone has an idea why building the 64-bit version fails on Snow  
Leopard?

Regards,
Mani

Am 02.09.2009 um 19:11 schrieb Manfred Schwind:

> Hi,
>
> I'm trying to build boost 1.40 on Mac OS X 10.6 Snow Leopard (with  
> Xcode 3.2 is installed).
> This is the command I used to use on Mac OS X 10.5 Leopard and Xcode  
> 3.1.x:
>
> bjam --prefix=/somepath --layout=versioned toolset=darwin  
> architecture=combined address-model=32_64 link=static install
>
> This used to give me great universal binaries (ppc/intel, 32-/64-bit).
> But since installing Snow Leopard and Xcode 3.2 it does not build  
> anymore. No binaries are created and I get strange compiler errors  
> like this:
>
> /usr/include/time.h:77: error: expected constructor, destructor, or  
> type conversion before ‘typedef’
> /usr/include/time.h:124: error: ‘clock_t’ does not name a type
> In file included from /usr/include/c++/4.2.1/cwchar:52,
>                 from /usr/include/c++/4.2.1/bits/postypes.h:46,
>                 from /usr/include/c++/4.2.1/iosfwd:49,
>                 from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
>                 from /usr/include/c++/4.2.1/bits/char_traits.h:46,
>                 from /usr/include/c++/4.2.1/string:47,
>                 from ./boost/program_options/errors.hpp:12,
>                 from ./boost/program_options/options_description.hpp:
> 12,
>                 from libs/program_options/src/
> options_description.cpp:10:
>
> I _assume_ the problem is gcc 4.2 that was probably installed by  
> Xcode 3.2. I am also not sure if gcc 4.2 even supports PCC code  
> generation.
> So is there a way to switch to gcc 4.0? Or any other solution for  
> the problem?
> I tried toolset=gcc-4.0 instead of darwin. This resulted in some  
> binaries, but they are not universal anymore, as far as I can see.
>
> Any ideas/hints how to successfully build boost on Snow Leopard?
>
> Thank you very much,
> Mani
> --
> http://mani.de - friendly software
> iVolume - listen to music freehand
> LittleSecrets - the encrypted notepad
> Sahara - sand in your pocket
> Watchdog - baffle the curious

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by James C. Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This probably won't help you, but there has been noise on two other  
mailing lists I monitor (CMake being one) that suggest people are  
having similar problems.  It seems that Snow Leopard (and the new GCC  
compiler bundled with it) defaults to 64 bit treatment or something.

If you make any headway, I am sure that many of us would benefit from  
what you learn.  As for me, I am holding off updating (I have the new  
software on my desk) because of these issues...

James

On Sep 2, 2009, at 3:06 PM, Manfred Schwind wrote:

> Some corrections to my last post:
>
> The problem is _not_ the PPC code generation and/or the GCC version;  
> I was on the wrong track with that.
> The problem seems to be with 64-bit code.
> The following command works fine to built the 32-bit versions of  
> boost:
>
> bjam --prefix=/somepath --layout=versioned toolset=darwin  
> architecture=combined link=static install
>
> I've just removed the address-model=32_64 parameter.
> Anyone has an idea why building the 64-bit version fails on Snow  
> Leopard?
>
> Regards,
> Mani
>
> Am 02.09.2009 um 19:11 schrieb Manfred Schwind:
>
>> Hi,
>>
>> I'm trying to build boost 1.40 on Mac OS X 10.6 Snow Leopard (with  
>> Xcode 3.2 is installed).
>> This is the command I used to use on Mac OS X 10.5 Leopard and  
>> Xcode 3.1.x:
>>
>> bjam --prefix=/somepath --layout=versioned toolset=darwin  
>> architecture=combined address-model=32_64 link=static install
>>
>> This used to give me great universal binaries (ppc/intel, 32-/64-
>> bit).
>> But since installing Snow Leopard and Xcode 3.2 it does not build  
>> anymore. No binaries are created and I get strange compiler errors  
>> like this:
>>
>> /usr/include/time.h:77: error: expected constructor, destructor, or  
>> type conversion before ‘typedef’
>> /usr/include/time.h:124: error: ‘clock_t’ does not name a type
>> In file included from /usr/include/c++/4.2.1/cwchar:52,
>>                from /usr/include/c++/4.2.1/bits/postypes.h:46,
>>                from /usr/include/c++/4.2.1/iosfwd:49,
>>                from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
>>                from /usr/include/c++/4.2.1/bits/char_traits.h:46,
>>                from /usr/include/c++/4.2.1/string:47,
>>                from ./boost/program_options/errors.hpp:12,
>>                from ./boost/program_options/options_description.hpp:
>> 12,
>>                from libs/program_options/src/
>> options_description.cpp:10:
>>
>> I _assume_ the problem is gcc 4.2 that was probably installed by  
>> Xcode 3.2. I am also not sure if gcc 4.2 even supports PCC code  
>> generation.
>> So is there a way to switch to gcc 4.0? Or any other solution for  
>> the problem?
>> I tried toolset=gcc-4.0 instead of darwin. This resulted in some  
>> binaries, but they are not universal anymore, as far as I can see.
>>
>> Any ideas/hints how to successfully build boost on Snow Leopard?
>>
>> Thank you very much,
>> Mani
>> --
>> http://mani.de - friendly software
>> iVolume - listen to music freehand
>> LittleSecrets - the encrypted notepad
>> Sahara - sand in your pocket
>> Watchdog - baffle the curious
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@...
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by Christopher Jefferson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 2 Sep 2009, at 23:18, James C. Sutherland wrote:

> This probably won't help you, but there has been noise on two other  
> mailing lists I monitor (CMake being one) that suggest people are  
> having similar problems.  It seems that Snow Leopard (and the new  
> GCC compiler bundled with it) defaults to 64 bit treatment or  
> something.

That is exactly true. If you want to force 32-bit executables, you can  
give the -m32 flag (similarly, there is a -m64 flag for 64-bit).

However, you can't just special-case snow leopard, because there is a  
number of 32-bit intel macs, on which you can install snow leopard,  
which themselves will default to 32-bit executables!

The only (sane) method I've found to solve this is to do one of two  
things.

1) Just use the system setting.
2) Explicitly specify -m32 and -m64 on all systems.

Chris

>
> If you make any headway, I am sure that many of us would benefit  
> from what you learn.  As for me, I am holding off updating (I have  
> the new software on my desk) because of these issues...
>
> James
>
> On Sep 2, 2009, at 3:06 PM, Manfred Schwind wrote:
>
>> Some corrections to my last post:
>>
>> The problem is _not_ the PPC code generation and/or the GCC  
>> version; I was on the wrong track with that.
>> The problem seems to be with 64-bit code.
>> The following command works fine to built the 32-bit versions of  
>> boost:
>>
>> bjam --prefix=/somepath --layout=versioned toolset=darwin  
>> architecture=combined link=static install
>>
>> I've just removed the address-model=32_64 parameter.
>> Anyone has an idea why building the 64-bit version fails on Snow  
>> Leopard?
>>
>> Regards,
>> Mani
>>
>> Am 02.09.2009 um 19:11 schrieb Manfred Schwind:
>>
>>> Hi,
>>>
>>> I'm trying to build boost 1.40 on Mac OS X 10.6 Snow Leopard (with  
>>> Xcode 3.2 is installed).
>>> This is the command I used to use on Mac OS X 10.5 Leopard and  
>>> Xcode 3.1.x:
>>>
>>> bjam --prefix=/somepath --layout=versioned toolset=darwin  
>>> architecture=combined address-model=32_64 link=static install
>>>
>>> This used to give me great universal binaries (ppc/intel, 32-/64-
>>> bit).
>>> But since installing Snow Leopard and Xcode 3.2 it does not build  
>>> anymore. No binaries are created and I get strange compiler errors  
>>> like this:
>>>
>>> /usr/include/time.h:77: error: expected constructor, destructor,  
>>> or type conversion before ‘typedef’
>>> /usr/include/time.h:124: error: ‘clock_t’ does not name a type
>>> In file included from /usr/include/c++/4.2.1/cwchar:52,
>>>               from /usr/include/c++/4.2.1/bits/postypes.h:46,
>>>               from /usr/include/c++/4.2.1/iosfwd:49,
>>>               from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
>>>               from /usr/include/c++/4.2.1/bits/char_traits.h:46,
>>>               from /usr/include/c++/4.2.1/string:47,
>>>               from ./boost/program_options/errors.hpp:12,
>>>               from ./boost/program_options/options_description.hpp:
>>> 12,
>>>               from libs/program_options/src/
>>> options_description.cpp:10:
>>>
>>> I _assume_ the problem is gcc 4.2 that was probably installed by  
>>> Xcode 3.2. I am also not sure if gcc 4.2 even supports PCC code  
>>> generation.
>>> So is there a way to switch to gcc 4.0? Or any other solution for  
>>> the problem?
>>> I tried toolset=gcc-4.0 instead of darwin. This resulted in some  
>>> binaries, but they are not universal anymore, as far as I can see.
>>>
>>> Any ideas/hints how to successfully build boost on Snow Leopard?
>>>
>>> Thank you very much,
>>> Mani
>>> --
>>> http://mani.de - friendly software
>>> iVolume - listen to music freehand
>>> LittleSecrets - the encrypted notepad
>>> Sahara - sand in your pocket
>>> Watchdog - baffle the curious
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users@...
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@...
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by Vladimir Prus-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christopher Jefferson wrote:

>
> On 2 Sep 2009, at 23:18, James C. Sutherland wrote:
>
>> This probably won't help you, but there has been noise on two other
>> mailing lists I monitor (CMake being one) that suggest people are
>> having similar problems.  It seems that Snow Leopard (and the new
>> GCC compiler bundled with it) defaults to 64 bit treatment or
>> something.
>
> That is exactly true. If you want to force 32-bit executables, you can
> give the -m32 flag (similarly, there is a -m64 flag for 64-bit).
>
> However, you can't just special-case snow leopard, because there is a
> number of 32-bit intel macs, on which you can install snow leopard,
> which themselves will default to 32-bit executables!
>
> The only (sane) method I've found to solve this is to do one of two
> things.
>
> 1) Just use the system setting.
> 2) Explicitly specify -m32 and -m64 on all systems.

Just to clarify, what is the reason of the original error, quoted below?

>>>> /usr/include/time.h:77: error: expected constructor, destructor,
>>>> or type conversion before ‘typedef’
>>>> /usr/include/time.h:124: error: ‘clock_t’ does not name a type
>>>> In file included from /usr/include/c++/4.2.1/cwchar:52,
>>>>               from /usr/include/c++/4.2.1/bits/postypes.h:46,
>>>>               from /usr/include/c++/4.2.1/iosfwd:49,
>>>>               from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
>>>>               from /usr/include/c++/4.2.1/bits/char_traits.h:46,
>>>>               from /usr/include/c++/4.2.1/string:47,
>>>>               from ./boost/program_options/errors.hpp:12,
>>>>               from ./boost/program_options/options_description.hpp:
>>>> 12,
>>>>               from libs/program_options/src/
>>>> options_description.cpp:10:

Is  32_64 fat compilation just broken?

- Volodya



_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by Hassan Syed :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On a side::note could you tell us what the autocomplete for boost is like under xcode (once you solve the problem :D ) for boost once you have it working.

On Thu, Sep 3, 2009 at 10:36 AM, Vladimir Prus <vladimir@...> wrote:
Christopher Jefferson wrote:

>
> On 2 Sep 2009, at 23:18, James C. Sutherland wrote:
>
>> This probably won't help you, but there has been noise on two other
>> mailing lists I monitor (CMake being one) that suggest people are
>> having similar problems.  It seems that Snow Leopard (and the new
>> GCC compiler bundled with it) defaults to 64 bit treatment or
>> something.
>
> That is exactly true. If you want to force 32-bit executables, you can
> give the -m32 flag (similarly, there is a -m64 flag for 64-bit).
>
> However, you can't just special-case snow leopard, because there is a
> number of 32-bit intel macs, on which you can install snow leopard,
> which themselves will default to 32-bit executables!
>
> The only (sane) method I've found to solve this is to do one of two
> things.
>
> 1) Just use the system setting.
> 2) Explicitly specify -m32 and -m64 on all systems.

Just to clarify, what is the reason of the original error, quoted below?

>>>> /usr/include/time.h:77: error: expected constructor, destructor,
>>>> or type conversion before ‘typedef’
>>>> /usr/include/time.h:124: error: ‘clock_t’ does not name a type
>>>> In file included from /usr/include/c++/4.2.1/cwchar:52,
>>>>               from /usr/include/c++/4.2.1/bits/postypes.h:46,
>>>>               from /usr/include/c++/4.2.1/iosfwd:49,
>>>>               from /usr/include/c++/4.2.1/bits/stl_algobase.h:70,
>>>>               from /usr/include/c++/4.2.1/bits/char_traits.h:46,
>>>>               from /usr/include/c++/4.2.1/string:47,
>>>>               from ./boost/program_options/errors.hpp:12,
>>>>               from ./boost/program_options/options_description.hpp:
>>>> 12,
>>>>               from libs/program_options/src/
>>>> options_description.cpp:10:

Is  32_64 fat compilation just broken?

- Volodya



_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users


_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by g-h-d :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> The only (sane) method I've found to solve this is to do one of two things.
>
> 1) Just use the system setting.


I'm trying to link to the serialization library. I followed the "Easy
Build and install" procedure for building the binaries which did not
report any error. Has anyone else experienced a runtime linking problem
such as described here

http://archives.free.net.ph/thread/20091107.023607.62fab880.en.html

with Snow Leopard?

Thanks.

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Re: Building Boost on Snow Leopard (with Xcode 3.2 installed)

by g-h-d :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


No longer an issue.

_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users