Open maj0e opened 2 years ago
I'm running into this too. libjpeg-turbo
is a dependency of SDL2_image
in my case. I'm not cross-compiling static, but I am cross compiling (nix-build -A pkgsCross.mingwW64.libjpeg_turbo
)
I tried editing the patch to not include the __attribute__((weak))
but I still got the same failure.
My overlay & patches can be found in this MR for my project.
IIRC there was a good reason for making it weak. Cant' remember what it was though.
Steps To Reproduce
Cross-compiling
libjpeg
formingwW64
andmingw32
fails with undefined references:or
Build log
Additional context
While cross-compiling
embree2
statically for mingwW64, I encountered that the build already fails for its dependency libjpeg, with an undefined reference to some functions. I saw that the patch0001-Compile-transupp.c-as-part-of-the-library.patch
is applied to make these functions part of the library. The additional attribute((weak)) attribute is assigned to these function declarations in this patch, which according to this isn't supported by mingw. Therefore the build fails at the linking stage.Unfortunately I don't know of a mingw specific fix or workaround.
Notify maintainers
Maintainers: @vcunat @colemickens @kamadorueda
Author of the mentioned patch: @L-as
Metadata