Menu

#158 Shared object compilation fails

open
nobody
5
2006-02-28
2006-02-28
No

On Red Hat AS 4, Xeon EM64T (64-bit).

Compile fails as follows (for cppunit version 1.11.4
and 1.10.2):

---------
g++ -shared -nostdlib
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/crtbeginS.o
.libs/AdditionalMessage.o .libs/Asserter.o
.libs/BeOsDynamicLibraryManager.o
.libs/BriefTestProgressListener.o
.libs/CompilerOutputter.o .libs/DefaultProtector.o
.libs/DynamicLibraryManager.o
.libs/DynamicLibraryManagerException.o
.libs/Exception.o .libs/Message.o .libs/RepeatedTest.o
.libs/PlugInManager.o .libs/PlugInParameters.o
.libs/Protector.o .libs/ProtectorChain.o
.libs/SourceLine.o .libs/StringTools.o
.libs/SynchronizedObject.o .libs/Test.o
.libs/TestAssert.o .libs/TestCase.o
.libs/TestCaseDecorator.o .libs/TestComposite.o
.libs/TestDecorator.o .libs/TestFactoryRegistry.o
.libs/TestFailure.o .libs/TestLeaf.o .libs/TestNamer.o
.libs/TestPath.o .libs/TestPlugInDefaultImpl.o
.libs/TestResult.o .libs/TestResultCollector.o
.libs/TestRunner.o .libs/TestSetUp.o
.libs/TestSuccessListener.o .libs/TestSuite.o
.libs/TestSuiteBuilderContext.o .libs/TextOutputter.o
.libs/TextTestProgressListener.o .libs/TextTestResult.o
.libs/TextTestRunner.o .libs/TypeInfoHelper.o
.libs/UnixDynamicLibraryManager.o
.libs/ShlDynamicLibraryManager.o .libs/XmlDocument.o
.libs/XmlElement.o .libs/XmlOutputter.o
.libs/XmlOutputterHook.o
.libs/Win32DynamicLibraryManager.o
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64
-L/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../..
-L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc
-lgcc_s
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/crtendS.o
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/../../../../lib64/crtn.o
-Wl,-soname -Wl,libcppunit-1.11.so.4 -o
.libs/libcppunit-1.11.so.4.0.0
/usr/bin/ld:
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/libstdc++.a(functexcept.o):
relocation R_X86_64_32 against
`std::bad_exception::~bad_exception()' can not be used
when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/3.4.3/libstdc++.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
---------

I tried ./configure --with-pic but it didn't help.

Discussion

  • Daniel Lipsitt

    Daniel Lipsitt - 2006-02-28

    Logged In: YES
    user_id=797398

    ./configure --with-gnu-ld doesn't help either.

     
  • Daniel Lipsitt

    Daniel Lipsitt - 2006-02-28

    Logged In: YES
    user_id=797398

    './configure --host=i686' build completes.

    I'm not sure whether the resulting tools and libraries will
    work with my unit tests, though.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.