Skip to content

Conversation

@Locke
Copy link

@Locke Locke commented Dec 29, 2025

This is a rough/potential start for #29 on Windows.
I'm lacking experience with C/C++ on Windows to really work on this and don't even know if this is the right approach.
But I think this could be a good starting point for someone who does and take this over.

Marked as draft due to open topics:

  1. I don't know if this is the right approach regarding setup of the toolchains/dependencies.
  2. Build is failing and I can't judge if it is due to the setup or issue in the codebase.
  3. Only the first commit should be merged, the later two are for debugging the build issue and should be dropped once the build is sucessfull.
  4. This is only for MSVC, LLVM still needs to be addressed.

Currently, windows build fails in CI with:

```
Error renaming from "D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d.a" to "D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d_deb.lib": No error
NMAKE : fatal error U1077: 'echo >nul && "C:\Program Files\CMake\bin\cmake.exe" -E rename D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d.a D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d_deb.lib' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\DAVID.dir\build.make /nologo -SL                 CMakeFiles\DAVID.dir\build' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -SL                 CMakeFiles\DAVID.dir\all' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -S                  DAVID' : return code '0x2'
Stop.
Error: Process completed with exit code 1.
```

The first line `No error` does actually mean `file not found` [1].

Adding some echo to debug this.

[1] https://gitlab.kitware.com/cmake/cmake/-/issues/16345
This seems not to be needed, having it as a precaution in case it would
fix any future issues.
Should be re-visited for dropping this patch.

Background:
The GitHub Actions runner on Windows have Strawberry Perl,
which puts their pkg-config on the PATH.

Meson is ignoring that explicitly, as it caused issues in meson to use
Strawberry Perl's pkg-config.

While trying to fix another build issue,
I noticed that meson had a warning about this.
I'm not sure if pkg-config is needed for the build;
for now better to have a proper one than a broken one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant