Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Very new to all this linux stuff so please bear with me!
I'm trying to build an open source C++ project via command line on a clients RHEL box. I've tested out the source code and been successful doing this in Fedora11 but so far have been having problems in RHEL.
The open source software has a dependency on boost 1.35 or greater. The client RHEL box has 1.33. When I try yum update boost or yum install boost I get told that is the latest version.
So far my research is creating more questions than providing answers but if anyone could help me understand how to do update boost then that would be great!!
The pointers I've had so far suggest I need to build the boost source code on the client box. Is that correct? If so are there any dependencies that version of boost has that isn't included in RHEL5
I can't answer your question specifically for Red Hat, but I have been through the same process on Debian (where the boost version I needed was newer than what was in the stable version).
Rebuilding the boost libraries was not too complicated; I'd encourage you to try that first.
Actually, boost is really a collection of quite separate libraries. Probably two thirds of these libraries consist purely of header files (with heavy use of templates), and don't need to be built at all, just moved into one of the include directories eg /usr/local/include/boost (you may need to be careful about naming the directory if you want to retain the older version of boost too).
Those that do have compiled code (such as the thread related parts) generate standard library files, that are then just placed into the library directories.
The worst issue that might arise in doing the compilation is related to gcc versions. The boost library uses some of the more obscure template facilities of C++, and recent compilers do better than older ones.
Your other option is to find if anyone has backported a newer version of boost to RHEL already (I can't find any with a cursory search, but you might do better).
./configure --with-libraries=all
make
make install
that said if you want to know why it wont work via rum, will need to know more info, for example, what version of RHEL youre running , wether its a registered/supported copy and what repo its pulling from.
Have a look at the file "index.html" in the boost directory with a browser, to the link "getting started". It gives details on building boost for both Windows and Linux.
The simplest possible steps involve running
./bootstrap.sh
./bjam install
The install will probably put the include files in /usr/local/include, so you will either need to run as root (admin), or choose a different installation directory (--prefix=installation_path) to place it elsewhere.
On my system, this places the include files into /usr/local/include/boost-1_39, and the library files into /lib. But this might be different on a RHEL system.
This would mean using #include <boost-1_39/whatever.hpp> in the source. If you cannot change the source code, then consider renaming the include file directory to 'boost'. Watch out for clashes if you have an existing boost installation in /usr/include; my understanding is that /usr/local/include overrides /usr/include, so you should be okay.
I have just tested this out on boost version 1.39 using gcc-4.3.2 on Debian Lenny. Most of the libraries built, though there were missing headers for iostreams (installing zlib1g-dev and libbz2-dev fixed that). If you get difficult compilation errors on the libraries you need, consider going back to an slightly older version of boost (ie, choose the version you already have working in Fedora).
You may need to install bjam (a software build tool) if you don't already have it.
Last edited by neonsignal; 07-28-2009 at 01:05 AM.
Reason: detail of missing libraries required for compilation
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.