2011-05-28 73 views
2

當我嘗試使用bjam編譯hello世界的例子時,我總是收到錯誤。在Jamroot中的文件都跑了好了,除了最後一行(當我評論這行,沒有錯誤發生):hello world example中的Boost.python錯誤

run-test hello : hello_ext hello.py ; 

的錯誤是:

capture-output bin/hello.test/gcc-4.5.2/debug/hello 
export: 3: LD_LIBRARY_PATH: bad variable name 

    LD_LIBRARY_PATH=/home/hoangtu/Programs/boost_1_46_1/bin.v2/libs/python/build/gcc-4.5.2/debug:/home/hoangtu/Programs/boost_1_46_1/libs/python/example/tutorial/bin/gcc-4.5.2/debug:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64:$LD_LIBRARY_PATH 
export LD_LIBRARY_PATH 

    PYTHONPATH=bin/gcc-4.5.2/debug 
export PYTHONPATH 
"/usr/bin/python2.7" "hello.py" > "bin/hello.test/gcc-4.5.2/debug/hello.output" 2>&1 
    status=$? 
    echo >> "bin/hello.test/gcc-4.5.2/debug/hello.output" 
    echo EXIT STATUS: $status >> "bin/hello.test/gcc-4.5.2/debug/hello.output" 
    if test $status -eq 0 ; then 
     cp "bin/hello.test/gcc-4.5.2/debug/hello.output" "bin/hello.test/gcc-4.5.2/debug/hello" 
    fi 
    verbose=0 
    if test $status -ne 0 ; then 
     verbose=1 
    fi 
    if test $verbose -eq 1 ; then 
     echo ====== BEGIN OUTPUT ====== 
     cat "bin/hello.test/gcc-4.5.2/debug/hello.output" 
     echo ====== END OUTPUT ====== 
    fi 
    exit $status 

...failed capture-output bin/hello.test/gcc-4.5.2/debug/hello... 
...failed updating 1 target... 
...skipped 1 target... 
+0

您是否嘗試過通過'sh -c bjam'啓動'bjam'來確保它不是一些奇怪的外殼? – Sean 2011-05-28 18:49:59

+0

仍然失敗... – Amumu 2011-05-29 04:39:06

+0

兩個建議:1)在上面包含你的'bjam'調用,2)增加調試級別(如果我記得是-d)。 – Sean 2011-05-29 05:31:08

回答

0

構建Adobe翔升期間我曾遇到過類似的問題圖書館。問題是從ubuntu存儲庫bjam(3.1.16)安裝的版本。從sourceforge(3.1.18)安裝最新的bjam之後,一切都按照它應該的那樣工作。

PS。操作系統是Ubuntu 11.04