Comments (12)
Everything works now
from mold.
Thank you for the report. Since tests are not completely self-contained (it uses an external compiler, libc and CRT objects), generated files may be slightly different. I believe that causes errors in non-Ubuntu-20 machines.
from mold.
@rui314 can you upload full logs for all the tests mentioned in this issue?
from mold.
These tests have no feature to dump logs. I can fix these tests for you by running Void Linux in Docker. What packages did you have to install to build mold? I've never used that distro, so I appreciate if you can share the exact commands.
from mold.
@rui314
sudo xbps-install void-repo-multilib base-devel openssl-devel xxHash-devel zlib-devel libdwarf clang tar
sudo xbps-install glibc-devel-32bit
These packages should be sufficient to run the tests.
If you use musl
variant of Void, then glibc-devel-32bit
isn't needed I guess.
from mold.
@rui314 did it work for you? If you have any Void-related questions, feel free to ask.
from mold.
I've opened up a PR at #71 to build mold with GCC 11 in CI and added a small change to test/Makefile
to become verbose on failure.
from mold.
I had to run xbps-install -S void-repo-multilib
before xbps-install glibc-devel-32bit
. Except that, it seems to be working alright.
from mold.
All tests pass now on a Void Linux in my docker environment. Please double-check.
from mold.
@rui314 thank you so much for doing this work!
from mold.
~/Programming/C++/mold fix-tests-again !5 ?1 ❯ bash -x fails/copyrel-protected.sh
+ set -e
++ dirname fails/copyrel-protected.sh
+ cd fails
++ basename -s .sh fails/copyrel-protected.sh
+ echo -n 'Testing copyrel-protected ... '
Testing copyrel-protected ... ++ pwd
++ basename -s .sh fails/copyrel-protected.sh
+ t=/home/artur/Programming/C++/mold/fails/tmp/copyrel-protected
+ mkdir -p /home/artur/Programming/C++/mold/fails/tmp/copyrel-protected
+ cat
+ cc -o /home/artur/Programming/C++/mold/fails/tmp/copyrel-protected/a.o -c -xc -fno-PIE -
+ cat
+ cc -shared -o /home/artur/Programming/C++/mold/fails/tmp/copyrel-protected/b.so -xc -
++ pwd
+ clang -fuse-ld=/home/artur/Programming/C++/mold/fails/../mold /home/artur/Programming/C++/mold/fails/tmp/copyrel-protected/a.o /home/artur/Programming/C++/mold/fails/tmp/copyrel-protected/b.so -o /home/artur/Programming/C++/mold/fails/tmp/copyrel-protected/exe
+ false
The resulting executable in ifunc-dso
outputs nothing instead of Hello world
.
~/Programming/C++/mold fix-tests-again !5 ?1 ❯ bash -x fails/ifunc-dso.sh
+ set -e
++ dirname fails/ifunc-dso.sh
+ cd fails
++ basename -s .sh fails/ifunc-dso.sh
+ echo -n 'Testing ifunc-dso ... '
Testing ifunc-dso ... ++ pwd
++ basename -s .sh fails/ifunc-dso.sh
+ t=/home/artur/Programming/C++/mold/fails/tmp/ifunc-dso
+ mkdir -p /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso
+ cat
+ cc -o /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso/a.o -c -x assembler -
+ cat
+ cc -shared -fPIC -o /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso/b.so -x assembler -
++ pwd
+ clang -fuse-ld=/home/artur/Programming/C++/mold/fails/../mold -o /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso/exe /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso/a.o /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso/b.so
+ /home/artur/Programming/C++/mold/fails/tmp/ifunc-dso/exe
+ grep -q 'Hello world'
This can be caused by my /usr/bin/ld
being a symlink to /usr/bin/mold
UPD confirmed that passing -fuse-ld=bfd
to gcc
& clang
in this test fixes it.
~/Programming/C++/mold fix-tests-again !5 ?1 ❯ bash -x fails/run.sh
+ set -e
++ dirname fails/run.sh
+ cd fails
++ basename -s .sh fails/run.sh
+ echo -n 'Testing run ... '
Testing run ... ++ pwd
++ basename -s .sh fails/run.sh
+ t=/home/artur/Programming/C++/mold/fails/tmp/run
+ mkdir -p /home/artur/Programming/C++/mold/fails/tmp/run
+ cat
+ cc -xc -c -o /home/artur/Programming/C++/mold/fails/tmp/run/a.o -
+ gcc -o /home/artur/Programming/C++/mold/fails/tmp/run/exe /home/artur/Programming/C++/mold/fails/tmp/run/a.o
+ readelf -p .comment /home/artur/Programming/C++/mold/fails/tmp/run/exe
+ grep -q mold /home/artur/Programming/C++/mold/fails/tmp/run/log
+ false
from mold.
@rui314 please, reopen this issue, I think it's more logical to discuss test issues here.
from mold.
Related Issues (20)
- Corrupts the `DWARF` section when relocating multiple objects into a single one HOT 3
- Feature request: Warn about reverse or cyclic dependencies
- MSYS2/UCRT64: LINKER_TYPE 'MOLD' is unknown or not supported by this toolchain. HOT 6
- Build mold from source with -march or -mcpu in the build script HOT 2
- mold support for Fortran HOT 1
- Segmentation fault when compiling ROOT HOT 4
- /usr/lib/mold/mold-wrapper.so: unsupported relocation type 1026 HOT 3
- Binary linked with mold segfaults immediately HOT 5
- [FEATURE REQ/BUG REP] SH4 endianas HOT 7
- x86_64-exception-multiple-ehframe test failure HOT 2
- corrupted .riscv.attributes ISA string
- Very slow symbol lookup speed with gdb HOT 3
- mold fails to build on Debian sid on most of the archs (`error: implicit declaration of function`)
- mold does not accelerate the compile process compare to normal config HOT 15
- Support `libdep` plugin HOT 8
- duplicate symbol of compiler_rt builtin functions HOT 16
- Reference counting of std::shared_ptr is non-atomic when using the mold linker HOT 5
- mold can't be built with itself on mingw HOT 2
- Higher zstd compression levels for debug info HOT 1
- 2 tests fail on RiscV HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mold.