Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 860135 - media-libs/libjxl - please add useflag to allow using either system-highway or internal highway
Summary: media-libs/libjxl - please add useflag to allow using either system-highway o...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Daniel Novomeský
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-22 17:29 UTC by tt_1
Modified: 2024-03-06 05:06 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-07-22 17:29:54 UTC
hey there, 

can you please allow the users to make a choice between the internal fork of highway libjxl ships, and the system highway? 

at the moment =libxjl-9999 is broken on arm64 due to a problem with =highway-9999, and this only showed as the internal fork and the head of git are out of sync too much. 

thank you
Comment 1 Andreas Sturmlechner gentoo-dev 2022-07-23 09:48:28 UTC
Maybe don't use dev-cpp/highway-9999 then?
Comment 2 tt_1 2022-07-25 08:59:46 UTC
at the moment its broken either way: 

emerge-aarch64-unknown-linux-gnu -pv dev-cpp/highway

Calculating dependencies... done!
[ebuild   R   ~] dev-cpp/highway-0.17.0::gentoo to /usr/aarch64-unknown-linux-gnu/ USE="-test" 0 KiB


makes libjxl (current head of git) fail to compile: 

FAILED: lib/CMakeFiles/jxl_dec-obj.dir/jxl/dec_external_image.cc.o 
/usr/bin/aarch64-unknown-linux-gnu-g++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=7 -DJPEGXL_PATCH_VERSION=0 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/var/tmp/portage/portage/media-libs/libjxl-9999/work/libjxl-9999 -I/var/tmp/portage/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/include -I/var/tmp/portage/portage/media-libs/libjxl-9999/work/libjxl-9999_build-.arm64/lib/include  -O2 -pipe -fomit-frame-pointer -fno-rtti -funwind-tables -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fmacro-prefix-map=/var/tmp/portage/portage/media-libs/libjxl-9999/work/libjxl-9999=. -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -fsized-deallocation -fno-exceptions -fmath-errno -DJPEGXL_ENABLE_SKCMS=1 -DJPEGXL_BUNDLE_SKCMS=1 -std=c++11 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/dec_external_image.cc.o -MF lib/CMakeFiles/jxl_dec-obj.dir/jxl/dec_external_image.cc.o.d -o lib/CMakeFiles/jxl_dec-obj.dir/jxl/dec_external_image.cc.o -c /var/tmp/portage/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/dec_external_image.cc
/usr/aarch64-unknown-linux-gnu/usr/include/hwy/targets.h: In function ‘std::vector<unsigned int> hwy::SupportedAndGeneratedTargets()’:
<command-line>: error: ‘HWY_SVE_256’ was not declared in this scope; did you mean ‘HWY_SVE2’?
<command-line>: error: ‘HWY_SVE2_128’ was not declared in this scope; did you mean ‘HWY_SVE2’?
In file included from /usr/aarch64-unknown-linux-gnu/usr/include/hwy/highway.h:25,
                 from /var/tmp/portage/portage/media-libs/libjxl-9999/work/libjxl-9999/lib/jxl/dec_external_image.cc:19:
/usr/aarch64-unknown-linux-gnu/usr/include/hwy/targets.h: In member function ‘size_t hwy::ChosenTarget::GetIndex() const’:
<command-line>: error: ‘HWY_SVE_256’ was not declared in this scope; did you mean ‘HWY_SVE2’?
<command-line>: error: ‘HWY_SVE2_128’ was not declared in this scope; did you mean ‘HWY_SVE2’?
Comment 3 Daniel Novomeský 2022-07-27 12:35:32 UTC
It is the fact that
media-libs/libjxl-9999 (live ebuild) doesn't work with
dev-cpp/highway-0.17.0 (latest stable release)

But on my system (amd64), the following works now:
emerge -1 "=dev-cpp/highway-9999" "=media-libs/libjxl-9999"

Can you confirm or deny whether installing highway-9999 first and media-libs/libjxl-9999 immediately afterwards works?

Using bundled (submodule) highway would be theoretically possible only in the live ebuild, but there will be conditional conflict with system highway, so we will need strong blocker there.

However we try to avoid bundled dependencies as much as possible, so I am unsure if it will be OK for the Gentoo developers.

At least we can upgrade the highway dependency in libjxl-9999 to indicate that dev-cpp/highway newer than 0.17.0 is needed.
Comment 4 tt_1 2022-07-27 12:47:15 UTC
The problem I see is: media-libs/libjxl is an incredible fragile package on arm, and to a lesser extent on arm64 as well. It requires almost constant attention to ensure that major releases are free of compile regressions. 

Now, to take care of that I use the live ebuilds of both libjxl and highway. Some two weeks ago I learned that upstream of media-libs/libjxl doesn't support system-highway for the dev branch (media-libs/libxjl-9999 that is); so any divergence between system-highway-9999 and the internal fork/copy of highway inside of libjxl is a problem. 

The failed build.log snippet I shared has since been fixed - it was arm64 specific anyway.
Comment 5 5FBCDB43 2023-02-02 13:18:19 UTC
I'm on amd64. I am using the highway and libjxl that portage pulls in. At the moment it's libjxl 0.8.0 and highway 1.0.1.

I need to manually disable system highway because libjxl doesn't compile. It spits out this error:

-------------------

[8/230] /usr/bin/x86_64-pc-linux-gnu-g++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=0 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0 -I/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0/lib/include -I/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0_build-abi_x86_64.amd64/lib/include  -march=bdver2 -O2 -pipe -fno-rtti -funwind-tables -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fmacro-prefix-map=/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0=. -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -fsized-deallocation -fno-exceptions -fmath-errno -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o -MF lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o.d -o lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o -c /var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0/lib/jxl/base/random.cc
FAILED: lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DHWY_DISABLED_TARGETS="(HWY_SVE|HWY_SVE2|HWY_SVE_256|HWY_SVE2_128|HWY_RVV)" -DJPEGXL_MAJOR_VERSION=0 -DJPEGXL_MINOR_VERSION=8 -DJPEGXL_PATCH_VERSION=0 -DJXL_INTERNAL_LIBRARY_BUILD -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -I/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0 -I/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0/lib/include -I/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0_build-abi_x86_64.amd64/lib/include  -march=bdver2 -O2 -pipe -fno-rtti -funwind-tables -fno-omit-frame-pointer -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fmacro-prefix-map=/var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0=. -Wno-builtin-macro-redefined -Wall -fmerge-all-constants -fno-builtin-fwrite -fno-builtin-fread -Wextra -Wc++11-compat -Warray-bounds -Wformat-security -Wimplicit-fallthrough -Wno-register -Wno-unused-function -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wvla -fsized-deallocation -fno-exceptions -fmath-errno -DJPEGXL_ENABLE_TRANSCODE_JPEG=1 -DJPEGXL_ENABLE_BOXES=1 -std=c++11 -MD -MT lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o -MF lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o.d -o lib/CMakeFiles/jxl_dec-obj.dir/jxl/base/random.cc.o -c /var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0/lib/jxl/base/random.cc
/usr/local/include/hwy/targets.h: In function ‘std::vector<unsigned int> hwy::SupportedAndGeneratedTargets()’:
<command-line>: error: ‘HWY_SVE’ was not declared in this scope; did you mean ‘HWY_IDE’?
<command-line>: error: ‘HWY_SVE2’ was not declared in this scope; did you mean ‘HWY_SSE4’?
<command-line>: error: ‘HWY_SVE_256’ was not declared in this scope
<command-line>: error: ‘HWY_SVE2_128’ was not declared in this scope
In file included from /usr/local/include/hwy/highway.h:24,
                 from /var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0/lib/jxl/fast_math-inl.h:15,
                 from /var/tmp/portage/media-libs/libjxl-0.8.0/work/libjxl-0.8.0/lib/jxl/base/random.cc:8:
/usr/local/include/hwy/targets.h: In member function ‘size_t hwy::ChosenTarget::GetIndex() const’:
<command-line>: error: ‘HWY_SVE’ was not declared in this scope; did you mean ‘HWY_IDE’?
<command-line>: error: ‘HWY_SVE2’ was not declared in this scope; did you mean ‘HWY_SSE4’?
<command-line>: error: ‘HWY_SVE_256’ was not declared in this scope
<command-line>: error: ‘HWY_SVE2_128’ was not declared in this scope

---------------------

It might be an upstream issue, I don't know. In any case, the package does not compile currently.

When the "bundled" highway is used this error does not happen. (BTW remember to remove hwy headers from image/ before qmerge.)
Comment 6 Daniel Novomeský 2023-02-02 14:15:24 UTC
Can you test if dev-cpp/highway-9999 works for you?

There is already PR for highway-1.0.3, it it waiting for review&merge.
Comment 7 5FBCDB43 2023-03-28 04:46:25 UTC
Oh, sorry... It looks like I had leftovers on my system from a previous local install of highway/libjxl... My bad. I should have noticed that /usr/local/ earlier...

The ebuilds work okay. They compile and install fine here.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-05 19:28:16 UTC
No activity for a year, I don't think we want to do this, given the usual arguments against vendored dependencies.
Comment 9 tt_1 2024-03-06 05:02:02 UTC
ok, but I won't test the live ebuild on arm/arm64 anymore
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-06 05:06:52 UTC
You're free to pass MYCMAKEARGS=... anyway.