boost_3.6 beta: Linking boost serialisation (and other libs) gives duplicate symbol on AIX 5.3 with gcc 4.2.4
Hi,
When (natively) linking on IBM AIX 5.3 after compiling with with gcc 4.2.4, I get the a bunch of link-warnings like below for many libraries. It seems that the reason is that inline function are linked externaly:
http://www-1.ibm.com/support/docview.wss?uid=swg21044588
I am not sure what is the right way to solve the issue:
1) Force compiler to staticaly inline
2) Add the native AIX linker option: -bhalt:5 to suppress the warning
3) Explicitely declare inline functions static
For now, the first seems best to me. But I dont think there is such an option. Or is there?
Any other solutions?
Cheers,
Andrej
gcc.link.dll bin.v2/libs/serialization/build/gcc-4.2.4/release/threading-multi/libboost_serialization-gcc42-mt-1_36.so
ld: 0711-224 WARNING: Duplicate symbol: .virtual thunk to boost::archive::archive_exception::what() const
ld: 0711-224 WARNING: Duplicate symbol: .virtual thunk to boost::archive::archive_exception::~archive_exception()
ld: 0711-224 WARNING: Duplicate symbol: .virtual thunk to boost::archive::archive_exception::~archive_exception()
ld: 0711-224 WARNING: Duplicate symbol: .non-virtual thunk to boost::exception_detail::exception_clone
AMDG Andrej van der Zee wrote:
Hi,
When (natively) linking on IBM AIX 5.3 after compiling with with gcc 4.2.4, I get the a bunch of link-warnings like below for many libraries. It seems that the reason is that inline function are linked externaly: http://www-1.ibm.com/support/docview.wss?uid=swg21044588
I am not sure what is the right way to solve the issue: 1) Force compiler to staticaly inline
I don't like to force the compiler to behave in a way that is not standard compliant. Or do you mean to force the compiler to actually inline all inline functions? This is impossible for virtual functions.
2) Add the native AIX linker option: -bhalt:5 to suppress the warning
This is dangerous, since it may suppress real diagnostics, but at least it is unlikely to break correct code.
3) Explicitely declare inline functions static
This can violate the ODR. It is out of the question as far as I am concerned.
For now, the first seems best to me. But I dont think there is such an option. Or is there?
Any other solutions?
The linker ought not to be issuing a warning. I don't suppose there's a way to make it shut up without also suppressing legitimate warnings, is there? In Christ, Steven Watanabe
participants (2)
-
Andrej van der Zee
-
Steven Watanabe