Installing latest 1.44 boost library under ubuntu 10.04

半城伤御伤魂 提交于 2019-12-05 13:31:17

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/3829421/installing-latest-1-44-boost-library-under-ubuntu-10-04

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!