build-win64-mxe icon indicating copy to clipboard operation
build-win64-mxe copied to clipboard

linking to vips failed on Windows with msys64

Open aisnote opened this issue 3 months ago • 3 comments

failed with vips version: 8.14.

I used govips like: // #cgo pkg-config: vips

There is no this issue on 8.10.

C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgio-2.0: No such file or directory C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lintl: No such file or directory C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmodule-2.0: No such file or directory C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lintl: No such file or directory C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lintl: No such file or directory

vips.pc.

prefix=/data/mxe/usr/x86_64-w64-mingw32.static.posix.web includedir=${prefix}/include libdir=${prefix}/lib

Name: vips Description: Image processing library Version: 8.14.5 Requires: glib-2.0 >= 2.40, gio-2.0, gobject-2.0 Requires.private: expat, zlib >= 0.4, libarchive >= 3.0.0, imagequant, cgif >= 0.2.0, libexif >= 0.6, libjpeg, spng >= 0.7, libwebp >= 0.6, libwebpmux >= 0.6, libwebpdemux >= 0.6, pangocairo >= 1.32.6, pangoft2 >= 1.32.6, fontconfig, libtiff-4, librsvg-2.0 >= 2.40.3, cairo >= 1.2, lcms2, orc-0.4 >= 0.4.11, libheif >= 1.4.0 Libs: -L${libdir} -lvips Libs.private: -lm -lintl Cflags: -I${includedir}

aisnote avatar Mar 30 '24 23:03 aisnote

This looks like multiple, conflicting versions of vips on the same machine. Please ensure all previous versions are removed, plus you'll probably need to rebuild govips from source (but please note we cannot help with govips).

lovell avatar Mar 31 '24 08:03 lovell

See: https://github.com/libvips/build-win64-mxe/issues/63#issuecomment-2043325440.

kleisauke avatar Apr 08 '24 17:04 kleisauke

Alternatively, I think these relocatable pkg-config files would work for the -static variant:

vips.pc:

prefix=${pcfiledir}/../..
libdir=${prefix}/lib
includedir=${prefix}/include

Name: vips
Description: Image processing library
Version: 8.15.2
Libs: -L${libdir} -lvips
Cflags: -I${includedir} -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include -mms-bitfields

vips-cpp.pc:

prefix=${pcfiledir}/../..
libdir=${prefix}/lib
includedir=${prefix}/include

Name: vips-cpp
Description: C++ API for vips8 image processing library
Version: 8.15.2
Requires: vips
Libs: -L${libdir} -lvips-cpp
Cflags: -I${includedir}

kleisauke avatar Apr 08 '24 18:04 kleisauke