Doing: clang++ -flto -ffat-lto-objects -shared -fPIC -DPIC ... gives /usr/bin/ld: /tmp/lto-llvm-8916fe.o:(.rodata.str1.1+0x2e0): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-6b4bd2.o:(.rodata.str1.1+0x1c): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-5d650b.o:(.rodata.str1.1+0x192): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-f629d0.o:(.rodata.str1.1+0x38): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-3268c9.o:(.rodata.str1.1+0x0): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-f0e820.o:(.rodata.str1.1+0x0): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-b5dd56.o:(.rodata.str1.1+0x0): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-c819be.o:(.rodata.str1.1+0x15): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-dd4627.o:(.rodata.str1.1+0x2c): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-0eb806.o:(.rodata.str1.1+0x63): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-ccbdf8.o:(.rodata.str1.1+0x0): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-2885f6.o:(.rodata.str1.1+0x12): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-db3b4f.o:(.rodata.str1.1+0x2d7): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here /usr/bin/ld: /tmp/lto-llvm-9fa0cf.o:(.rodata.str1.1+0x11): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here clang++: error: linker command failed with exit code 1 (use -v to see invocation) with: clang-18.1.1-1.fc40.x86_64 Reproducible: Always Steps to Reproduce: 1. uses "clang++ -flto -ffat-lto-objects -shared -fPIC -DPIC ..." to build shared libraries Actual Results: /usr/bin/ld: /tmp/lto-llvm-9fa0cf.o:(.rodata.str1.1+0x11): multiple definition of `.str.llvm.0'; /tmp/lto-llvm-6f7958.o:(.rodata.str1.1+0x31d): first defined here clang++: error: linker command failed with exit code 1 (use -v to see invocation) Expected Results: success (it was successful with fc39's clang before I ugraded to fc40) Upstream issue: https://github.com/llvm/llvm-project/issues/84167 Apparently somebody from redhat filed it, and it got fixed, and there is a koji build for fc41. Please backport to fc40.
I've put up https://src.fedoraproject.org/rpms/clang/pull-request/238 to backport just this patch. Though if @tstellar is planning to do a point release update for f40 soon, that would fix it as well.
This message is a reminder that Fedora Linux 40 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '40'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 40 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
This has been fixed a long time ago, closing.