Bug 553 - Running code built with a special gcc
Running code built with a special gcc
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: build system
pre-release
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-17 12:31 UTC by Faker Moatamri
Modified: 2009-04-21 03:59 UTC (History)
2 users (show)

See Also:


Attachments
a patch (645 bytes, patch)
2009-04-20 13:35 UTC, Gustavo J. A. M. Carneiro
Details | Diff
another patch (666 bytes, patch)
2009-04-20 13:40 UTC, Gustavo J. A. M. Carneiro
Details | Diff
patch using xxx_LIBRARY_PATH (653 bytes, patch)
2009-04-20 13:42 UTC, Gustavo J. A. M. Carneiro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Faker Moatamri 2009-04-17 12:31:28 UTC
The build works with gcc 4.4.0 but the checktests and the regression tests doesn't pass in the optimized mode.
Comment 1 Mathieu Lacage 2009-04-20 02:52:56 UTC
On a system with multiple compilers installed, we need to link explicitely against the compiler's c++ library:

For example:
bash-3.2$ g++-4.4.0 -print-file-name=libstdc++.so
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../lib64/libstdc++.so

Would it be possible/would it make sense to use -rpath with the above command to link against the c++ stl library with waf ?
Comment 2 Gustavo J. A. M. Carneiro 2009-04-20 13:35:18 UTC
Created attachment 421 [details]
a patch

Patch implementing Mathieu's suggestion.  No idea if this solves the problem.  I don't think I have the correct environment to test.
Comment 3 Gustavo J. A. M. Carneiro 2009-04-20 13:40:19 UTC
Created attachment 422 [details]
another patch

Then again, Mathieu says rpath, so could be this patch instead.
Comment 4 Gustavo J. A. M. Carneiro 2009-04-20 13:42:43 UTC
Created attachment 423 [details]
patch using xxx_LIBRARY_PATH

Then again, if this works it is probably more portable.
Comment 5 Mathieu Lacage 2009-04-21 03:59:07 UTC
changeset: 2e79cbd62d28