-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failing on MSYS2 due to zlibstatic and png_static libraries not being found #559
Comments
MSYS2 is not a supported build configuration as per README. Is there a reason you're going for MSYS2 with external dependencies rather than MSVC or MinGW with vendored dependencies? They are vendored specifically to prevent this kind of issue. |
Wait, I think I misunderstood your setup. You are using vendored dependencies, right? Just the compiler and git from MSYS2. |
Here's the clean configure output:
So it looks to me like it (correctly) finds zlib and png, but the link names are overriden? After setting
Yes, git and compilers are from MSYS. |
Right, OK, indeed the build gets confused about which libz/libpng it should be using, for similar reasons as it did on Apple. I think the right change here would be to force vendored depenencies on Windows always. |
It looks like FindVendoredPackage first calls I don't understand this CMake file completely, but I applied this patch: diff --git a/cmake/FindVendoredPackage.cmake b/cmake/FindVendoredPackage.cmake
index 6227f6c..1404740 100644
--- a/cmake/FindVendoredPackage.cmake
+++ b/cmake/FindVendoredPackage.cmake
@@ -16,6 +16,9 @@ include(DisableWarnings)
function(find_vendored_package PKG_NAME PKG_PATH)
if(NOT FORCE_VENDORED_${PKG_NAME})
find_package(${PKG_NAME})
+ if(${VAR_NAME}_FOUND)
+ return()
+ endif()
endif()
set(cfg_name) Which changed the configure output to:
Which looks more promising. I'm running the build now, but it's not terribly fast. |
It broke freetype (not unexpectedly), but after forcing that to be vendored it failed to link solvespace-cli due to not finding zlib and png symbols. I don't really understand CMake, so that's as far as I can go on making this play well together, unfortunately. |
This has lead to linker problems if the environment does have standard versions of zlib/png (like from MSYS2), see discussion in referenced issue Closes solvespace#559
System information
SolveSpace version: current HEAD – 6017ecd
Operating system: Windows 10
Expected behavior
SolveSpace builds.
Actual behavior
Given the following setup:
The following error occurs:
The commandline is
With the following in
CMakeFiles/solvespace-cli.dir/linklibs.rsp
:When configured for Ninja, the linker arguments are inlined, but to the same effect.
I found these specified on L153, under an
if(WIN32)
:But I can't see any related artifacts in
extlib
:Or anywhere at all,
find | grep zlib
andfind | grep png
get nothing whilefind .. | grep [lib]
give me just the git module and the source.I've always assumed this was a problem with my less-than-pretty desktop config, and patched
build.ninja
to link to the shared versions I have from MSYS2, but I've reproduced this today on the official Windows VM image.The text was updated successfully, but these errors were encountered: