Menu

#121 podofo-0.9.7 FTBFS on OS X

SVN TRUNK
open
nobody
None
2021-03-02
2021-01-10
No

0.9.6 built fine (all dependencies supplied by fink), but 0.9.7:

[  4%] Building CXX object src/podofo/CMakeFiles/podofo_shared.dir/base/PdfDate.cpp.o
cd /sw/build.build/podofo0.9.7-shlibs-0.9.7-1/podofo-0.9.7/build/src/podofo && /sw/var/lib/fink/path-prefix-clang/c++ -Dpodofo_shared_EXPORTS -I/sw/build.build/podofo0.9.7-shlibs-0.9.7-1/podofo-0.9.7/build -I/sw/build.build/podofo0.9.7-shlibs-0.9.7-1/podofo-0.9.7/src -I/sw/include -I/sw/include/cppunit -I/sw/build.build/podofo0.9.7-shlibs-0.9.7-1/podofo-0.9.7/src/podofo -I/sw/include/freetype2 -I/sw/lib/fontconfig2/include -MD -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.13 -fPIC -DBUILDING_PODOFO -o CMakeFiles/podofo_shared.dir/base/PdfDate.cpp.o -c /sw/build.build/podofo0.9.7-shlibs-0.9.7-1/podofo-0.9.7/src/podofo/base/PdfDate.cpp
/sw/build.build/podofo0.9.7-shlibs-0.9.7-1/podofo-0.9.7/src/podofo/base/PdfDate.cpp:199:18: error: expected ';' at end of declaration
    struct tm _tm{};
                 ^
                 ;
1 error generated.

This is on OS X 10.13, using Apple LLVM version 10.0.0 (clang-1000.11.45.5)

Discussion

  • Daniel Lipsitt

    Daniel Lipsitt - 2021-03-01

    Same on 10.14.6 in a Homebrew environment with Apple clang version 11.0.0 (clang-1100.0.33.8). Trunk [r2033].

     

    Related

    Commit: [r2033]

  • Daniel Lipsitt

    Daniel Lipsitt - 2021-03-02

    Telling CMake to use a C++11 compiler seems to work. I don't know if this is the right way to do this or the right place to put it.

    diff --git a/CMakeLists.txt b/CMakeLists.txt
    index c42b590..c6d92fa 100644
    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -37,6 +37,9 @@ if(POLICY CMP0033)
     CMAKE_POLICY(SET CMP0033 NEW) # https://cmake.org/cmake/help/v3.0/policy/CMP0033.html
     endif()
    
    +set(CMAKE_CXX_STANDARD 11)
    +set(CXX_STANDARD_REQUIRED ON)
    +
     # Load modules from our source tree too
     SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
    
     
  • Daniel Macks

    Daniel Macks - 2021-03-02

    I had already added that flag for test/unit/CMakeLists.txt (required for recent cppunit versions (see https://sourceforge.net/p/podofo/mailman/podofo-users/thread/1501515201.2032.64.camel%40litePDF.cz) via the more generic ADD_DEFINITIONS() function, so a more specific tool like the CXX_STANDARD variables seems better already.