Failure to link with libjpeg.a using cmake configuration

Roger Leigh via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
Hi,

I’m trying to test libtiff on Cygwin, and I’m running into a failure.  It’s finding and linking on all platforms with the exception of Cygwin (including MinGW64 and MSVC).  For example:

https://gitlab.com/libtiff/libtiff/-/pipelines/2236584193

-- Found ZLIB: /usr/lib/libz.dll.a (found version "1.3.1")
-- Found Deflate: /usr/lib/libdeflate.dll.a (found version "1.25")
CMake Error at /usr/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake:99 (message):
The imported target "libjpeg-turbo::jpeg" references the file
"/usr/lib/libjpeg.dll.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake"
but not all the files it references.
Call Stack (most recent call first):
/usr/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake:37 (include)
cmake/JPEGCodec.cmake:36 (find_package)

It is entirely correct.  The file that’s mentioned in the installed CMake config file does not exist.

$ find lib -name '*jpeg*'
lib/cmake/libjpeg-turbo
lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake
lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
lib/cmake/libjpeg-turbo/libjpeg-turboTargets-relwithdebinfo.cmake
lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake
lib/gdk-pixbuf-2.0/2.10.0/loaders/cygpixbufloader-jpeg.dll
lib/libopenjpeg.dll.a
lib/libturbojpeg.dll.a
lib/openjpeg-1.5
lib/pkgconfig/libopenjpeg.pc
lib/pkgconfig/libopenjpeg1.pc
lib/pkgconfig/libturbojpeg.pc

$ find bin -name '*jpeg*'
bin/cygjpeg-8.dll
bin/cygopenjpeg-1.dll
bin/cygturbojpeg-0.dll

So the DLL exists, but the import library does not.  Everything else is present and correct as far as I can tell, but something is not right here.  The import library is missing.

$ grep '\.a' lib/cmake/libjpeg-turbo/*
lib/cmake/libjpeg-turbo/libjpeg-turboTargets-relwithdebinfo.cmake:  IMPORTED_IMPLIB_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libjpeg.dll.a"
lib/cmake/libjpeg-turbo/libjpeg-turboTargets-relwithdebinfo.cmake:list(APPEND _cmake_import_check_files_for_libjpeg-turbo::jpeg "${_IMPORT_PREFIX}/lib/libjpeg.dll.a" "${_IMPORT_PREFIX}/bin/cygjpeg-8.dll" )
lib/cmake/libjpeg-turbo/libjpeg-turboTargets-relwithdebinfo.cmake:  IMPORTED_IMPLIB_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libturbojpeg.dll.a"
lib/cmake/libjpeg-turbo/libjpeg-turboTargets-relwithdebinfo.cmake:list(APPEND _cmake_import_check_files_for_libjpeg-turbo::turbojpeg "${_IMPORT_PREFIX}/lib/libturbojpeg.dll.a" "${_IMPORT_PREFIX}/bin/cygturbojpeg-0.dll" )

Because it’s referenced in the configuration, and has the DLL, and everything but this file is installed, this looks like a packaging error hence reporting it here as a bug.


Kind regards,
Roger

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.