Re: [Boost-users] Compiling python extensions examples fail
I had the same issue, trying to compile latest svn trunk of boost. When I bootstrap.sh-ed, it created project-config.jam which had my python configuration in it (I provided --with-python-root=). Now, I also had ~/user-config.jam which had the exact same line ("using python : 2.6 : /home/dan/stackless ;") and bjam wasn't sure which one of those to choose, even though they were identical. The solution for me was to remove the superfluous user-config.jam from my home directory. Sean Snyders wrote:
Hi,
I've compiled Boost 1.39 locally (to a folder '/local1/installs/boost_1_39_0') such that I can try out building python extensions without disrupting the current system setup. I compiled it with gcc 4.3.3 64bit and with python 2.5.2 64bit.
My system details are: Ubuntu 7.04 Linux 2.6.25.18-20081021 x86_64 GNU/Linux
I've setup my jam configs as follows: file: ~/boost-build.jam containing: boost-build /local1/installs/boost_1_39_0/tools/build/v2 ;
file: /local1/installs/boost_1_39_0/tools/build/v2/site_config.jam containing: using gcc : : /vol/apps/gcc-4.3.3_64/bin/g++ ; using python : : /vol/apps/python-2.5.2_64/bin/python ;
I'm trying to compile the python tutorial 'boost_1_39_0/libs/python/example/tutorial' using bjam and get the following errors when running it: ------- error: No best alternative for /python_for_extensions next alternative: required properties: <python>2.5 <target-os>linux matched next alternative: required properties: <python>2.5 <target-os>linux matched /local1/installs/boost_1_39_0/tools/build/v2/build/property.jam:613: in find-replace from module object(property-map)@1 error: Ambiguous key <target-type>PYTHON_EXTENSION .... .. . ------
Here is the full output that is given with the '--debug-configuration' option: ---------------------------------------------- ssnyders@machine:/local1/installs/boost_1_39_0/libs/python/example/tutorial {650} > /local1/ssnyders/boost_1_39_0/bin/bjam --debug-configuration notice: found boost-build.jam at /local1/installs/boost_1_39_0/libs/python/example/boost-build.jam notice: loading Boost.Build from /local1/installs/boost_1_39_0/tools/build/v2 notice: Searching /etc /usr/home/ssnyders /local1/installs/boost_1_39_0/libs/python/example/../../../tools/build/v2 /usr/share/boost-build /local1/installs/boost_1_39_0/tools/build/v2/kernel /local1/installs/boost_1_39_0/tools/build/v2/util /local1/installs/boost_1_39_0/tools/build/v2/build /local1/installs/boost_1_39_0/tools/build/v2/tools /local1/installs/boost_1_39_0/tools/build/v2/contrib /local1/installs/boost_1_39_0/tools/build/v2/. for site-config configuration file site-config.jam . notice: Loading site-config configuration file site-config.jam from /local1/installs/boost_1_39_0/tools/build/v2/site-config.jam . notice: will use '/vol/apps/gcc-4.3.3_64/bin/g++' for gcc, condition <toolset>gcc-4.3.3 notice: using gcc libraries :: <toolset>gcc-4.3.3 :: /vol/apps/gcc-4.3.3_64/bin /vol/apps/gcc-4.3.3_64/lib /vol/apps/gcc-4.3.3_64/lib32 /vol/apps/gcc-4.3.3_64/lib64 notice: using gcc archiver :: <toolset>gcc-4.3.3 :: ar warning: toolset gcc initialization: can not find tool windres warning: initialized from /local1/installs/boost_1_39_0/tools/build/v2/build/project.jam:874 notice: using rc compiler :: <toolset>gcc-4.3.3 :: as notice: [python-cfg] Configuring python... notice: [python-cfg] user-specified cmd-or-prefix: "/vol/apps/python-2.5.2_64/bin/python" notice: [python-cfg] Checking interpreter command "/vol/apps/python-2.5.2_64/bin/python"... notice: [python-cfg] running command '"/vol/apps/python-2.5.2_64/bin/python" -c "from sys import *; print 'version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable)" 2>&1' notice: [python-cfg] ...requested configuration matched! notice: [python-cfg] Details of this Python configuration: notice: [python-cfg] interpreter command: "/vol/apps/python-2.5.2_64/bin/python" notice: [python-cfg] include path: "/vol/apps/python-2.5.2_64/include/python2.5" notice: [python-cfg] library path: "/vol/apps/python-2.5.2_64/lib/python2.5/config" "/vol/apps/python-2.5.2_64/lib" notice: Searching /usr/home/ssnyders /local1/installs/boost_1_39_0/libs/python/example/../../../tools/build/v2 /usr/share/boost-build /local1/installs/boost_1_39_0/tools/build/v2/kernel /local1/installs/boost_1_39_0/tools/build/v2/util /local1/installs/boost_1_39_0/tools/build/v2/build /local1/installs/boost_1_39_0/tools/build/v2/tools /local1/installs/boost_1_39_0/tools/build/v2/contrib /local1/installs/boost_1_39_0/tools/build/v2/. for user-config configuration file user-config.jam . notice: Loading user-config configuration file user-config.jam from /usr/home/ssnyders/user-config.jam . notice: Searching ../../../.. for project-config configuration file project-config.jam . notice: Loading project-config configuration file project-config.jam from ../../../../project-config.jam . notice: [python-cfg] Configuring python... notice: [python-cfg] user-specified version: "2.5" notice: [python-cfg] user-specified cmd-or-prefix: "/vol/apps/python-2.5.2_64" notice: [python-cfg] Checking interpreter command "/vol/apps/python-2.5.2_64/bin/python2.5"... notice: [python-cfg] running command '"/vol/apps/python-2.5.2_64/bin/python2.5" -c "from sys import *; print 'version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable)" 2>&1' notice: [python-cfg] ...requested configuration matched! notice: [python-cfg] Details of this Python configuration: notice: [python-cfg] interpreter command: "/vol/apps/python-2.5.2_64/bin/python2.5" notice: [python-cfg] include path: "/vol/apps/python-2.5.2_64/include/python2.5" notice: [python-cfg] library path: "/vol/apps/python-2.5.2_64/lib/python2.5/config" "/vol/apps/python-2.5.2_64/lib" notice: iostreams: using prebuilt zlib notice: iostreams: using prebuilt bzip2 error: No best alternative for /python_for_extensions next alternative: required properties: <python>2.5 <target-os>linux matched next alternative: required properties: <python>2.5 <target-os>linux matched /local1/installs/boost_1_39_0/tools/build/v2/build/property.jam:613: in find-replace from module object(property-map)@1 error: Ambiguous key <target-type>PYTHON_EXTENSION <asynch-exceptions>off <debug-symbols>on <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>linux <inlining>off <install-dependencies>off <link>shared <main-target-type>PYTHON_EXTENSION <optimization>off <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off
/vol/apps/python-2.5.2_64/bin/python /vol/apps/python-2.5.2_64/bin/python2.5 <python>2.5 <rtti>on <runtime-debugging>on <runtime-link>shared <stdlib>native <suppress-import-lib>true <symlink-location>project-relative <target-os>linux <target>object(file-target)@408 <threadapi>pthread <threading>single toolset-gcc:version4.3.3 <toolset>gcc <user-interface>console <variant>debug <warnings-as-errors>off <warnings>on /local1/installs/boost_1_39_0/tools/build/v2/build/property.jam:590: in object(property-map)@1.find from module object(property-map)@1 /local1/installs/boost_1_39_0/tools/build/v2/build/type.jam:335: in generated-target-ps-real from module type /local1/installs/boost_1_39_0/tools/build/v2/build/type.jam:359: in generated-target-ps from module type /local1/installs/boost_1_39_0/tools/build/v2/build/type.jam:270: in type.generated-target-suffix from module type /local1/installs/boost_1_39_0/tools/build/v2/build/virtual-target.jam:501: in virtual-target.add-prefix-and-suffix from module virtual-target /local1/installs/boost_1_39_0/tools/build/v2/build/virtual-target.jam:460: in _adjust-name from module object(file-target)@408 /local1/installs/boost_1_39_0/tools/build/v2/build/virtual-target.jam:243: in abstract-file-target.__init__ from module object(file-target)@408 /local1/installs/boost_1_39_0/tools/build/v2/build/virtual-target.jam:553: in object(file-target)@408.__init__ from module object(file-target)@408 /local1/installs/boost_1_39_0/tools/build/v2/kernel/class.jam:88: in class.new from module class /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:565: in generator.generated-targets from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/tools/builtin.jam:893: in linking-generator.generated-targets from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/tools/unix.jam:67: in generated-targets from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:462: in construct-result from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:415: in run-really from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:390: in generator.run from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/tools/builtin.jam:808: in linking-generator.run from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/tools/unix.jam:41: in unix-linking-generator.run from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/tools/gcc.jam:506: in object(gcc-linking-generator)@403.run from module object(gcc-linking-generator)@403 /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:1000: in try-one-generator-really from module generators /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:1062: in try-one-generator from module generators /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:1274: in construct-really from module generators /local1/installs/boost_1_39_0/tools/build/v2/build/generators.jam:1346: in generators.construct from module generators /local1/installs/boost_1_39_0/tools/build/v2/build/targets.jam:1437: in construct from module object(typed-target)@77 /local1/installs/boost_1_39_0/tools/build/v2/build/targets.jam:1250: in object(typed-target)@77.generate from module object(typed-target)@77 /local1/installs/boost_1_39_0/tools/build/v2/build/targets.jam:710: in generate-really from module object(main-target)@385 /local1/installs/boost_1_39_0/tools/build/v2/build/targets.jam:682: in object(main-target)@385.generate from module object(main-target)@385 /local1/installs/boost_1_39_0/tools/build/v2/build/targets.jam:258: in object(project-target)@74.generate from module object(project-target)@74 /local1/installs/boost_1_39_0/tools/build/v2/build-system.jam:700: in load from module build-system /local1/installs/boost_1_39_0/libs/python/example/../../../tools/build/v2/kernel/modules.jam:283: in import from module modules /local1/installs/boost_1_39_0/libs/python/example/../../../tools/build/v2/kernel/bootstrap.jam:138: in boost-build from module /local1/installs/boost_1_39_0/libs/python/example/boost-build.jam:7: in module scope from module ----------------------------------------------
-- View this message in context: http://www.nabble.com/Compiling-python-extensions-examples-fail-tp24526932p2... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (1)
-
Dan Sanduleac