mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
571 stars 176 forks source link

2.15: failure to build fastfloat plugin on mingw64 #381

Closed cissou8 closed 1 year ago

cissou8 commented 1 year ago

Hi,

We are trying to include your wonderful library in our astromony package (siril.org) to handle correctly color profiles, including the fastfloat plugin. Currenly, our build for windows through msys2/mingw64 fails (https://gitlab.com/free-astro/siril/-/jobs/4351273352#L989) fails.

I've tried to investigate a bit, starting from the last recipe on mingw repo (https://github.com/msys2/MINGW-packages/blob/b9a5c1785f48d6a6c1d41c8df2b9a2ba216a7ffb/mingw-w64-lcms2/PKGBUILD). Tried patching the meson files in many different ways to no avail. Finally figured I should just try to rebuild the package with the fastfloat plugin enabled (adding -Dfastfloat=true to meson setup), but it fails with the same errors as in our own build:

FAILED: plugins/fast_float/src/liblcms2_fast_float.dll
"gcc"  -o plugins/fast_float/src/liblcms2_fast_float.dll plugins/fast_float/src/plugins_fast_float_src_lcms2_fast_float.rc_lcms2_fast_float.o plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_16_tethra.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_curves.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_matsh.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_matsh_sse.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_tethra.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_15bits.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_15mats.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_cmyk.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_curves.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_lab.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_matsh.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_separate.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_sup.c.obj plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_tethra.c.obj "-Wl,--allow-shlib-undefined" "-shared" "-Wl,--start-group" "-Wl,--out-implib=plugins/fast_float/src/liblcms2_fast_float.dll.a" "-pipe" "-march=nocona" "-msahf" "-mtune=generic" "-O2" "-Wp,-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-D__USE_MINGW_ANSI_STDIO=1" "src/liblcms2.dll.a" "-lm" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32" "-Wl,--end-group"
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_16_tethra.c.obj:fast_16_tethra:(.text+0xfe): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_16_tethra.c.obj:fast_16_tethra:(.text+0xcd5): undefined reference to `_cmsOptimizePipeline'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_curves.c.obj:fast_8_curves.:(.text+0xca): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_curves.c.obj:fast_8_curves.:(.text+0x44c): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_curves.c.obj:fast_8_curves.:(.text+0x7a2): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_curves.c.obj:fast_8_curves.:(.text+0x9e0): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_matsh.c.obj:fast_8_matsh.c:(.text+0xc6): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_matsh_sse.c.obj:fast_8_matsh_s:(.text+0x11a): more undefined references to `_cmsGetTransformFlags' follow
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_8_tethra.c.obj:fast_8_tethra.:(.text+0x922): undefined reference to `_cmsReasonableGridpointsByColorspace'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_15mats.c.obj:fast_float_15mats.c:(.text+0xc6): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_cmyk.c.obj:fast_float_cmy:(.text+0x155): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_cmyk.c.obj:fast_float_cmy:(.text+0xe3e): undefined reference to `_cmsReasonableGridpointsByColorspace'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_curves.c.obj:fast_float_curves.c:(.text+0xbd): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_curves.c.obj:fast_float_curves.c:(.text+0x404): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_curves.c.obj:fast_float_curves.c:(.text+0x67e): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_curves.c.obj:fast_float_curves.c:(.text+0xa6e): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_lab.c.obj:fast_float_lab:(.text+0x280): undefined reference to `_cmsGetTransformFlags'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_matsh.c.obj:fast_float_mat:(.text+0x140): more undefined references to `_cmsGetTransformFlags' follow
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: plugins/fast_float/src/liblcms2_fast_float.dll.p/fast_float_tethra.c.obj:fast_float_tethra.c:(.text+0x99e): undefined reference to `_cmsReasonableGridpointsByColorspace'
collect2.exe: error: ld returned 1 exit status

If I install the previous package (2.14-2) directly from mingw archive, that was build with make, it works. So I guess it has to do with the recently introduced meson build. I hear it is still experimental, but anything I can try to help fix this?

Cheers,

Cecile

mm2 commented 1 year ago

Thanks for reporting. This already fixed. Please use development sources or wait until 2.16. Development source, the code in github, is fine anyway.

cissou8 commented 1 year ago

Oops, I did not find it in the closed tickets. I'll devise smthg to build from the sources untill your next release. Thanks for the prompt reply!