Opened 9 years ago

Last modified 9 years ago

#8592 new Bugs

Cross compiling on OS X to linux gets the shared object name wrong

Reported by: per@… Owned by:
Milestone: To Be Determined Component: Building Boost
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

I'm compiling boost for openwrt on my OS X machine, but it fails near the end, because the shared libraries produced are given the extension .dylib instead of .so. It also affect SONAME inside the lib, which stops me from just renaming them.

I'm not really sure what the best way of reproduceing is, short of compiling openwrt:

svn co svn://svn.openwrt.org/openwrt/tags/attitude_adjustment_12.09
cd attitude_adjustment_12.09
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
(enable boost_system in libraries)
make V=s

Here's the command used to build boost if that helps:

( cd /Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0 ; echo "using gcc : mipsel : mipsel-openwrt-linux-gcc : <compileflags>\"-Os -pipe -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float\" <cxxflags>\"-Os -pipe -mips32 -mtune=mips32 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float\" <linkflags>\"-L/Volumes/data/Unix/openwrt/wl500gp/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib -L/Volumes/data/Unix/openwrt/wl500gp/staging_dir/target-mipsel_uClibc-0.9.33.2/lib -L/Volumes/data/Unix/openwrt/wl500gp/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/usr/lib -L/Volumes/data/Unix/openwrt/wl500gp/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.33.2/lib -pthread -lrt\" ;" > tools/build/v2/user-config.jam ; bjam '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' --toolset=gcc-mipsel --build-type=minimal --layout=system --disable-long-double --target=mipsel-openwrt-linux --host=mipsel-openwrt-linux --build=x86_64-apple-darwin12.3.0 --program-prefix="" --program-suffix="" --prefix=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install --exec-prefix=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install --bindir=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install/bin --sbindir=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install/sbin --libexecdir=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install/lib --sysconfdir=/etc --datadir=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install/share --localstatedir=/var --mandir=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install/man --infodir=/Volumes/data/Unix/openwrt/wl500gp/build_dir/target-mipsel_uClibc-0.9.33.2/boost_1_49_0/ipkg-install/info --disable-nls --without-chrono --without-date_time --without-exception --without-filesystem --without-graph --without-graph_parallel --without-locale --without-math --without-mpi --without-python --without-random --without-regex --without-serialization --without-signals --without-test --without-thread --without-timer --without-wave -sNO_BZIP2=1 -sZLIB_INCLUDE=/Volumes/data/Unix/openwrt/wl500gp/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/include -sZLIB_LIBPATH=/Volumes/data/Unix/openwrt/wl500gp/staging_dir/target-mipsel_uClibc-0.9.33.2/usr/lib install )

Change History (3)

comment:1 by anonymous, 9 years ago

Also reported at openwrt bug 13548 (not sure why I reported here first).

in reply to:  1 comment:2 by viboes, 9 years ago

Replying to anonymous:

Also reported at openwrt bug 13548 (not sure why I reported here first).

So, can we close it?

comment:3 by anonymous, 9 years ago

Had the same issue with 1_47_0 on Mac. Fixed by adding target-os=linux to the ./b2 --toolset option.

Index: Makefile
===================================================================
--- Makefile	(revision 36978)
+++ Makefile	(working copy)
@@ -194,7 +194,7 @@
 		bjam \
 			'-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
 			$(filter -j%,$(PKG_JOBS)) \
-			--toolset=gcc-$(ARCH) --build-type=minimal --layout=system \
+			--toolset=gcc-$(ARCH) target-os=linux --build-type=minimal --layout=system \
 			--disable-long-double \
 			$(CONFIGURE_ARGS) \
 			$(if $(CONFIG_PACKAGE_boost-chrono),,--without-chrono) \
Note: See TracTickets for help on using tickets.