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

kimageformats: Use latest builder #12097

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

maflcko
Copy link
Contributor

@maflcko maflcko commented Jun 18, 2024

No description provided.

Copy link

maflcko has previously contributed to projects/kimageformats. The previous PR was #11714

@maflcko maflcko marked this pull request as ready for review June 18, 2024 21:38
@maflcko
Copy link
Contributor Author

maflcko commented Jun 18, 2024

cc @novomesk @tsdgeos

@tsdgeos
Copy link
Contributor

tsdgeos commented Jun 18, 2024

Why is that extra lib needed?

@maflcko
Copy link
Contributor Author

maflcko commented Jun 19, 2024

The error is:

+ clang++ -O1 -fno-omit-frame-pointer -gline-tables-only -Wno-error=enum-constexpr-conversion -Wno-error=incompatible-function-pointer-types -Wno-error=int-conversion -Wno-error=deprecated-declarations -Wno-error=implicit-function-declaration -Wno-error=implicit-int -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++ -fPIC -DHANDLER=QJpegXLHandler -std=c++17 /src/kimgio_fuzzer.cc /src/kimageformats/src/imageformats/jxl.cpp /src/kimageformats/src/imageformats/scanlineconverter.cpp -o /out/kimgio_jxl_fuzzer -DJXL_STATIC_DEFINE -DJXL_THREADS_STATIC_DEFINE -DJXL_CMS_STATIC_DEFINE -I /src/qtbase/include/QtCore/ -I /src/qtbase/include/ -I /src/qtbase/include//QtGui -I /src/kimageformats/src/imageformats/ -I /src/karchive/src/ -I /src/qtbase/mkspecs/linux-clang-libc++/ -I /src/libavif/include/ -I /src/libjxl/build/lib/include/ -I /src/libjxl/lib/include/ -I /usr/local/include/OpenEXR/ -I /usr/local/include/Imath -I . -L /src/qtbase/lib /src/libavif/build/libavif.a /usr/local/lib/libheif.a /usr/local/lib/libde265.a /src/aom/build.libavif/libaom.a /src/libjxl/build/lib/libjxl_threads.a /src/libjxl/build/lib/libjxl.a /src/libjxl/build/lib/libjxl_cms.a /src/libjxl/build/third_party/highway/libhwy.a /src/libjxl/build/third_party/brotli/libbrotlidec.a /src/libjxl/build/third_party/brotli/libbrotlienc.a /src/libjxl/build/third_party/brotli/libbrotlicommon.a -lQt5Gui -lQt5Core -lqtlibpng -lqtharfbuzz -lm -lqtpcre2 -ldl -lpthread -fsanitize=fuzzer /usr/local/lib/libzip.a /usr/local/lib/libz.a -lKF5Archive /usr/local/lib/libz.a /usr/local/lib/libraw.a /usr/local/lib/libOpenEXR-3_2.a /usr/local/lib/libIex-3_2.a /usr/local/lib/libImath-3_1.a /usr/local/lib/libIlmThread-3_2.a /usr/local/lib/libOpenEXRCore-3_2.a /usr/local/lib/libOpenEXRUtil-3_2.a /usr/local/lib/libopenjp2.a
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
/src/libjxl/build/lib/libjxl.a(dec_external_image.cc.o): in function `jxl::N_SCALAR::FloatToF16(float const*, hwy::float16_t*, unsigned long)':
dec_external_image.cc:(.text._ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm[_ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm]+0x9d): undefined reference to `__truncsfhf2'
/usr/bin/ld: dec_external_image.cc:(.text._ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm[_ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm]+0xe8): undefined reference to `__truncsfhf2'
/usr/bin/ld: dec_external_image.cc:(.text._ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm[_ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm]+0x138): undefined reference to `__truncsfhf2'
/usr/bin/ld: dec_external_image.cc:(.text._ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm[_ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm]+0x188): undefined reference to `__truncsfhf2'
/usr/bin/ld: dec_external_image.cc:(.text._ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm[_ZN3jxl8N_SCALAR10FloatToF16EPKfPN3hwy9float16_tEm]+0x2dd): undefined reference to `__truncsfhf2'
/usr/bin/ld: /src/libjxl/build/lib/libjxl.a(dec_external_image.cc.o):dec_external_image.cc:(.text._ZN3jxl10ThreadPool12RunCallStateIZNS_25ConvertChannelsToExternalEPPKNS_5PlaneIfEEmmb13JxlEndiannessmPS0_PvmRKNS_13PixelCallbackENS_11OrientationEE3$_2ZNS_25ConvertChannelsToExternalES6_mmbS7_mS8_S9_mSC_SD_E3$_3E12CallDataFuncES9_jm[_ZN3jxl10ThreadPool12RunCallStateIZNS_25ConvertChannelsToExternalEPPKNS_5PlaneIfEEmmb13JxlEndiannessmPS0_PvmRKNS_13PixelCallbackENS_11OrientationEE3$_2ZNS_25ConvertChannelsToExternalES6_mmbS7_mS8_S9_mSC_SD_E3$_3E12CallDataFuncES9_jm]+0x6ee): more undefined references to `__truncsfhf2' follow
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR:__main__:Building fuzzers failed.

The symbol is a built-in, so the library needs to be included. See also https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/builtins/truncsfhf2.c

@jonathanmetzman
Copy link
Contributor

@tsdgeos do you approve?

1 similar comment
@jonathanmetzman
Copy link
Contributor

@tsdgeos do you approve?

@tsdgeos
Copy link
Contributor

tsdgeos commented Jun 19, 2024

My concern is "how am i supposed to know to do that"?

I´d be happier if it was a $VARIABLE that one is supposed to use for linking and here we aren´t , do you know if it that exists?

If not i guess we can go ahead.

@maflcko
Copy link
Contributor Author

maflcko commented Jun 20, 2024

I´d be happier if it was a $VARIABLE that one is supposed to use for linking and here we aren´t , do you know if it that exists?

My understanding is that this is normally not needed to be specified manually. I do not yet understand why it is needed here, so if you want I can mark it as "temporary linker workaround" for this project specifically, so that someone can look into it in the future?

@tsdgeos
Copy link
Contributor

tsdgeos commented Jun 20, 2024

I´d be happier if it was a $VARIABLE that one is supposed to use for linking and here we aren´t , do you know if it that exists?

My understanding is that this is normally not needed to be specified manually. I do not yet understand why it is needed here, so if you want I can mark it as "temporary linker workaround" for this project specifically, so that someone can look into it in the future?

Yes please, let's do that :)

@maflcko
Copy link
Contributor Author

maflcko commented Jun 21, 2024

Thanks, done. Please approve if it looks ok.

@tsdgeos
Copy link
Contributor

tsdgeos commented Jun 21, 2024

Looks good to me.

Please merge :)

@jonathanmetzman jonathanmetzman merged commit 4f4f145 into google:master Jun 21, 2024
15 checks passed
@maflcko maflcko deleted the 2406-kimageformats branch June 21, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants