|
Boost Users : |
From: Ole Christian Weidner (oweidner_at_[hidden])
Date: 2007-08-22 15:40:54
Aloha,
I just tried to build Boost 1.34.1 fat (a.k.a. Universal) libraries
for MacOS X. This is what happened:
I created the following ~/user-config.jam file in order to build
Universal libs:
using darwin
: # version
: # command not specified ? use default
: # options
<compileflags>"-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
arch i386 -arch ppc"
<linkflags>"-arch i386 -arch ppc"
;
As described in http://www.boost.org/more/getting_started/unix-
variants.html 5.1 "Easy Build and Install" I tried to fire up the
build system like this:
macpro01:/Volumes/Macintosh HD 2/boost_1_34_1 $ ./configure --prefix=/
usr/local/
Building Boost.Jam with toolset darwin... ./configure: line 198: cd: /
Volumes/Macintosh: No such file or directory
./configure: line 1: cd: ./tools/jam/src: No such file or directory
tools/jam/src//bjam
Detecting Python version... 2.5
Detecting Python root... /sw
Unicode/ICU support for Boost.Regex?... not found.
Backing up existing Boost.Build configuration in user-config.jam.2
Generating Boost.Build configuration in user-config.jam...
Generating Makefile...
It seems that configure has a problem with "Macintosh HD 2" as a
directory name...
$ make
make: *** No targets specified and no makefile found. Stop.
WHATEVER - there's still the 5.2 "custom" way to build the boost libs:
$ cd ~/boost_1_34_1/tools/jam/src
$ ./build.sh
$ cp bin.macosxx86/bjam ../../../
$ cd ~/boost_1_34_1/
$ ./bjam --prefix=/usr/local
$ sudo ./bjam install
... 1 hour later everything _seems_ to be fine:
$ file /usr/local/lib/libboost_filesystem-1_34_1.dylib
/usr/local/lib/libboost_filesystem-1_34_1.dylib: Mach-O universal
binary with 2 architectures
/usr/local/lib/libboost_filesystem-1_34_1.dylib (for architecture
i386): Mach-O dynamically linked shared library i386
/usr/local/lib/libboost_filesystem-1_34_1.dylib (for architecture
ppc): Mach-O dynamically linked shared library ppc
That's exactly what I wanted. But... THIS is really strange (test.cpp
is the regex example from the install manual):
$ g++ test.cpp -I/usr/local/include/boost-1_34_1/ -L/usr/local/lib/ -
lboost_regex-mt-d-1_34_1
$ ./a.out
dyld: Library not loaded: /var/tmp//ccMlDtbZ.out
Referenced from: /Volumes/Macintosh HD 2/./a.out
Reason: image not found
Trace/BPT trap
WHAT? I _never_ referenced a library called /var/tmp//ccMlDtbZ.out.
What's going on here?
Any help is GREATLY appreciated!
Thanks,
Ole
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net