-
Notifications
You must be signed in to change notification settings - Fork 208
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
Linker Error when building everything from scratch on Windows 10 #2477
Comments
Thanks for the report. Try changing line 18 in
The issue is that You can also add |
That didn't quite work with a clean build, add |
Do you still want me to make the change to LocalJpeg.cmake.txt? |
I'm sorry for the confusion, I'm not sure where I got line 63 from. Yes, please try line 18. |
substituted: added -DCMAKE_BUILD_TYPE=Release added: Result: session log: |
Thanks for trying it out. I don't think this on its own is a good fix for multi-config generators like Visual Studio and Ninja Multi-Config given the reliance on @vrabaud any thoughts? I tried using $ in various places, but |
The resulting executables; avifenc.exe and avifdec.exe both seem to work ok but my testing was not exhaustive. Oct 17> Tested for debug and it also linked ok, in fact there were fewer errors. |
What "not found" errors are you referring to? For the tests, if I configure with
|
In my comment, I am referring back to the build process itself. Take a look at the session log from Oct16. |
In the build log, many of the 'not found' messages are related to tests that cmake is doing related to build and platform detection. Things like the following are to be expected during the configuration steps and can be ignored unless cmake exits with an error. Some of this output could likely be hidden, but in the case of failures it is helpful to have the configuration steps in the log.
|
Ok, thanks, that's good to know, everything looks good from my end. Thanks for the help. |
Thanks for raising the issue and working through it. I think there still would be some benefit to fixing some of the paths mentioned in the report when using the Visual Studio generator or Ninja Multi-Config. |
+1 for finding a proper fix. SVT-AV1 built with Visual Studio & LLVM is significantly faster than with MSYS2 & LLVM (i.e. media autobuild suite), and for avif encoding this is important, too... |
Reopening this for visibility. |
Replacing these 2 lines works. @jzern could LocalJpeg.cmake not only check for if(MSVC), but for CMAKE_BUILD_TYPE being set, too - and set(LIB_FILENAME... to either the location with or without CMAKE_BUILD_TYPE? If not, simply changing these two lines by default probably works, too - if CMAKE_BUILD_TYPE isn't set, then the path to the lib would just contain a double / instead of single / |
Checking for both |
When building everything from scratch following the guidelines in the README.MD file, https://github.com/AOMediaCodec/libavif?tab=readme-ov-file#build-everything-from-scratch
I get a linker error in the build using the build command: cmake --build libavif/build --parallel
The Linker error is:
LINK : warning LNK4044: unrecognized option '/static'; ignored [E:\Dev\libavif\build\avifdec.vcxproj]
LINK : fatal error LNK1104: cannot open file 'libjpeg\src\libjpeg-build\jpeg-static.lib' [E:\Dev\libavif\build\avifdec.
vcxproj]
LINK : warning LNK4044: unrecognized option '/static'; ignored [E:\Dev\libavif\build\avifenc.vcxproj]
LINK : fatal error LNK1104: cannot open file 'libjpeg\src\libjpeg-build\jpeg-static.lib' [E:\Dev\libavif\build\avifenc.
vcxproj]
the build process is looking in the libjpeg\src\libjpeg-build folder instead of the libjpeg\src\libjpeg-build\debug folder.
There are a number of CMake errors, one possibly related to the Linker error is:
-- Could NOT find JPEG (missing: JPEG_LIBRARY)
I have Windows 10 and Visual Studio 2022 installed.
session log:
session-log.txt
The text was updated successfully, but these errors were encountered: