我在运行Ubuntu 13.10。我安装了libbost1.54-dev。
我做了一个Git检查Boost,并做了一个检查"boost-1.54.0“。
我在源代码中更改了目录,以促进/libs/python/示例/教程。
我跑了"bjam“。我得到:
$ bjam
Unable to load Boost.Build: could not find build system.
---------------------------------------------------------
/home/dustin/build/boost/libs/python/example/boost-build.jam attempted to load the build system by invoking
'boost-build ../../../tools/build/v2 ;'
but we were unable to find "bootstrap.jam" in the specified directory
or in BOOST_BUILD_PATH (searching /home/dustin/build/boost/libs/python/example/../../../tools/build/v2, /usr/share/boost-build).
Please consult the documentation at 'http://www.boost.org'.示例目录中只有三个文件:
-rw-r--r-- 1 dustin dustin 484 Mar 1 12:59 hello.cpp
-rwxr-xr-x 1 dustin dustin 275 Mar 1 12:59 hello.py
-rw-r--r-- 1 dustin dustin 1445 Mar 1 15:43 Jamroot说明书上说应该这么简单:0/libs/python/doc/tutorial/doc/html/python/hello.html
最后几行是:
openat(AT_FDCWD, "/home/dustin/build/boost/libs/python/example/tutorial", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/home/dustin/build/boost/libs/python/example", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/usr/share/boost-build", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
open("/home/dustin/build/boost/libs/python/example/boost-build.jam", O_RDONLY) = 3为什么它在找助力器呢?我遗漏了什么?
发布于 2015-01-16 20:00:42
你可以创建你自己的助推器。对于快速启动示例(已损坏),只需创建一个名为boost-build.jam的文件,并确保它指向src目录。这里讨论的是http://lists.boost.org/boost-build/2014/11/27738.php
# Edit this path to point at the tools/build/v2 subdirectory of your
# Boost installation. Absolute paths work, too.
boost-build ../../../../tools/build/src ;发布于 2014-03-03 00:30:32
本质上,bjam是一个解释器,Boost.Build是一个用bjam文件编写的构建系统。当bjam启动时,它将尝试定位Boost.Build的jam文件。在本例中,bjam试图在boost-build.jam丢失时相对于教程和错误找到它。若要构建本教程,请执行以下操作:
boost/tools/build子模块是否已从boost git存储库中初始化。Boost.Python还有其他依赖项,因此可能更容易初始化所有子模块。这将允许安装在libboost1.54-dev包中的bjam解释器从存储库中定位Boost.Build,并构建教程及其依赖项。- Install the `libboost1.54` package. This will install the Boost.Python shared library and its dependencies.
- Modify the tutorial's Jamroot file. It should no longer attempt to use the boost project, and should explicitly list the Boost.Python shared library path:-#指定Boost项目的路径。如果移动此项目,-#将调整此路径以引用Boost根目录。-使用-项目推进-:./.-#设置项目范围内的需求,即所有东西都使用来自全局ID为-# / boost_python /python的项目的-#boost_python库。+# boost_python文库项目
可能需要根据libboost-python1.54-dev打包安装Boost.Python库的位置更改库的路径和名称。
-将BOOST_BUILD_PATH环境变量设置为/usr/share/boost-build/kernel或libboost1.54-dev包安装boost-build.jam的位置。
https://stackoverflow.com/questions/22120366
复制相似问题