CMake + MinGW - libmpg123 build error
Brought to you by:
sobukus
[build] FAILED: src/libmpg123/libmpg123.dll src/libmpg123/libmpg123.dll.a [build] C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/libmpg123/CMakeFiles/libmpg123.dir/C_/msys64/home/evpobr/libmpg123/trunk/src/libmpg123/frame.c.obj: in function `wrap_getcpuflags': [build] C:/msys64/home/evpobr/libmpg123/trunk/src/libmpg123/getcpuflags.h:54: undefined reference to `INT123_getcpuflags' [build] C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: src/libmpg123/CMakeFiles/libmpg123.dir/C_/msys64/home/evpobr/libmpg123/trunk/src/libmpg123/optimize.c.obj: in function `wrap_getcpuflags': [build] C:/msys64/home/evpobr/libmpg123/trunk/src/libmpg123/getcpuflags.h:54: undefined reference to `INT123_getcpuflags'
It happens because HAVE_FPU
is set to 0
in ports/cmake/src/CMakeLists.txt
:
cmake_host_system_information(RESULT HAVE_FPU QUERY HAS_FPU)
CMake bug?
Quick workaround - i guess it is safe to set HAVE_FPU
to 1
for Windows platform:
if(WIN32) set(HAVE_FPU 1) else() cmake_host_system_information(RESULT HAVE_FPU QUERY HAS_FPU) endif()
Oh, somehow I missed that one. Can you confirm that this is needed also with a current CMake?
I'd put it into the 1.28.1 release, then.
Yes, all patches are needed.
OK, It's in svn now. I should prepare 1.28.1 shortly, then.
Are you in touch with CMake or MinGW upstream to investigate and fix the root cause?