On Mon, Aug 19, 2013 at 4:19 PM, Bioxydyn Dev <bioxydyn.dev@gmail.com> wrote:

Hi,

I'm trying to build boost 1.54 on OSX 10.8.4. I'm a newbie at building on OSX and also at building custom boost binaries.

I followed the instructions at http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html up to and including section 4. I then installed boost build as described in section 5.2.1.

To keep things simple I thought I'd just build the thread library for now as follows:

/usr/local/bin/boost-build/bin/b2 install --prefix=~/development/cots/boost/ --build-dir=/tmp/build-boost stage --with-thread toolset=gcc-4.5 variant=debug --layout=versioned --build-type=complete -q

and I get the output shown below. If I omit the q option to allow the build to proceed it builds a number of .a files. 

I have installed gcc-4.5 on my Mac. 

What is causing the error  'ld: unknown option: -h' and do I need to worry about the dylib files that the build is trying to create. A google search indicates that these are Xcode dynamic library files. I'm not sure if I need these or not as I'm confused about why .so files weren't created. 

Can anyone please help?

Regards

Joe  


Component configuration:

    - atomic                   : not building
    - chrono                   : not building
    - context                  : not building
    - coroutine                : not building
    - date_time                : not building
    - exception                : not building
    - filesystem               : not building
    - graph                    : not building
    - graph_parallel           : not building
    - iostreams                : not building
    - locale                   : not building
    - log                      : not building
    - math                     : not building
    - mpi                      : not building
    - program_options          : not building
    - python                   : not building
    - random                   : not building
    - regex                    : not building
    - serialization            : not building
    - signals                  : not building
    - system                   : not building
    - test                     : not building
    - thread                   : building
    - timer                    : not building
    - wave                     : not building

...patience...
...patience...
...found 21638 targets...
...updating 10650 targets...
common.mkdir ~
common.mkdir ~/development
common.mkdir ~/development/cots
common.mkdir ~/development/cots/boost
common.mkdir ~/development/cots/boost/lib
common.mkdir /tmp/build-boost
common.mkdir /tmp/build-boost/boost
common.mkdir /tmp/build-boost/boost/bin.v2
common.mkdir /tmp/build-boost/boost/bin.v2/libs
common.mkdir /tmp/build-boost/boost/bin.v2/libs/system
common.mkdir /tmp/build-boost/boost/bin.v2/libs/system/build
common.mkdir /tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5
common.mkdir /tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug
common.mkdir /tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug/threading-multi
gcc.compile.c++ /tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug/threading-multi/error_code.o
gcc.link.dll /tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug/threading-multi/libboost_system-gcc45-mt-d-1_54.dylib
ld: unknown option: -h
collect2: ld returned 1 exit status

    "g++-4.5"    -o "/tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug/threading-multi/libboost_system-gcc45-mt-d-1_54.dylib" -Wl,-h -Wl,libboost_system-gcc45-mt-d-1_54.dylib -shared -Wl,--start-group "/tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug/threading-multi/error_code.o"  -Wl,-Bstatic  -Wl,-Bdynamic  -Wl,--end-group -g 

...failed gcc.link.dll /tmp/build-boost/boost/bin.v2/libs/system/build/gcc-4.5/debug/threading-multi/libboost_system-gcc45-mt-d-1_54.dylib...
...failed updating 1 target...
...updated 15 targets...


Some more information:

notice: Loading user-config configuration file 'user-config.jam' from '/Users/joe/development/cots/boost/tools/build/v2'.
notice: [cmdline-cfg] toolset gcc-4.5 not previously configured; attempting to auto-configure now
notice: will use 'g++-4.5' for gcc, condition <toolset>gcc-4.5
notice: using gcc libraries :: <toolset>gcc-4.5 :: /usr/local/bin /usr/local/lib /usr/local/lib32 /usr/local/lib64
notice: using gcc archiver :: <toolset>gcc-4.5 :: ar
notice: using gcc ranlib :: <toolset>gcc-4.5 :: ranlib
warning: toolset gcc initialization: can not find tool windres
warning: initialized from
notice: using rc compiler :: <toolset>gcc-4.5 :: as

Are these warnings significant?

I've been trying to figure this out for two days now without success. All I want to do is build boost using a version of FSF gcc that I've installed on my mac (not the (darwin) one that came pre-installed). Can it really be so difficult?

If I select toolset=darwin as suggested by Steven it does build the shared lib successfully using 'g++' for darwin, condition <toolset>darwin-4.2.1. This is not what I want.

Regards

Joe