btolab / hypseus

Hypseus is a fork of Daphne. A program that "lets one play the original versions of many laserdisc arcade games on one's PC."
GNU General Public License v3.0
18 stars 7 forks source link

Compilation error with buildroot #11

Open frodo13 opened 6 years ago

frodo13 commented 6 years ago

I've start to make a buildroot package for hypseus for a raspberry target. I get this error:

/usr/bin/make -j9 -C /home/fredo/projets/rpi/output/build/hypseus-c6af13b/src [ 6%] Built target libmpeg2 [ 8%] Built target cpu_x86 [ 10%] Built target plog [ 12%] Built target timer [ 13%] Linking CXX shared library libvldp.so [ 26%] Built target ldp-in [ 26%] Built target video ../3rdparty/lib/libmpeg2.a: error adding symbols: File format not recognized collect2: error: ld returned 1 exit status vldp/CMakeFiles/vldp.dir/build.make:147: recipe for target 'vldp/libvldp.so' failed make[5]: [vldp/libvldp.so] Error 1 CMakeFiles/Makefile2:841: recipe for target 'vldp/CMakeFiles/vldp.dir/all' failed make[4]: [vldp/CMakeFiles/vldp.dir/all] Error 2 Makefile:105: recipe for target 'all' failed make[3]: [all] Error 2 package/pkg-generic.mk:234: recipe for target '/home/fredo/projets/rpi/output/build/hypseus-c6af13b/.stamp_built' failed make[2]: [/home/fredo/projets/rpi/output/build/hypseus-c6af13b/.stamp_built] Error 2 Makefile:16: recipe for target '_all' failed make[1]: [_all] Error 2 Makefile:67: recipe for target 'build' failed make: [build] Error 2

I am not familiar with cmake (I usually use autotool), is there somes conf_opts to pass to cmake?

I use gcc 4.9.4 for arm with cmake 3.7.2

PS: I've made two patchs before, to prevent compile issues : The first one is :
--- hypseus-c6af13b/src/io/CMakeLists.txt 2017-11-02 17:41:39.000000000 +0100 +++ hypseus-static/src/io/CMakeLists.txt 2018-02-15 14:42:47.995940928 +0100 @@ -16,7 +16,7 @@ set( LIB_HEADERS find_package(ZLIB REQUIRED) include_directories( ${ZLIB_INCLUDE_DIRS} )

-add_library( io ${LIB_SOURCES} ${LIB_HEADERS} ) +add_library( io STATIC ${LIB_SOURCES} ${LIB_HEADERS} ) target_link_libraries( io ldp-out game plog ${ZLIB_LIBRARIES} ) if( WIN32 ) target_link_libraries( io ws2_32 ) --- hypseus-c6af13b/src/game/CMakeLists.txt 2017-11-02 17:41:39.000000000 +0100 +++ hypseus-static/src/game/CMakeLists.txt 2018-02-15 14:43:20.307942608 +0100 @@ -69,7 +69,7 @@ endif( BUILD_SINGE )

ignore gcc: warning: promoted ~unsigned is always non-zero [-Wsign-compare] (do_nmi coin check)

set_source_files_properties( laireuro.cpp PROPERTIES COMPILE_FLAGS -Wno-sign-compare)

-add_library( game ${LIB_SOURCES} ${LIB_HEADERS} ) +add_library( game STATIC ${LIB_SOURCES} ${LIB_HEADERS} ) target_link_libraries( game sound scoreboard video io plog ) if( BUILD_SINGE ) target_link_libraries( game singeproxy ) --- hypseus-c6af13b/src/scoreboard/CMakeLists.txt 2017-11-02 17:41:39.000000000 +0100 +++ hypseus-static/src/scoreboard/CMakeLists.txt 2018-02-15 14:43:35.459943395 +0100 @@ -18,5 +18,5 @@ set( LIB_HEADERS scoreboard_interface.h )

-add_library( scoreboard ${LIB_SOURCES} ${LIB_HEADERS} ) +add_library( scoreboard STATIC ${LIB_SOURCES} ${LIB_HEADERS} ) target_link_libraries( scoreboard io ) --- hypseus-c6af13b/src/ldp-out/CMakeLists.txt 2017-11-02 17:41:39.000000000 +0100 +++ hypseus-static/src/ldp-out/CMakeLists.txt 2018-02-15 14:42:26.095939790 +0100 @@ -15,5 +15,5 @@ set( LIB_HEADERS PKG_SEARCH_MODULE(VORBISFILE REQUIRED vorbisfile) include_directories( ${VORBISFILE_INCLUDE_DIRS} )

-add_library( ldp-out ${LIB_SOURCES} ${LIB_HEADERS} ) +add_library( ldp-out STATIC ${LIB_SOURCES} ${LIB_HEADERS} ) target_link_libraries( ldp-out vldp game ${VORBISFILE_LIBRARIES} ${SDL2_LIBRARY} )

the second is : --- hypseus-c6af13b/src/video/video.cpp 2017-11-02 17:41:39.000000000 +0100 +++ hypseus-unused/src/video/video.cpp 2018-02-16 10:16:39.190208578 +0100 @@ -447,7 +446,7 @@ void draw_overlay_leds(unsigned int valu // Draw LDP1450 overlay characters to the screen (added by Brad O.) void draw_singleline_LDP1450(char LDP1450_String, int start_x, int y, SDL_Surface overlay) {

lmerckx commented 6 years ago

Hello, I have the same error. It seems to work by replacing

if( CMAKE_CROSS_COMPILING ) by if( CMAKE_CROSSCOMPILING )

in src/cmake/modules/BuildLibMPEG2.cmake