-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
Assertion 'ObjFilename.second' failed when using LLVMgold LTO #1356
Comments
It was my mistake to place the downloading and unpacking of the hardened_malloc sources archive in ### Dockerfile
# name the portage image
FROM gentoo/portage:latest AS portage
# based on stage3 image
FROM gentoo/stage3:llvm
# copy the entire portage volume in
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
ADD bootstrap.sh /
ADD reproduce.sh /
RUN chmod +x /reproduce.sh
RUN chmod +x /bootstrap.sh
RUN /bootstrap.sh
CMD [ "/bin/bash" ] ### bootstrap.sh
#!/bin/bash
echo '
CC=clang
CXX=clang++
LD=ld.lld
AR=llvm-ar
NM=llvm-nm
STRIP=llvm-strip
OBJCOPY=llvm-objcopy
OBJDUMP=llvm-objdump
READELF=llvm-readelf
RANLIB=llvm-ranlib
ACCEPT_KEYWORDS="~amd64"
FEATURES="${FEATURES} splitdebug parallel-fetch parallel-install -ipc-sandbox -network-sandbox -pid-sandbox"
USE="${USE} debug binutils-plugin verify-sig"
' >> /etc/portage/make.conf
echo "MAKEOPTS=\"-j$(nproc)\"" >> /etc/portage/make.conf
# echo "EMERGE_DEFAULT_OPTS=\"-j$(nproc) --load-average=$(($(nproc) + 1)).0\"" >> /etc/portage/make.conf
# Select fastest available mirrors
emerge -v mirrorselect
mirrorselect -S -s 3 -b 10 -o >> /etc/portage/make.conf
# Rebuild LLVM with USE=binutils-plugin to make LLVMgold available
emerge -v llvm clang lld llvmgold
## GCC and Glibc can also be rebuilt to get debug symbols.
## GCC 13 is only needed for the reason
## that the command I suggested in `reproduce.sh`
## links against GCC 13 libstdc++,
## but this can be easily changed.
# emerge -v glibc "sys-devel/gcc:13"
# emerge -v valgrind
# Build mold from git HEAD
emerge -v dev-vcs/git
# If specific commit needed,
# then just set the values of the corresponding environment variables
# * EGIT_OVERRIDE_REPO_RUI314_MOLD
# * EGIT_OVERRIDE_BRANCH_RUI314_MOLD
# * EGIT_OVERRIDE_COMMIT_RUI314_MOLD
# * EGIT_OVERRIDE_COMMIT_DATE_RUI314_MOLD
env ACCEPT_KEYWORDS="**" emerge -v mold
## Build mold with latest available release in gentoo repos
# emerge -v mold ### reproduce.sh
#!/bin/bash
# Required to add clang to PATH
source /etc/profile
wget -O git-2.47.0.tar.xz https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.47.0.tar.xz
tar -xaf git-2.47.0.tar.xz
cd git-2.47.0
make CC=clang CXX=clang++ LD=ld.mold CFLAGS="-flto=thin" CXXFLAGS="-flto=thin" LDFLAGS="-flto=thin -fuse-ld=mold" V=1 -j$(nproc) |
Here is the command line options given to mold when mold failed due to the assertion failure.
As you can see,
Can you report it to LLVM? |
It appears this issue was submitted some time ago. And it has gone unheeded, at least for now. |
Thanks for checking. I left my comment to that bug. |
Probably related to #1355. The problem appears when using Clang + LTO + mold, but not always. When in the mentioned issue the problem occurred when building any sources, this one does not always appear.
I'll post a Dockerfile to reproduce the problem a bit later.
The text was updated successfully, but these errors were encountered: