Error while linking FFmpeg against LibGME git

Issue #17 resolved
Former user created an issue

Hello LibGME devs,

I'm cross-compiling FFmpeg with LibGME from git (on Windows using Cygwin, MinGW and GCC).

Compiling LibGME:

cmake -G"Unix Makefiles" . -DENABLE_STATIC_RUNTIME=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RANLIB=/cygdrive/m/[...]/bin/i686-w64-mingw32-ranlib -DCMAKE_C_COMPILER=/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=/cygdrive/m/[...]/bin/i686-w64-mingw32-g++ -DCMAKE_RC_COMPILER=/cygdrive/m/[...]/bin/i686-w64-mingw32-windres -DCMAKE_INSTALL_PREFIX=/cygdrive/m/[...]/i686-w64-mingw32 -DBUILD_SHARED_LIBS=0 -DENABLE_UBSAN=0
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-g++
-- Check for working CXX compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test __LIBGME_TEST_VISIBILITY
-- Performing Test __LIBGME_TEST_VISIBILITY - Success
-- Performing Test __LIBGME_SWITCH_FALLTHROUGH_WARNINGS
-- Performing Test __LIBGME_SWITCH_FALLTHROUGH_WARNINGS - Success
 ** ZLib library located, compressed file formats will be supported
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_STATIC_RUNTIME


-- Build files have been written to: /cygdrive/m/[...]/game-music-emu_git

Doing make in /cygdrive/m/[...]/game-music-emu_git as make  -j 1

Scanning dependencies of target gme
[  2%] Building CXX object gme/CMakeFiles/gme.dir/Blip_Buffer.cpp.obj
[  4%] Building CXX object gme/CMakeFiles/gme.dir/Classic_Emu.cpp.obj
[  6%] Building CXX object gme/CMakeFiles/gme.dir/Data_Reader.cpp.obj
In file included from /usr/include/errno.h:9:0,
                 from /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:26:
/usr/include/sys/errno.h:14:0: warning: "errno" redefined
 #define errno (*__errno())

In file included from /cygdrive/m/[...]/lib/gcc/i686-w64-mingw32/7.3.0/include/stddef.h:1:0,
                 from /cygdrive/m/[...]/game-music-emu_git/gme/blargg_common.h:7,
                 from /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.h:7,
                 from /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:3:
/cygdrive/m/[...]/i686-w64-mingw32/include/stddef.h:19:0: note: this is the location of the previous definition
 #define errno (*_errno())

/cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp: In member function 'virtual long int Std_File_Reader::read_avail(void*, long int)':
/cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:375:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if ( file_ && s > 0 && s <= UINT_MAX ) {
In file included from /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:21:0:
/cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp: In member function 'virtual const char* Std_File_Reader::read(void*, long int)':
/cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:389:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  RETURN_VALIDITY_CHECK( s > 0 && s <= UINT_MAX );
/cygdrive/m/[...]/game-music-emu_git/gme/blargg_source.h:28:44: note: in definition of macro 'unlikely'
     #define unlikely( x ) __builtin_expect(x, 0)
                                            ^
/cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:389:2: note: in expansion of macro 'RETURN_VALIDITY_CHECK'
  RETURN_VALIDITY_CHECK( s > 0 && s <= UINT_MAX );
  ^~~~~~~~~~~~~~~~~~~~~
[  8%] Building CXX object gme/CMakeFiles/gme.dir/Dual_Resampler.cpp.obj
[ 10%] Building CXX object gme/CMakeFiles/gme.dir/Effects_Buffer.cpp.obj
[ 12%] Building CXX object gme/CMakeFiles/gme.dir/Fir_Resampler.cpp.obj
[ 14%] Building CXX object gme/CMakeFiles/gme.dir/gme.cpp.obj
[ 17%] Building CXX object gme/CMakeFiles/gme.dir/Gme_File.cpp.obj
[ 19%] Building CXX object gme/CMakeFiles/gme.dir/M3u_Playlist.cpp.obj
[ 21%] Building CXX object gme/CMakeFiles/gme.dir/Multi_Buffer.cpp.obj
[ 23%] Building CXX object gme/CMakeFiles/gme.dir/Music_Emu.cpp.obj
[ 25%] Building CXX object gme/CMakeFiles/gme.dir/Ay_Apu.cpp.obj
[ 27%] Building CXX object gme/CMakeFiles/gme.dir/Ym2612_Emu.cpp.obj
[ 29%] Building CXX object gme/CMakeFiles/gme.dir/Sms_Apu.cpp.obj
[ 31%] Building CXX object gme/CMakeFiles/gme.dir/Ay_Cpu.cpp.obj
[ 34%] Building CXX object gme/CMakeFiles/gme.dir/Ay_Emu.cpp.obj
[ 36%] Building CXX object gme/CMakeFiles/gme.dir/Gb_Apu.cpp.obj
[ 38%] Building CXX object gme/CMakeFiles/gme.dir/Gb_Cpu.cpp.obj
[ 40%] Building CXX object gme/CMakeFiles/gme.dir/Gb_Oscs.cpp.obj
[ 42%] Building CXX object gme/CMakeFiles/gme.dir/Gbs_Emu.cpp.obj
[ 44%] Building CXX object gme/CMakeFiles/gme.dir/Gym_Emu.cpp.obj
[ 46%] Building CXX object gme/CMakeFiles/gme.dir/Hes_Apu.cpp.obj
[ 48%] Building CXX object gme/CMakeFiles/gme.dir/Hes_Cpu.cpp.obj
[ 51%] Building CXX object gme/CMakeFiles/gme.dir/Hes_Emu.cpp.obj
[ 53%] Building CXX object gme/CMakeFiles/gme.dir/Kss_Cpu.cpp.obj
[ 55%] Building CXX object gme/CMakeFiles/gme.dir/Kss_Emu.cpp.obj
[ 57%] Building CXX object gme/CMakeFiles/gme.dir/Kss_Scc_Apu.cpp.obj
[ 59%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Apu.cpp.obj
[ 61%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Cpu.cpp.obj
[ 63%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Fme7_Apu.cpp.obj
[ 65%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Namco_Apu.cpp.obj
[ 68%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Oscs.cpp.obj
[ 70%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Vrc6_Apu.cpp.obj
[ 72%] Building CXX object gme/CMakeFiles/gme.dir/Nsf_Emu.cpp.obj
[ 74%] Building CXX object gme/CMakeFiles/gme.dir/Nsfe_Emu.cpp.obj
[ 76%] Building CXX object gme/CMakeFiles/gme.dir/Sap_Apu.cpp.obj
[ 78%] Building CXX object gme/CMakeFiles/gme.dir/Sap_Cpu.cpp.obj
[ 80%] Building CXX object gme/CMakeFiles/gme.dir/Sap_Emu.cpp.obj
[ 82%] Building CXX object gme/CMakeFiles/gme.dir/Snes_Spc.cpp.obj
[ 85%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Cpu.cpp.obj
[ 87%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Dsp.cpp.obj
[ 89%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Emu.cpp.obj
[ 91%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Filter.cpp.obj
[ 93%] Building CXX object gme/CMakeFiles/gme.dir/Vgm_Emu.cpp.obj
[ 95%] Building CXX object gme/CMakeFiles/gme.dir/Vgm_Emu_Impl.cpp.obj
[ 97%] Building CXX object gme/CMakeFiles/gme.dir/Ym2413_Emu.cpp.obj
[100%] Linking CXX static library libgme.a
[100%] Built target gme
Installing /cygdrive/m/[...]/game-music-emu_git as make install
[100%] Built target gme
Install the project...
-- Install configuration: ""
-- Installing: /cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a
-- Installing: /cygdrive/m/[...]/i686-w64-mingw32/include/gme/gme.h
-- Installing: /cygdrive/m/[...]/i686-w64-mingw32/lib/pkgconfig/libgme.pc

LibGME is successfully built in the end, but I don't know what to think of the 'Data_Reader.cpp.obj' warnings. How bad are they?

Then, compiling FFmpeg. The following is an excerpt from FFmpeg's 'config.log'. It's the part where it fails to link against LibGME:

check_pkg_config libgme libgme gme/gme.h gme_new_emu
test_pkg_config libgme libgme gme/gme.h gme_new_emu
pkg-config --exists --print-errors libgme
check_func_headers gme/gme.h gme_new_emu -I/cygdrive/m/[...]/i686-w64-mingw32/include -L/cygdrive/m/[...]/i686-w64-mingw32/lib -lgme -lstdc++ -lz
check_ld cc -I/cygdrive/m/[...]/i686-w64-mingw32/include -L/cygdrive/m/[...]/i686-w64-mingw32/lib -lgme -lstdc++ -lz
check_cc -I/cygdrive/m/[...]/i686-w64-mingw32/include -L/cygdrive/m/[...]/i686-w64-mingw32/lib
BEGIN /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.gBHganzi/test.c
    1   #include <gme/gme.h>
    2   #include <stdint.h>
    3   long check_gme_new_emu(void) { return (long) gme_new_emu; }
    4   int main(void) { int ret = 0;
    5    ret |= ((intptr_t)check_gme_new_emu) & 0xFFFF;
    6   return ret; }
END /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.gBHganzi/test.c
/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_WIN32_WINNT=0x0600 -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -march=pentium3 -O2 -mfpmath=sse -msse -DCACA_STATIC -DLIBTWOLAME_STATIC -march=pentium3 -O2 -mfpmath=sse -msse -std=c11 -fomit-frame-pointer -pthread -I/cygdrive/m/[...]/i686-w64-mingw32/include -DLIBXML_STATIC -I/cygdrive/m/[...]/i686-w64-mingw32/include -I/cygdrive/m/[...]/i686-w64-mingw32/include/libxml2 -I/cygdrive/m/[...]/i686-w64-mingw32/include/fribidi -I/cygdrive/m/[...]/i686-w64-mingw32/include/freetype2 -I/cygdrive/m/[...]/i686-w64-mingw32/include -DLIBXML_STATIC -I/cygdrive/m/[...]/i686-w64-mingw32/include -I/cygdrive/m/[...]/i686-w64-mingw32/include/libxml2 -I/cygdrive/m/[...]/i686-w64-mingw32/include/freetype2 -I/cygdrive/m/[...]/i686-w64-mingw32/include -I/cygdrive/m/[...]/i686-w64-mingw32/include/bs2b -I/cygdrive/m/[...]/i686-w64-mingw32/include -DLIBXML_STATIC -I/cygdrive/m/[...]/i686-w64-mingw32/include -I/cygdrive/m/[...]/i686-w64-mingw32/include/libxml2 -I/cygdrive/m/[...]/i686-w64-mingw32/include/freetype2 -I/cygdrive/m/[...]/i686-w64-mingw32/include -I/cygdrive/m/[...]/i686-w64-mingw32/include/freetype2 -I/cygdrive/m/[...]/i686-w64-mingw32/include -I/cygdrive/m/[...]/i686-w64-mingw32/include/fribidi -I/cygdrive/m/[...]/i686-w64-mingw32/include -L/cygdrive/m/[...]/i686-w64-mingw32/lib -c -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.gBHganzi/test.o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.gBHganzi/test.c
/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -Wl,--large-address-aware -Wl,--nxcompat,--dynamicbase -Wl,--as-needed -Wl,--pic-executable,-e,_mainCRTStartup -I/cygdrive/m/[...]/i686-w64-mingw32/include -L/cygdrive/m/[...]/i686-w64-mingw32/lib -o /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.gBHganzi/test.exe /cygdrive/c/DOCUME~1/Admin/LOCALS~1/Temp/ffconf.gBHganzi/test.o -lgme -lstdc++ -lz
/cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a(gme.cpp.obj):gme.cpp:(.text+0x41c): undefined reference to `__assert_func'
/cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a(gme.cpp.obj):gme.cpp:(.text+0x534): undefined reference to `__assert_func'
/cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a(gme.cpp.obj):gme.cpp:(.text+0x1136): undefined reference to `__assert_func'
/cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a(gme.cpp.obj):gme.cpp:(.text+0x117c): undefined reference to `__assert_func'
/cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a(Gme_File.cpp.obj):Gme_File.cpp:(.text+0x25f): undefined reference to `__assert_func'
/cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a(Gme_File.cpp.obj):Gme_File.cpp:(.text$_Z24blargg_verify_byte_orderv[__Z24blargg_verify_byte_orderv]+0x37): more undefined references to `__assert_func' follow
collect2: error: ld returned 1 exit status

All the private libraries (-lstdc++ -lz) are there, but it fails nonetheless. I've searched the web for "undefined reference to __assert_func", but I can't find any explanation for this. Do you have any idea?

For now 'game-music-emu-0.6.2.tar.xz' does work all the way 'till the end.

Thanks.

-- Reino

Comments (6)

  1. Michael Pyne repo owner

    The errno warning is more concerning, that seems to indicate a build system confusion. There was a similar bug report recently with issue #16, but I was never able to figure out anything there other than that the build system seems broken somehow (even if it worked with 0.6.2).

    The signed compare warning is less of a concern, though I'll want to fix it anyways (god knows we've had enough integer confusion bugs in the past year or so).

    I'm not sure what to make of the __assert_func stuff, it feels like another build system hangup. By its name it would be used in the C standard "assert" function that we use -- but we used that in 0.6.2 (and much much earlier) as well. I did some searching myself and came to a suggestion from this page involving adding additional Cygwin libraries.

    You could also try less optimized linker flags (e.g. you seem to be using --as-needed, might try without that and see if it at least links properly).

    If you're comfortable with git-bisect then you might try to see if you could find the offending git commit (somewhere between the 0.6.2 tag and current master), that would help narrow it down as well.

    Either way if you do figure out something please let me know so I can at least get any buildsystem-specific notes documented since it seems like a repeated issue. I'm not trying to make this harder to build. :)

  2. Reino17

    I spent a lot of time trying to add -lcygwin, but it was all in vain.

    After closely examining 'CMakeCache.txt' however I noticed:

    ZLIB_INCLUDE_DIR:PATH=/usr/include
    ZLIB_LIBRARY:FILEPATH=/usr/lib/libz.dll.a
    

    I find it strange that this is the only place to find out that these parameters exist at all. 'CMakeLists.txt' and neither 'readme.txt' mention anything about this.

    Anyway, this meant LibGME was using Cygwin's own zlib library (v1.2.8) instead of zlib 1.2.11 that I had compiled and installed in my MingW directory. And thus after changing ZLIB_INCLUDE_DIR and ZLIB_LIBRARY:

    cmake -G"Unix Makefiles" . -DENABLE_STATIC_RUNTIME=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RANLIB=/cygdrive/m/[...]/bin/i686-w64-mingw32-ranlib -DCMAKE_C_COMPILER=/cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=/cygdrive/m/[...]/bin/i686-w64-mingw32-g++ -DCMAKE_RC_COMPILER=/cygdrive/m/[...]/bin/i686-w64-mingw32-windres -DCMAKE_INSTALL_PREFIX=/cygdrive/m/[...]/i686-w64-mingw32 -DBUILD_SHARED_LIBS=0 -DENABLE_UBSAN=0 -DZLIB_INCLUDE_DIR=/cygdrive/m/[...]/i686-w64-mingw32/include -DZLIB_LIBRARY=/cygdrive/m/[...]/i686-w64-mingw32/lib/libz.a
    -- The C compiler identification is GNU 7.3.0
    -- The CXX compiler identification is GNU 7.3.0
    -- Check for working C compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-gcc
    -- Check for working C compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-g++
    -- Check for working CXX compiler: /cygdrive/m/[...]/bin/i686-w64-mingw32-g++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test __LIBGME_TEST_VISIBILITY
    -- Performing Test __LIBGME_TEST_VISIBILITY - Success
    -- Performing Test __LIBGME_SWITCH_FALLTHROUGH_WARNINGS
    -- Performing Test __LIBGME_SWITCH_FALLTHROUGH_WARNINGS - Success
     ** ZLib library located, compressed file formats will be supported
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        ENABLE_STATIC_RUNTIME
    
    
    -- Build files have been written to: /cygdrive/m/[...]/game-music-emu_git
    
    Doing make in /cygdrive/m/[...]/game-music-emu_git as make  -j 1
    
    Scanning dependencies of target gme
    [  2%] Building CXX object gme/CMakeFiles/gme.dir/Blip_Buffer.cpp.obj
    [  4%] Building CXX object gme/CMakeFiles/gme.dir/Classic_Emu.cpp.obj
    [  6%] Building CXX object gme/CMakeFiles/gme.dir/Data_Reader.cpp.obj
    /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp: In member function 'virtual long int Std_File_Reader::read_avail(void*, long int)':
    /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:375:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      if ( file_ && s > 0 && s <= UINT_MAX ) {
                               ^
    In file included from /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:21:0:
    /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp: In member function 'virtual const char* Std_File_Reader::read(void*, long int)':
    /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:389:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
      RETURN_VALIDITY_CHECK( s > 0 && s <= UINT_MAX );
                                        ^
    /cygdrive/m/[...]/game-music-emu_git/gme/blargg_source.h:28:44: note: in definition of macro 'unlikely'
         #define unlikely( x ) __builtin_expect(x, 0)
                                                ^
    /cygdrive/m/[...]/game-music-emu_git/gme/Data_Reader.cpp:389:2: note: in expansion of macro 'RETURN_VALIDITY_CHECK'
      RETURN_VALIDITY_CHECK( s > 0 && s <= UINT_MAX );
      ^~~~~~~~~~~~~~~~~~~~~
    [  8%] Building CXX object gme/CMakeFiles/gme.dir/Dual_Resampler.cpp.obj
    [ 10%] Building CXX object gme/CMakeFiles/gme.dir/Effects_Buffer.cpp.obj
    [ 12%] Building CXX object gme/CMakeFiles/gme.dir/Fir_Resampler.cpp.obj
    [ 14%] Building CXX object gme/CMakeFiles/gme.dir/gme.cpp.obj
    [ 17%] Building CXX object gme/CMakeFiles/gme.dir/Gme_File.cpp.obj
    [ 19%] Building CXX object gme/CMakeFiles/gme.dir/M3u_Playlist.cpp.obj
    [ 21%] Building CXX object gme/CMakeFiles/gme.dir/Multi_Buffer.cpp.obj
    [ 23%] Building CXX object gme/CMakeFiles/gme.dir/Music_Emu.cpp.obj
    [ 25%] Building CXX object gme/CMakeFiles/gme.dir/Ay_Apu.cpp.obj
    [ 27%] Building CXX object gme/CMakeFiles/gme.dir/Ym2612_Emu.cpp.obj
    [ 29%] Building CXX object gme/CMakeFiles/gme.dir/Sms_Apu.cpp.obj
    [ 31%] Building CXX object gme/CMakeFiles/gme.dir/Ay_Cpu.cpp.obj
    [ 34%] Building CXX object gme/CMakeFiles/gme.dir/Ay_Emu.cpp.obj
    [ 36%] Building CXX object gme/CMakeFiles/gme.dir/Gb_Apu.cpp.obj
    [ 38%] Building CXX object gme/CMakeFiles/gme.dir/Gb_Cpu.cpp.obj
    [ 40%] Building CXX object gme/CMakeFiles/gme.dir/Gb_Oscs.cpp.obj
    [ 42%] Building CXX object gme/CMakeFiles/gme.dir/Gbs_Emu.cpp.obj
    [ 44%] Building CXX object gme/CMakeFiles/gme.dir/Gym_Emu.cpp.obj
    [ 46%] Building CXX object gme/CMakeFiles/gme.dir/Hes_Apu.cpp.obj
    [ 48%] Building CXX object gme/CMakeFiles/gme.dir/Hes_Cpu.cpp.obj
    [ 51%] Building CXX object gme/CMakeFiles/gme.dir/Hes_Emu.cpp.obj
    [ 53%] Building CXX object gme/CMakeFiles/gme.dir/Kss_Cpu.cpp.obj
    [ 55%] Building CXX object gme/CMakeFiles/gme.dir/Kss_Emu.cpp.obj
    [ 57%] Building CXX object gme/CMakeFiles/gme.dir/Kss_Scc_Apu.cpp.obj
    [ 59%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Apu.cpp.obj
    [ 61%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Cpu.cpp.obj
    [ 63%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Fme7_Apu.cpp.obj
    [ 65%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Namco_Apu.cpp.obj
    [ 68%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Oscs.cpp.obj
    [ 70%] Building CXX object gme/CMakeFiles/gme.dir/Nes_Vrc6_Apu.cpp.obj
    [ 72%] Building CXX object gme/CMakeFiles/gme.dir/Nsf_Emu.cpp.obj
    [ 74%] Building CXX object gme/CMakeFiles/gme.dir/Nsfe_Emu.cpp.obj
    [ 76%] Building CXX object gme/CMakeFiles/gme.dir/Sap_Apu.cpp.obj
    [ 78%] Building CXX object gme/CMakeFiles/gme.dir/Sap_Cpu.cpp.obj
    [ 80%] Building CXX object gme/CMakeFiles/gme.dir/Sap_Emu.cpp.obj
    [ 82%] Building CXX object gme/CMakeFiles/gme.dir/Snes_Spc.cpp.obj
    [ 85%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Cpu.cpp.obj
    [ 87%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Dsp.cpp.obj
    [ 89%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Emu.cpp.obj
    [ 91%] Building CXX object gme/CMakeFiles/gme.dir/Spc_Filter.cpp.obj
    [ 93%] Building CXX object gme/CMakeFiles/gme.dir/Vgm_Emu.cpp.obj
    [ 95%] Building CXX object gme/CMakeFiles/gme.dir/Vgm_Emu_Impl.cpp.obj
    [ 97%] Building CXX object gme/CMakeFiles/gme.dir/Ym2413_Emu.cpp.obj
    [100%] Linking CXX static library libgme.a
    [100%] Built target gme
    Installing /cygdrive/m/[...]/game-music-emu_git as make install
    [100%] Built target gme
    Install the project...
    -- Install configuration: ""
    -- Installing: /cygdrive/m/[...]/i686-w64-mingw32/lib/libgme.a
    -- Installing: /cygdrive/m/[...]/i686-w64-mingw32/include/gme/gme.h
    -- Installing: /cygdrive/m/[...]/i686-w64-mingw32/lib/pkgconfig/libgme.pc
    

    The errno warnings are now gone (the other warnings remain obviously) and above all, FFmpeg's configure is happy as well! No more errors.

    You can close this issue as far as I'm concerned. Thanks.

    -- Reino

  3. Michael Pyne repo owner

    Thanks for looking into this! I'll leave it open for now until I figure out a good way to fix the check for zlib to find static versions if we're doing a static build. Or until I give up and document that you need to either disable zlib or pass the right path yourself...

  4. Michael Pyne repo owner

    Search for static version of dependencies for static builds.

    I think this should fix Issue #17 (and #16, for that matter). If it does not, please reopen.

    Thanks to those who reported the bug and helped with tracking down the cause!

    → <<cset d3b0d6226873>>

  5. Reino17

    'CMakeCache.txt' now indeed shows the static library...

    ZLIB_INCLUDE_DIR:PATH=/usr/include
    ZLIB_LIBRARY:FILEPATH=/usr/lib/libz.a
    

    ...but it doesn't necessarily fix the specific issue I had, because even with Cygwin's static zlib I still get the "errno"-warnings.

    Cygwin's zlib I have installed is v1.2.8. To see if I perhaps need a minimum zlib version installed I've just compiled v1.2.8 myself and built LibGME again. No "errno"-warnings appeared, so I guess it's save to say this really is a Cygwin issue and I always have to point cmake to the right zlib path.

  6. Log in to comment