Giter VIP home page Giter VIP logo

Comments (3)

ysbaddaden avatar ysbaddaden commented on September 25, 2024

What if you enable support for DWCAS which is disabled by default by LLVM. For example it's --mattr=+cx16 for x86_64.

from crystal.

ysbaddaden avatar ysbaddaden commented on September 25, 2024

Hum, the linker doesn't need the __sync_val_compare_and_swap_16 symbol anymore, but still misses the __atomic_store symbol:

$ crystal build --mattr=+cx16 x.cr
/usr/bin/ld : A-tomic40I-nt12841.o0.o : dans la fonction « set » :
/home/julien/src/crystal-1.11.2/src/atomic.cr:204 : référence indéfinie vers « __atomic_store »
collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /tmp/x  -rdynamic -L/usr/lib/crystal -lpcre2-8 -L/usr/local/lib -lgc -lpthread -ldl -lpthread -levent -lrt -lpthread -ldl

from crystal.

MistressRemilia avatar MistressRemilia commented on September 25, 2024

Yeah, I get different error message now, also referring to __atomic_store:

[alexa@lain ~]$ crystal run --mattr=+cx16  test.cr
/usr/bin/ld: A-tomic40I-nt12841.o0.o: in function `set':
/usr/share/crystal/src/atomic.cr:283: undefined reference to `__atomic_store'
/usr/bin/ld: /usr/share/crystal/src/atomic.cr:285: undefined reference to `__atomic_store'
/usr/bin/ld: /usr/share/crystal/src/atomic.cr:287: undefined reference to `__atomic_store'
collect2: error: ld returned 1 exit status
Error: execution of command failed with exit status 1: cc "${@}" -o /home/alexa/.cache/crystal/crystal-run-test.tmp  -rdynamic -L/usr/bin/../lib/crystal -lpcre2-8 -lgc -lpthread -ldl -lpthread -levent -lrt -lpthread -ldl

This is when running on my Slackware 15.0 system (x86-64), which ships with LLVM 13 as a system package. When I run it on my aarch64 laptop running Slackware-Current (the unstable development version of Slackware, which has LLVM 18.1.2), I don't get my original error, but I do still get the same undefined reference to '__atomic_store' error as when I use --mattr=+cx16 on my x86-64 machine.

from crystal.

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.