Coder Social home page Coder Social logo

Comments (12)

Logarithmus avatar Logarithmus commented on July 18, 2024 1

Everything works now

from mold.

rui314 avatar rui314 commented on July 18, 2024

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.

Logarithmus avatar Logarithmus commented on July 18, 2024

@rui314 can you upload full logs for all the tests mentioned in this issue?

from mold.

rui314 avatar rui314 commented on July 18, 2024

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.

Logarithmus avatar Logarithmus commented on July 18, 2024

@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.

Logarithmus avatar Logarithmus commented on July 18, 2024

@rui314 did it work for you? If you have any Void-related questions, feel free to ask.

from mold.

nehaljwani avatar nehaljwani commented on July 18, 2024

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.

rui314 avatar rui314 commented on July 18, 2024

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.

rui314 avatar rui314 commented on July 18, 2024

All tests pass now on a Void Linux in my docker environment. Please double-check.

from mold.

Logarithmus avatar Logarithmus commented on July 18, 2024

@rui314 thank you so much for doing this work!

from mold.

Logarithmus avatar Logarithmus commented on July 18, 2024

@rui314

~/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.

Logarithmus avatar Logarithmus commented on July 18, 2024

@rui314 please, reopen this issue, I think it's more logical to discuss test issues here.

from mold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.