Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343937 - dev-libs/boost TR1 library is not configured correctly
Summary: dev-libs/boost TR1 library is not configured correctly
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: C++ Team [disbanded]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-03 03:17 UTC by Adam H. Peterson
Modified: 2016-03-09 06:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam H. Peterson 2010-11-03 03:17:54 UTC
Compiling a C++ program using the Boost TR1 headers gives a "No such file or directory" from within the boost header.  Boost's TR1 library uses relative paths to delegate their TR1 wrapper headers to the standard headers in order to avoid self-inclusion (since they have the same name as the standard headers they expand).  But for the Gentoo installation, the relative path is wrong.

Reproducible: Always

Steps to Reproduce:
1.  Install the boost library using portage.
2.  Create a C++ program like the following:
    // testtr1.cpp
    #include <memory>
    using std::tr1::shared_ptr;
    int main() {
        shared_ptr<int> p(new int(0));
    }
3. Compile the program with G++, including the Boost TR1 header in the include path:
    g++ -I/usr/include/boost/tr1/tr1 -o testtr1 testtr1.cpp

Actual Results:  
This compilation fails for me.  The compilation error on my Gentoo box is:

In file included from /usr/include/boost/tr1/tr1/memory:13,
                 from testtr1.cpp:2:
/usr/include/boost/tr1/detail/config_all.hpp:151:41: error: ../4.4.4/utility: No such file or directory


Expected Results:  
On my Ubuntu Maverick system, this procedure compiles without error and produces a binary.

On my system, I can kludge it to make it work by doing this (as root):
    cd /usr/lib64/gcc/x86_64-pc-linux-gnu/4.4.4/include && ln -s g++-v4/ 4.4.4

(Note that I'm on AMD64, but I don't think the error is limited to 64-bit.)
Comment 1 Łukasz Michalik 2010-11-30 16:23:27 UTC
Does adding -DBOOST_TR1_GCC_INCLUDE_PATH=g++-v4 to the compile line as per http://www.boost.org/doc/libs/1_41_0/doc/html/boost_tr1/usage.html#boost_tr1.usage.include_style -> Important Note #2, help?
Comment 2 Adam H. Peterson 2010-12-01 03:38:43 UTC
Yes, adding that does make the compilation succeed.  (Although, this scenario doesn't match the symptoms described by that page; perhaps a bug should be filed against the Boost documentation.)  I expect an autoconf macro can be used to make the compilation portable.
Comment 3 Sergey Popov gentoo-dev 2016-03-09 06:16:44 UTC
I am considering this mostly Boost issue itself, nothing we can do here. We are definitely would not deviate from upstream behaviour.