Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 07-27-2009, 03:54 AM   #1
LQ Newbie
Registered: Jul 2009
Location: Sydney
Posts: 4

Rep: Reputation: 0
Boost 1.39 Libraries on RHEL 5

Hi there

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

Old 07-27-2009, 08:22 AM   #2
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Stretch (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
building boost

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).

Hope that helps.
Old 07-27-2009, 08:29 AM   #3
Registered: Nov 2008
Location: London, UK
Distribution: CentOS, RedHat, Ubuntu
Posts: 79

Rep: Reputation: 18
to answer your question on how to update boost:

download the latest boost for your distro:


 ./configure --with-libraries=all
 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.
Old 07-28-2009, 12:37 AM   #4
LQ Newbie
Registered: Jul 2009
Location: Sydney
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for both the replies.

I'm still a bit confused though!

I've downloaded and extracted the latest distro via the link (1.39)

but there is no configure to build the source code (except the lib/config folder) - it does have a

I can confirm the RHEL box is registered but do not have the info for which repo it is using. It is RHEL 5.3

thanks again
Old 07-28-2009, 01:52 AM   #5
Senior Member
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Stretch (Fluxbox WM)
Posts: 1,389
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
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
./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 02:05 AM. Reason: detail of missing libraries required for compilation


boost139, c++, dev

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Boost.Signals adriv Slackware 14 01-28-2008 02:12 AM
error while loading shared libraries: in RHEL 4 AS SianZronG Linux - Enterprise 8 09-11-2007 03:48 AM
boost::thread angustia Programming 0 01-28-2007 05:37 PM
g++ and boost problem mixx Programming 1 07-20-2005 01:53 PM
How to add boost libraries to gcc include list kiku Linux - Newbie 1 03-04-2005 03:49 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration