在ubuntu 10.04下安装最新的1.44 boost库

发布于 2024-09-25 16:34:23 字数 2395 浏览 7 评论 0原文

我有 ubuntu 10.04,想要安装最新的 boost 库 1.44_0

我下载了 tar.gz 文件并将其解压到 /usr/local/boost_1_44_0

我已经从 synaptic 安装了 boost 1.40 版本。

所以我想针对 1.44 进行编译和链接,因为我想使用一些新的库 不在旧版本中,例如属性树。

但是,我在进行下去时遇到了一些问题。

Ran sudo ./bootstrap.sh (一切顺利)

Ran ./bjam install bzip2 出现错误。

gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/file_descriptor.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/mapped_file.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/zlib.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/gzip.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/bzip2.o
libs/iostreams/src/bzip2.cpp:20:56: error: bzlib.h: No such file or directory
libs/iostreams/src/bzip2.cpp:31: error: ‘BZ_OK’ was not declared in this scope
libs/iostreams/src/bzip2.cpp:32: error: ‘BZ_RUN_OK’ was not declared in this scope
...

虽然我没有使用 bzip2 所以我不担心。

但不久之后,在编译过程中,屏幕上出现了充满错误的情况。 太多了,无法在此列出,但它们的名称中经常包含 python。

... 在::列表]': ./boost/python/str.hpp:285:从 'boost::python::str boost::python::str::join(const T&) const [with T = boost::python::list] 实例化' libs/python/src/object/function_doc_signature.cpp:321:从这里实例化 ./boost/python/object_core.hpp:334: error: 'object_base_initializer' 未在此范围内声明

    "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"." -I"/usr/include/python2.6" -c -o "bin.v2/libs/python/build/gcc-4.4.3/release/threading-multi/object/function_doc_signature.o" "libs/python/src/object/function_doc_signature.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.3/release/threading-multi/object/function_doc_signature.o...
...skipped <pstage/lib>libboost_python.so.1.44.0 for lack of <pbin.v2/libs/python/build/gcc-4.4.3/release/threading-multi>numeric.o...
...skipped <pstage/lib>libboost_python.so for lack of <pstage/lib>libboost_python.so.1.44.0...
gcc.compile.c++ bin.v2/libs/random/build/gcc-4.4.3/release/threading-multi/random_device.o

首先,为什么有这么多错误? 还有其他的,太多了,无法在此列出。

但我遇到的主要问题是我想链接到库,但它们没有放置在预期的位置。我以为它们会在 boost_1_44_0/libs 中,但没有找到。 不过,我确实发现了一些分散的 .a 文件。

我是不是把这整件事都搞错了?

I have ubuntu 10.04 and want to install the latest boost library 1.44_0

I downloaded the tar.gz file and unpacked it into /usr/local/boost_1_44_0

I already have the boost 1.40 version install from synaptic.

So I want to compile and link against 1.44 because I'm wanting to use some new libraries that
are not in the older version such as the property tree.

But, I'm having some issues getting it going.

Ran sudo ./bootstrap.sh (that went fine)

Ran ./bjam install
There were errors with bzip2.

gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/file_descriptor.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/mapped_file.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/zlib.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/gzip.o
gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.4.3/release/threading-multi/bzip2.o
libs/iostreams/src/bzip2.cpp:20:56: error: bzlib.h: No such file or directory
libs/iostreams/src/bzip2.cpp:31: error: ‘BZ_OK’ was not declared in this scope
libs/iostreams/src/bzip2.cpp:32: error: ‘BZ_RUN_OK’ was not declared in this scope
...

Although I'm not using bzip2 so I'm not worried.

But then a short time later during the compile, screens full of errors appear.
Too many to list here, but they often have python in the name.

...
on::list]’:
./boost/python/str.hpp:285: instantiated from ‘boost::python::str boost::python::str::join(const T&) const [with T = boost::python::list]’
libs/python/src/object/function_doc_signature.cpp:321: instantiated from here
./boost/python/object_core.hpp:334: error: ‘object_base_initializer’ was not declared in this scope

    "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"." -I"/usr/include/python2.6" -c -o "bin.v2/libs/python/build/gcc-4.4.3/release/threading-multi/object/function_doc_signature.o" "libs/python/src/object/function_doc_signature.cpp"

...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-4.4.3/release/threading-multi/object/function_doc_signature.o...
...skipped <pstage/lib>libboost_python.so.1.44.0 for lack of <pbin.v2/libs/python/build/gcc-4.4.3/release/threading-multi>numeric.o...
...skipped <pstage/lib>libboost_python.so for lack of <pstage/lib>libboost_python.so.1.44.0...
gcc.compile.c++ bin.v2/libs/random/build/gcc-4.4.3/release/threading-multi/random_device.o

First off, why so many errors?
There are other ones too and too many to list here.

But the main issue I have is that I want to link to the libraries, but they are not placed where expected. I thought they would be in boost_1_44_0/libs, but they are not found.
I did find some .a files scattered around though.

Am I just building this whole thing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

飞烟轻若梦 2024-10-02 16:34:23

这里你错过的是 Boost Python 库特别依赖的 bz2 库。首先使用以下命令安装此库 - sudo apt-get install libbz2-dev 。

What you miss here is bz2 library that Boost Python library in particular depends on. Install this library first using the following command - sudo apt-get install libbz2-dev.

Hello爱情风 2024-10-02 16:34:23

您可以从此处下载 ubuntu 的最新 boost 二进制文件: https://launchpad.net/~升压最新/+存档/ppa

You can download the latest boost binary for ubuntu from here: https://launchpad.net/~boost-latest/+archive/ppa

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文