Bug 2302 - bitbake (recipe boost_1.44.b) gets confused with ~/user-config.jam
Summary: bitbake (recipe boost_1.44.b) gets confused with ~/user-config.jam
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.1
Hardware: All Multiple
: Medium normal
Target Milestone: 1.3
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-04-16 07:29 UTC by Johannes König
Modified: 2012-04-26 11:49 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes König 2012-04-16 07:29:23 UTC
It seems that bitbake (or more precisely the boost_1.44.0.bb recipe) gets
confused with an user-config.jam file in the users home directory.

When trying to build core-image-sato (or zypper) the build aborts due to
an error in the zypper package. I use poky-edison-6.0.1.tar.gz.

Relevant part of the do_compile.log:

build/tmp/sysroots/x86_64-linux/usr/libexec/core2-poky-linux/gcc/i586-poky-linux/4.6.3/ld: skipping incompatible build/tmp/sysroots/crownbay/usr/lib/libboost_signals-mt.so when searching for -lboost_signals-mt build/tmp/sysroots/x86_64-linux/usr/libexec/core2-poky-linux/gcc/i586-poky-linux/4.6.3/ld: skipping incompatible build/tmp/sysroots/crownbay/usr/lib/libboost_signals-mt.a when searching for -lboost_signals-mt build/tmp/sysroots/x86_64-linux/usr/libexec/core2-poky-linux/gcc/i586-poky-linux/4.6.3/ld: skipping incompatible build/tmp/sysroots/crownbay/usr/lib/libboost_signals-mt.so when searching for -lboost_signals-mt build/tmp/sysroots/x86_64-linux/usr/libexec/core2-poky-linux/gcc/i586-poky-linux/4.6.3/ld: skipping incompatible build/tmp/sysroots/crownbay/usr/lib/libboost_signals-mt.a when searching for -lboost_signals-mt build/tmp/sysroots/x86_64-linux/usr/libexec/core2-poky-linux/gcc/i586-poky-linux/4.6.3/ld: cannot find -lboost_signals-mt 
collect2: ld returned 1 exit status
make[2]: *** [zypp/libzypp.so.810.1.0] Error 1
make[2]: Leaving directory `build/tmp/work/crownbay-poky-linux/libzypp-0.0-git1+15b6c52260bbc52b3d8e585e271b67e10cc7c433-r16/git' 
make[1]: *** [zypp/CMakeFiles/zypp.dir/all] Error 2
make[1]: Leaving directory `build/tmp/work/crownbay-poky-linux/libzypp-0.0-git1+15b6c52260bbc52b3d8e585e271b67e10cc7c433-r16/git' 
make: *** [all] Error 2
ERROR: oe_runmake failed
ERROR: Function 'do_compile' failed (see build/tmp/work/crownbay-poky-linux/libzypp-0.0-git1+15b6c52260bbc52b3d8e585e271b67e10cc7c433-r16/temp/log.do_compile.31334 for further information) 

After removing the ~/user-config.jam file and recompiling zypper with

    bitbake -c cleanall libzypp boost zypper && bitbake zypper

no more errors are reported.

Content of the ~/user-config.jam file is:

  using gcc ;

(Usually I have more options in my user-config.jam, but I can strip it
down to the single line above to reproduce the error.)


The problems seems to be in the invocation of bjam (the Boost.Build tool) in file meta/recipes-support/boost/boost-36.inc 

The recipe creates a user-config.jam (file boost-36.inc, function do_boostconfig) named ${S}/tools/build/v2/user-config.jam to define the cross compiler which shall be used by bjam in the do_compile step. But [1] states, that bjam looks for a user-config.jam first in $HOME and then in $BOOST_BUILD_PATH. It seems that the user-config.jam in $HOME is used instead of the one in ${S}/tools/build/v2/ (aka $BOOST_BUILD_PATH).

Maybe it is a option to set the --ignore-config argument when invoking bjam and define the compiler property as an argument (see [2]). 

[1] http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html
[2] http://www.boost.org/boost-build2/doc/html/bbv2/overview/invocation.html

See also the discussion on the ML: http://www.mail-archive.com/yocto@yoctoproject.org/msg05708.html
Comment 1 Saul Wold 2012-04-20 21:03:37 UTC
I found an obscure variable: BOOST_BUILD_USER_CONFIG, which I set to 
BOOST_BUILD_USER_CONFIG=${S}/tools/build/v2/user-config.jam.

The --ignore-config ignores all configs!

That seems to have done the trick, I will push a patch for this soon