Skip to content

Linking error with GCC-compiled fmt and Clang-compiled folly, only on Fedora rawhide ppc64le #2794

Description

@michel-slm

Fedora 36 upgraded GCC to version 12: https://fedoraproject.org/wiki/Changes/GNUToolchainF36

It also switched ppc64le from the numerically problematic IBM extended long double to
IEEE 754 quad long double: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/NPKWMTSJ2A2ABNJJEH6WTZIAEFTX6CQY/#FDILCGZPOMB7VVJQQBCJO5GVBIEOWHHA - which could be relevant, as the error is in some floating point code.

Because of some regressions I am switching Fedora's folly package to use clang instead of GCC; on x86_64, i686, and aarch64 it builds fine (chasing some test failures esp on non-x86_64), but on ppc64le it fails:

Fedora 36
https://koji.fedoraproject.org/koji/taskinfo?taskID=83649017

Rawhide (F37)
https://kojipkgs.fedoraproject.org//work/tasks/1021/83611021/build.log

[ 35%] Linking CXX executable logging_example
cd /builddir/build/BUILD/folly-2022.02.28.00/redhat-linux-build/folly/logging/example && /usr/bin/cmake -E cmake_link_script CMakeFiles/logging_example.dir/link.txt --verbose=1
/usr/bin/clang++ -O2 -flto -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong   -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now   -flto -Wl,--build-id=sha1 -Wl,-dT,/builddir/build/BUILD/folly-2022.02.28.00/.package_note-folly-2022.02.28.00-2.fc37.ppc64le.ld -rdynamic CMakeFiles/logging_example.dir/main.cpp.o -o logging_example  -Wl,-rpath,/builddir/build/BUILD/folly-2022.02.28.00/redhat-linux-build/folly/logging/example:/builddir/build/BUILD/folly-2022.02.28.00/redhat-linux-build liblogging_example_lib.so ../../../libfolly.so.2022.02.28.00 /usr/lib64/libfmt.so.8.1.1 -Wl,--as-needed -lboost_context -lboost_filesystem -lboost_program_options -lboost_regex -lboost_system -lboost_thread -pthread -lboost_chrono -lboost_date_time -lboost_atomic -ldouble-conversion /usr/lib64/libgflags.so.2.2.2 -lglog -levent -lz -lssl -lcrypto -lbz2 -llz4 -lzstd -lsnappy -ldwarf -Wl,-Bstatic -liberty -Wl,-Bdynamic -laio -luring -lsodium -ldl -lunwind -latomic 
/usr/bin/ld: ../../../libfolly.so.2022.02.28.00: undefined reference to `int fmt::v8::detail::format_float<__float128>(__float128, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&)'
/usr/bin/ld: ../../../libfolly.so.2022.02.28.00: undefined reference to `int fmt::v8::detail::snprintf_float<__float128>(__float128, int, fmt::v8::detail::float_specs, fmt::v8::detail::buffer<char>&)'
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)

Not sure what could be causing this, any pointers to narrowing this down would be highly appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions