Menu

Problems building cppunit on OSX

Help
shandles
2007-01-05
2013-04-22
  • shandles

    shandles - 2007-01-05

    I have spent alot of time trying to get cppunit 1.10 to compile on osx with gcc 4.1.0   

    I have been running into problems with the '  ar  ' command, see log below...

    /bin/sh ../../libtool --mode=link g++  -g -O2   -o libcppunit.la -rpath /usr/local/lib -version-info 2:0:0 -release 1.10 AdditionalMessage.lo Asserter.lo BeOsDynamicLibraryManager.lo BriefTestProgressListener.lo CompilerOutputter.lo DefaultProtector.lo DynamicLibraryManager.lo DynamicLibraryManagerException.lo Exception.lo Message.lo RepeatedTest.lo PlugInManager.lo PlugInParameters.lo Protector.lo ProtectorChain.lo SourceLine.lo StringTools.lo SynchronizedObject.lo Test.lo TestAssert.lo TestCase.lo TestCaseDecorator.lo TestComposite.lo TestDecorator.lo TestFactoryRegistry.lo TestFailure.lo TestLeaf.lo TestNamer.lo TestPath.lo TestPlugInDefaultImpl.lo TestResult.lo TestResultCollector.lo TestRunner.lo TestSetUp.lo TestSuccessListener.lo TestSuite.lo TestSuiteBuilderContext.lo TextOutputter.lo TextTestProgressListener.lo TextTestResult.lo TextTestRunner.lo TypeInfoHelper.lo UnixDynamicLibraryManager.lo ShlDynamicLibraryManager.lo XmlDocument.lo XmlElement.lo XmlOutputter.lo XmlOutputterHook.lo Win32DynamicLibraryManager.lo 
    rm -fr  .libs/libcppunit.a
    ar cru .libs/libcppunit.a  AdditionalMessage.o Asserter.o BeOsDynamicLibraryManager.o BriefTestProgressListener.o CompilerOutputter.o DefaultProtector.o DynamicLibraryManager.o DynamicLibraryManagerException.o Exception.o Message.o RepeatedTest.o PlugInManager.o PlugInParameters.o Protector.o ProtectorChain.o SourceLine.o StringTools.o SynchronizedObject.o Test.o TestAssert.o TestCase.o TestCaseDecorator.o TestComposite.o TestDecorator.o TestFactoryRegistry.o TestFailure.o TestLeaf.o TestNamer.o TestPath.o TestPlugInDefaultImpl.o TestResult.o TestResultCollector.o TestRunner.o TestSetUp.o TestSuccessListener.o TestSuite.o TestSuiteBuilderContext.o TextOutputter.o TextTestProgressListener.o TextTestResult.o TextTestRunner.o TypeInfoHelper.o UnixDynamicLibraryManager.o ShlDynamicLibraryManager.o XmlDocument.o XmlElement.o XmlOutputter.o XmlOutputterHook.o Win32DynamicLibraryManager.o
    ar: .libs/libcppunit.a: Invalid operation

    The same tarball compiles fine on other linux systems, any help would be greatly appreciated!

     
    • shandles

      shandles - 2007-01-06

      Update... .

      So I just tried to copy the dynalib files (bascially 'cp libcppunit* /usr/local/lib') from the src/cppunit/.libs dir.  This seemed to work, I can now compile and link using the typical -lcppunit and the tests execute as expected!   Man that was a big waste of time!!

      Good luck.

       
    • Sotiris

      Sotiris - 2007-01-11

      Hi shandles,

         I'm having a tough time trying to figure out how to install cppunit.  I'm also a little bit of a OS X / unix newb as well. 

      I read through the INSTALL file and followed the instructions.  When I get to Make Install I get the following error. 

      /Users/smitropa/Projects/cppunit/cppunit> make install
      Making install in src
      Making install in cppunit
      /bin/sh ../../config/mkinstalldirs /usr/local/lib
      ../../config/mkinstalldirs: ../../config/mkinstalldirs: No such file or directory
      make[3]: *** [install-libLTLIBRARIES] Error 127
      make[2]: *** [install-am] Error 2
      make[1]: *** [install-recursive] Error 1
      make: *** [install-recursive] Error 1

      You seemed to have figured out the problem but I am confused as to how you solved it.

      I ran sudo cp libcppunit* /usr/local/lib/

      Any help would be greatly appreciated.

      Thank you.

       

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.