openframeworks/openFrameworks

[actions] issue with msys2 - cannot find -lglfw3dll

Closed this issue · 8 comments

Actions are failing in msys2 since last week

D:/a/_temp/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lglfw3dll: No such file or directory

I've installed locally msys2 in a machine and it seems to work well, even compiling the same file that fails in github actions.
Any idea of what can be causing this?
@oxillo @danoli3

disabling silent we can see the complete linker invocation here

/mingw64/bin/g++ -o bin/msys2_debug.exe  obj/msys2/Debug/src/main.o obj/msys2/Debug/src/ofApp.o obj/msys2/Debug/icon-debug.res  /d/a/openFrameworks/openFrameworks/libs/openFrameworksCompiled/lib/msys2/libopenFrameworksDebug.a  -lpthread -Wl,--disable-dynamicbase,--disable-high-entropy-va,--default-image-base-low -mwindows /d/a/openFrameworks/openFrameworks/libs/kiss/lib/msys2/libkiss.a /d/a/openFrameworks/openFrameworks/libs/tess2/lib/msys2/libtess2.a /d/a/openFrameworks/openFrameworks/libs/videoInput/lib/msys2/libvideoinput.a -lcairo -lz -lssl -lcrypto -lfreetype -lglew32 -lglfw3dll -lcurl -luriparser -lopenal -lpugixml -lrtaudio -lsndfile -lmpg123 -lksuser -lopengl32 -lgdi32 -lmsimg32 -lglu32 -ldsound -lwinmm -lstrmiids -luuid -lole32 -loleaut32 -lsetupapi -lwsock32 -lws2_32 -lIphlpapi -lComdlg32 -lfreeimage -lboost_filesystem-mt -lboost_system-mt -lmf -lmfplat -lmfuuid -lmfreadwrite

I was able to fix it experimentally by removing glfw from

PLATFORM_PKG_CONFIG_LIBRARIES += glfw3

and adding to

PLATFORM_LIBRARIES += glfw3

closed by #7842

Seems MYSYS2 PKG glfw3 uses C++ Dynamic Link rather than static hence the + DLL error

latest GLFW version (3.3.9) released on 13-dec fixes a pkg-config bug

[Win32] Fix pkg-config for dynamic library on Windows (#2386, #2420)

I guess that MSYS2 recipe hasn't been updated to reflect this change.

hello @oxillo, what do you recommend us to do in this case?
revert this PR after the recipe starts pointing to 3.3.9 ?

The MSYS2 team has released a patch of GLFW 3.3.9 that reverts to the old behavior.
I guess we should also revert !