Giter Club home page Giter Club logo

Comments (6)

refual avatar refual commented on June 27, 2024 1

this package is already installed on my system but it still doesn't work :( i've checked where the atomic header is located in the docker image : /usr/include/c++/13/atomic It is present at the same location on my linux distro, i don't understand...

Looking into it some more it seems you should run clang++ -v to find out which version of GCC it wants to use and install the corresponding libstd++-dev package for that. On my system (Ubuntu 22.04) that was version 12:

$ clang++ -v
...
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/12

Note that this is indeed gcc-12 and not g++-12 as I don't have g++-12 installed on my system and I can build the compiler just fine.

from odin.

refual avatar refual commented on June 27, 2024

Looks like a typo on the "Getting Started" page. The package you're actually looking for is libstdc++-12-dev, i.e. without the "x32" in the name.

from odin.

max22- avatar max22- commented on June 27, 2024

this package is already installed on my system but it still doesn't work :(
i've checked where the atomic header is located in the docker image :
/usr/include/c++/13/atomic
It is present at the same location on my linux distro, i don't understand...
it's not a big deal for me because i can use the version i've built using docker, but it could maybe be useful to find the reason for other users ?

from odin.

jimhub avatar jimhub commented on June 27, 2024

I've had the same issue on Mint. I fix it by installing libc++-dev and g++-12.

from odin.

max22- avatar max22- commented on June 27, 2024

clang++ -v returned this :

Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/14

I installed libstdc++-14-dev, and now it works, thank you !!

from odin.

joaocarvalhoopen avatar joaocarvalhoopen commented on June 27, 2024

Hello,

In Linux OpenSuse Tumbleweed with LLVM 18, if it gives us the following error:

In file included from src/main.cpp:2:
src/common.cpp:30:10: fatal error: 'atomic' file not found
   30 | #include <atomic> // Because I wanted the C++11 memory order semantics, of which gb.h does not offer (because it was a C89 library)
      |          ^~~~~~~~
1 error generated.
make: *** [Makefile:10: debug] Error 1

We have to issue the following command

clang++ -v
(base) joaocarvalho@soundofsilence:~/odin/Odin> clang++ -v
clang version 18.1.5
Target: x86_64-suse-linux
Thread model: posix
InstalledDir: /usr/bin
System configuration file directory: /etc/clang
User configuration file directory: /home/joaocarvalho/.config/clang
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/12
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/13
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/14
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-suse-linux/14
Candidate multilib: .;@m64
Selected multilib: .;@m64

We then see that it is the gcc 14 that is in use by clang++ and then we have to install the corresponding gcc version of the libstdc++ :

OpenSuse Tumbleweed compilation of Odin with llvm 18 I had to install:

libstdc++6-devel-gcc14

do:

sudo zypper install libstdc++6-devel-gcc14

then do again:

make

Note: This was made ( solved ) according the current thread and from the help of Jason and Layton:

'atomic' header not found when comiling Odin #3376
#3376

Thank you very much Jason,
and thank you very much Laytan!

Best regards,

from odin.

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.