#204 cppunit 1.12.1 needs -lm for fabs() on solaris

Tim Mooney

I just finished building cppunit 1.12.1 on x86_64-sun-solaris2.10 with the no-cost Oracle Studio 12.2 compilers.

cppunit needs the fabs() function, and currently it's assuming it will be available. Solaris has it, but it's in libm (the math library). That's also where a few other commercial UNIX platforms would likely have it as well.

The fix is trivial; check for fabs in libm.

With this patch and my previous patch related to the finite() prototype in ieeefp.h, cppunit 1.12.1 builds in 64 bit mode with the Oracle compilers and all the expected tests pass.


  • Baptiste Lepilleur

    • assigned_to: nobody --> blep
    • status: open --> closed
  • Baptiste Lepilleur

    Thanks a lot of those perfect patches!

    r583 | blep | 2012-06-22 17:45:17 +0200 (Fri, 22 Jun 2012) | 6 lines
    Changed paths:
    M /trunk/cppunit/ChangeLog
    M /trunk/cppunit/INSTALL-unix
    M /trunk/cppunit/NEWS
    M /trunk/cppunit/configure.in
    M /trunk/cppunit/include/cppunit/portability/FloatingPoint.h

    Fixed build on Solaris/Sun Studio (configure issues).
    Applied patch from bug #3483400 & #3483396. Updated build instructions.
    Added missing include <ieeefp.h> required to use finite() on
    Solaris/Sun Studio. Added -lm to link for fabs().


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks