Skip to content
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

[package] libjxl/*: usage in libvips fails with link error #26465

Open
Julianiolo opened this issue Jan 25, 2025 · 1 comment · May be fixed by #26473
Open

[package] libjxl/*: usage in libvips fails with link error #26465

Julianiolo opened this issue Jan 25, 2025 · 1 comment · May be fixed by #26473
Assignees
Labels
bug Something isn't working

Comments

@Julianiolo
Copy link
Contributor

Description

When building libvips with the option with_jpeg_xl=True the linking of the libvips executables fails, due to a unresolved external symbol JxlGetDefaultCms

I was first thinking this is a libvips issue, but it seems like that is not the case

So currently my guess is that this is a libjxl issue?

I tested using JxlGetDefaultCms() in the test package for libjxl, which worked. (Maybe the problem is also that libvips uses meson, while the test package uses cmake?)

I tested versions 0.11.1 and 0.6.1 but I think this might be more of a conan recipe issue?

Package and Environment Details

  • Package Name/Version: libjxl/0.11.1
  • Operating System+version: Windows 11
  • Compiler+version: MSVC 19.42.34433.0
  • Conan version: conan 2.11.0
  • Python version: Python 3.11.3

Conan profile

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.version=194
os=Windows

Steps to reproduce

conan create all/conanfile.py --version=8.16.0 -o "libvips/*:with_jpeg_xl=True"

Logs

Click to expand log
[380/383] Linking target tools/vipsedit.exe
FAILED: tools/vipsedit.exe
"link" @tools/vipsedit.exe.rsp
   Creating library tools\vipsedit.lib and object tools\vipsedit.exp
jxl.lib(encode.obj) : error LNK2019: unresolved external symbol JxlGetDefaultCms referenced in function JxlEncoderCreate
jxl.lib(enc_jpeg_data.obj) : error LNK2001: unresolved external symbol JxlGetDefaultCms
tools\vipsedit.exe : fatal error LNK1120: 1 unresolved externals
[381/383] Linking target tools/vips.exe
FAILED: tools/vips.exe
"link" @tools/vips.exe.rsp
   Creating library tools\vips.lib and object tools\vips.exp
jxl.lib(encode.obj) : error LNK2019: unresolved external symbol JxlGetDefaultCms referenced in function JxlEncoderCreate
jxl.lib(enc_jpeg_data.obj) : error LNK2001: unresolved external symbol JxlGetDefaultCms
tools\vips.exe : fatal error LNK1120: 1 unresolved externals
[382/383] Linking target tools/vipsthumbnail.exe
FAILED: tools/vipsthumbnail.exe
"link" @tools/vipsthumbnail.exe.rsp
   Creating library tools\vipsthumbnail.lib and object tools\vipsthumbnail.exp
jxl.lib(encode.obj) : error LNK2019: unresolved external symbol JxlGetDefaultCms referenced in function JxlEncoderCreate
jxl.lib(enc_jpeg_data.obj) : error LNK2001: unresolved external symbol JxlGetDefaultCms
tools\vipsthumbnail.exe : fatal error LNK1120: 1 unresolved externals
[383/383] Linking target tools/vipsheader.exe
FAILED: tools/vipsheader.exe
"link" @tools/vipsheader.exe.rsp
   Creating library tools\vipsheader.lib and object tools\vipsheader.exp
jxl.lib(encode.obj) : error LNK2019: unresolved external symbol JxlGetDefaultCms referenced in function JxlEncoderCreate
jxl.lib(enc_jpeg_data.obj) : error LNK2001: unresolved external symbol JxlGetDefaultCms
tools\vipsheader.exe : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.

libvips/8.16.0: ERROR: 
Package '55e22a47953bd24f607f9bdb599ace51870b7ba8' build failed
libvips/8.16.0: WARN: Build folder C:\Users\examp\.conan2\p\b\libvi77860d0ece1e5\b\build-release
ERROR: libvips/8.16.0: Error in build() method, line 322
        meson.build()
        ConanException: Error 1 while executing
@Julianiolo Julianiolo added the bug Something isn't working label Jan 25, 2025
@Julianiolo
Copy link
Contributor Author

When looking at the .pc files in the conan folder of the libvips build, the ones for libjxl look like this:

libjxl.pc

prefix=C:/Users/examp/.conan2/p/b/libjx3f2897d75e88b/p
libdir=${prefix}/lib
includedir=${prefix}/include
bindir=${prefix}/bin

Name: libjxl
Description: Conan component: libjxl-libjxl
Version: 0.11.1
Libs: -L"${libdir}" -ljxl
Cflags: -I"${includedir}" -DJXL_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE
Requires: brotli highway lcms2

(note no mention of libjxl_cms in the Requires)

While for example:

brotli.pc

prefix=C:/Users/examp/.conan2/p/brotl79757a5cae055/p
libdir=${prefix}/lib
includedir=${prefix}/include
bindir=${prefix}/bin

Name: brotli
Description: Conan package: brotli
Version: 1.1.0
Libs: -L"${libdir}"
Cflags: -I"${includedir}"
Requires: libbrotlicommon libbrotlidec libbrotlienc

mentions it's subcomponents in the requires

I am not sure on how conan handles this, but this might be the/an issue?

@AbrilRBS AbrilRBS linked a pull request Jan 27, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants