TWiki home TWiki > Simulation > IPv6Suite > Main > InstallingBOOST TWiki webs:
Main | TWiki | Know | Sandbox
Simulation . { Changes | Index | Search | Go }

Installing BOOST

Trash.Main Steps

  1. Download from http://www.boost.org and get the latest version.
  2. cd ~/lib directory and extract the archive with tar zxvf <packagename>.tar.gz
  3. Change into the boost directory and execute pwd to get full path
  4. Add this to your .bashrc If you use bash: export BOOSTROOT=<full path from previous step>, or if you use tcsh add this to your .cshrc: setenv BOOSTROOT <full path from previous step>=.

Known Problems

RedHat 7.3

Using redhat 7.3 the kernel headers in /usr/include from glibc-kernheaders package will give errors similar to the following when compiling IPSuite6/IPv6/IPv6Processing subdirectory /home/jmll/src/boost_1_27_0/boost/detail/atomic_count_linux.hpp:44: atomic_dec_ and_test'. In order to solve this problem upgrading to boost version 1.28 or later is the only solution besides using the old (kernel-headers package from redhat 7.2) but this is probably not a good idea as the glibc libraries were not compiled with those headers. The problem with version 1.28 is they have removed operator* from the weak_ptr class as it is not thread safe(neither is get()). Thus you'll get other compilation errors now. To fix just add it to the following file boost_1_28_0/boost/weak_ptr.hpp after the get() function body.

 //Added for compatibility with previous versions and our code.  Yes its unsafe
 //in multithreaded programs too.
 T * operator-> () const // never throws
    {
        T * p = get();
        BOOST_ASSERT(p != 0);
        return p;
    }

Boost 1.30 or greater

They have removed the weak_ptr.get() class template which means our code does not compile in places where this was used. Since our code is single threaded it doesn't really matter. Maybe we should add a patch to include the removed function again or just convert all the code to weak_ptr.lock().get() and force everyone to upgrade Boost in the process? In the meantime just use boost 1.29 for now.

Topic InstallingBOOST . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More }
Revision r1.3 - 11 May 2005 - 11:57 GMT - AhmetSekercioglu
Parents: WebHome > IPv6Suite > Main
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.