Menu

#377 player-3.0.2 - 'interface_table.h' file not found

trunk
open
nobody
5
2017-10-17
2017-04-07
Victor Hugo
No

Hi.

I am trying to compile player-3.0.2 but I get the following error on Mac OS Sierra 10.12.4 with Intel Core i5.

[  0%] Built target playercommon
[  1%] Generating player_interfaces.h
[  1%] Built target player_interfaces
[  2%] Building C object libplayerinterface/CMakeFiles/playerinterface.dir/interface_util.o
/Users/victor/src/player-3.0.2/libplayerinterface/interface_util.c:51:10: fatal error: 
      'interface_table.h' file not found
#include "interface_table.h"
         ^
1 error generated.
make[2]: *** [libplayerinterface/CMakeFiles/playerinterface.dir/interface_util.o] Error 1
make[1]: *** [libplayerinterface/CMakeFiles/playerinterface.dir/all] Error 2
make: *** [all] Error 2

Can someone help me to solve this issue.
Thank you.

Discussion

  • Victor Hugo

    Victor Hugo - 2017-04-08

    Problem continues after having applied the player-3.0.2-interfacetable.patch patch.

     
  • Rich Mattes

    Rich Mattes - 2017-04-08

    Hmm... is it possible you're using python 3 instead of python 2? Player 3.0.2's generators are incompatible wth python 3.

    You might also want to try Player 3.1.0, which was released today:
    https://github.com/playerproject/player/releases/tag/release-3-1-0

     
  • Victor Hugo

    Victor Hugo - 2017-04-09

    Unfortunately I cannot compile the source code, I tried to use the patch and player 3.1.0 and the problem continues.

    In Mac OS Sierra 10.12.4 the default python versions are 2.6.9 and 2.7.10

     
  • Alex

    Alex - 2017-10-06

    I have the same issue, running on macOS Sierra 10.12.6.

    I can't find the file "interface_table.h" also in older repos.
    Is it possible to get only the "interface_table.h" and the C-File to this header?

     
  • Victor Hugo

    Victor Hugo - 2017-10-13

    It seems that the file "interface_table. h" cannot be generated with the new versions of CMake. I tried with CMake 3.6.3 and the problem has been solved, but now another problem has arisen.

    This is the output:

    [  6%] Linking C shared library libplayerwkb.dylib
    [  6%] Built target playerwkb
    Scanning dependencies of target playerc
    [  6%] Building C object client_libs/libplayerc/CMakeFiles/playerc.dir/mclient.o
    In file included from /Users/victor/usr/local/src/player-release-3-1-0/client_libs/libplayerc/mclient.c:57:
    /Users/victor/usr/local/src/player-release-3-1-0/replace/replace.h:132:11: warning: 
          'CLOCK_REALTIME' macro redefined [-Wmacro-redefined]
      #define CLOCK_REALTIME 0
              ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/time.h:154:9: note: 
          previous definition is here
    #define CLOCK_REALTIME _CLOCK_REALTIME
            ^
    In file included from /Users/victor/usr/local/src/player-release-3-1-0/client_libs/libplayerc/mclient.c:57:
    /Users/victor/usr/local/src/player-release-3-1-0/replace/replace.h:133:26: error: 
          conflicting types for 'clock_gettime'
    PLAYERREPLACE_EXPORT int clock_gettime(int clk_id, struct timespec *tp);
                             ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/time.h:177:5: note: 
          previous declaration is here
    int clock_gettime(clockid_t __clock_id, struct timespec *__tp);
        ^
    1 warning and 1 error generated.
    make[2]: *** [client_libs/libplayerc/CMakeFiles/playerc.dir/mclient.o] Error 1
    make[1]: *** [client_libs/libplayerc/CMakeFiles/playerc.dir/all] Error 2
    make: *** [all] Error 2
    
     
  • Rich Mattes

    Rich Mattes - 2017-10-13

    So interface_table.h is generated by a python script during build time. EIther something is wrong with the script/python interpreter, or something is wrong with the way that the dependencies are set up. If the output pasted is the complete output, it looks like the build system isn't trying to generate interface_table.h before trying to build libplayerinterface. This patch may correct that:

    diff --git a/libplayerinterface/CMakeLists.txt b/libplayerinterface/CMakeLists.txt
    index 59bb4ea2..0e22b8fd 100644
    --- a/libplayerinterface/CMakeLists.txt
    +++ b/libplayerinterface/CMakeLists.txt
    @@ -102,6 +102,8 @@ ENDIF (PLAYER_OS_QNX)
     INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
     PLAYER_ADD_LIBRARY (playerinterface ${playerinterfaceSrcs})
     TARGET_LINK_LIBRARIES (playerinterface playercommon)
    +ADD_DEPENDENCIES(playerinterface functiontable_gen playerxdr_src player_interfaces interface_table)
    
    +  
     IF (PLAYER_OS_WIN)
         ADD_DEFINITIONS(-Dplayerxdr_EXPORTS)
         TARGET_LINK_LIBRARIES (playerinterface ws2_32)
    
     

    Last edit: Rich Mattes 2017-10-13
  • Rich Mattes

    Rich Mattes - 2017-10-13

    The problem with clock_gettime is a different issue. Player tests for the existance of librt.so and the clock_gettime function, and if it can't find either of those it tries to provide clock_gettime functionality. It looks like librt doesn't exist on os x, so a check for clock_gettime is all that's needed. Try this patch:

    diff --git a/cmake/internal/SearchForStuff.cmake b/cmake/internal/SearchForStuff.cmake
    index dd6e6ebd..6dbe2d83 100644
    --- a/cmake/internal/SearchForStuff.cmake
    +++ b/cmake/internal/SearchForStuff.cmake
    @@ -118,20 +118,20 @@ IF (HAVE_LIBZ AND HAVE_ZLIB_H)
         SET (HAVE_Z TRUE)
     ENDIF (HAVE_LIBZ AND HAVE_ZLIB_H)
    
    -IF (PLAYER_OS_QNX)
    +IF (PLAYER_OS_QNX OR PLAYER_OS_OSX)
         CHECK_FUNCTION_EXISTS (clock_gettime HAVE_CLOCK_GETTIME_FUNC)
         IF (HAVE_CLOCK_GETTIME_FUNC)
    
    -       SET (HAVE_CLOCK_GETTIME TRUE)
    +        SET (HAVE_CLOCK_GETTIME TRUE)
         ENDIF (HAVE_CLOCK_GETTIME_FUNC)
    -ELSE (PLAYER_OS_QNX)
    +ELSE (PLAYER_OS_QNX OR PLAYER_OS_OSX)
         CHECK_LIBRARY_EXISTS (rt clock_gettime "${PLAYER_EXTRA_LIB_DIRS}" HAVE_LIBRT)
         SET (CMAKE_REQUIRED_LIBRARIES rt)
         CHECK_FUNCTION_EXISTS (clock_gettime HAVE_CLOCK_GETTIME_FUNC)
         SET (CMAKE_REQUIRED_LIBRARIES)
         IF (HAVE_LIBRT AND HAVE_CLOCK_GETTIME_FUNC)
    -       SET (HAVE_CLOCK_GETTIME TRUE)
    +        SET (HAVE_CLOCK_GETTIME TRUE)
         ENDIF (HAVE_LIBRT AND HAVE_CLOCK_GETTIME_FUNC)
    -ENDIF (PLAYER_OS_QNX)
    +ENDIF(PLAYER_OS_QNX OR PLAYER_OS_OSX)
    
     # Geos check
     CHECK_LIBRARY_EXISTS (geos_c GEOSGeomFromWKB_buf "${PLAYER_EXTRA_LIB_DIRS}" HAVE_GEOS)
    
     
  • Rich Mattes

    Rich Mattes - 2017-10-15

    I was able to reproduce the error where interface_table.h wasn't found, and the patch I posted above that calls "add_dependencies" seems to fix the error on my machine. I don't have a mac to test the second patch.

    I pushed both of these to git master - if you could give it a try I'd appreciate it.

    https://github.com/playerproject/player

     
  • Victor Hugo

    Victor Hugo - 2017-10-16

    I have tried to compile again and this is the error I get:

    [ 31%] Building CXX object libplayercore/CMakeFiles/playercore.dir/wallclocktime.o
    [ 31%] Building CXX object libplayercore/CMakeFiles/playercore.dir/plugins.o
    [ 31%] Building CXX object libplayercore/CMakeFiles/playercore.dir/globals.o
    [ 32%] Building CXX object libplayercore/CMakeFiles/playercore.dir/property.o
    [ 32%] Building CXX object libplayercore/CMakeFiles/playercore.dir/threaded_driver.o
    [ 32%] Building CXX object libplayercore/CMakeFiles/playercore.dir/remote_driver.o
    [ 32%] Linking CXX shared library libplayercore.dylib
    ld: library not found for -lrt
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [libplayercore/libplayercore.3.1.1-dev.dylib] Error 1
    make[1]: *** [libplayercore/CMakeFiles/playercore.dir/all] Error 2
    make: *** [all] Error 2
    
     
  • Rich Mattes

    Rich Mattes - 2017-10-17

    Hi Victor

    Thanks for the reply. There's one more spot where librt is being linked to, in libplayercore. I grepped through the rest of the CMakeLists.txt and didn't see any more hits for librt outside of IF (PLAYER_OS_SOLARIS), but grepping for "rt" produces tons of false positives so let me know if something else breaks.

    diff --git a/libplayercore/CMakeLists.txt b/libplayercore/CMakeLists.txt
    index 33768da6..97c6b9ab 100644
    --- a/libplayercore/CMakeLists.txt
    +++ b/libplayercore/CMakeLists.txt
    @@ -31,10 +31,10 @@ IF (NOT PLAYER_OS_QNX)
     ENDIF (NOT PLAYER_OS_QNX)
    
     IF (HAVE_CLOCK_GETTIME)
    
    -    IF (NOT PLAYER_OS_QNX)
    -       PLAYERCORE_ADD_INT_LINK_LIB (rt)
    -       SET (playercoreLinkLibs ${playercoreLinkLibs} "rt")
    -    ENDIF (NOT PLAYER_OS_QNX)
    +    IF (NOT PLAYER_OS_QNX AND NOT PLAYER_OS_OSX)
    +             PLAYERCORE_ADD_INT_LINK_LIB (rt)
    +        SET (playercoreLinkLibs ${playercoreLinkLibs} "rt")
    +    ENDIF (NOT PLAYER_OS_QNX AND NOT PLAYER_OS_OSX)
     ELSE (HAVE_CLOCK_GETTIME)
         SET (playerreplaceLib playerreplace)
     ENDIF (HAVE_CLOCK_GETTIME)
    
     

Log in to post a comment.

MongoDB Logo MongoDB