Skip to content
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

tcc: error: library 'atomic' not found #19556

Closed
muhdsalm opened this issue Oct 12, 2023 · 2 comments
Closed

tcc: error: library 'atomic' not found #19556

muhdsalm opened this issue Oct 12, 2023 · 2 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@muhdsalm
Copy link

muhdsalm commented Oct 12, 2023

Describe the bug

When trying to build V from source using the instructions in the README, the build fails and tells me to report the bug.

Reproduction Steps

  1. Create a distrobox container (fedora).
  2. Install the C Development Tools and Libraries group
  3. Attempt to build V from source (following the readme instructions)

Expected Behavior

I expected the build to complete successfully.

Current Behavior

When trying to build V from source, this error is thrown at the ./v1.exe -no-parallel -o v2.exe cmd/v stage:

tcc: error: library 'atomic' not found
...
==================
(Use `v -cg` to print the entire error message)

builder error: 
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

make: *** [GNUmakefile:114: all] Error 1

Possible Solution

The library 'atomic' may have been accidentally removed from the repository. If it were to be added again, the bug may go away.

Additional Information/Context

This is in a podman container (distrobox), and the c build tools have been installed.

V version

V 0.4.2 06fb8f0

Environment details (OS name and version, etc.)

OS: linux, Linux version 6.5.6-200.fc38.x86_64 (mockbuild@39479204bd704ee0abe1946d2acfd6e6) (gcc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1), GNU ld version 2.39-9.fc38) #1 SMP PREEMPT_DYNAMIC Fri Oct  6 19:02:35 UTC 2023 (chroot)
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz

getwd: /var/home/salman/.programmingBoxes/cpp/v
vexe: /var/home/salman/.programmingBoxes/cpp/v/v1.exe
vexe mtime: 2023-10-12 07:49:03

vroot: OK, value: /var/home/salman/.programmingBoxes/cpp/v
VMODULES: OK, value: /var/home/salman/.programmingBoxes/cpp/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.41.0
Git vroot status: weekly.2023.41-3-g06fb8f0f-dirty
.git/config present: true

CC version: cc (GCC) 13.2.1 20230728 (Red Hat 13.2.1-1)
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

Note

You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.

Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.

@muhdsalm muhdsalm added the Bug This tag is applied to issues which reports bugs. label Oct 12, 2023
@shove70
Copy link
Contributor

shove70 commented Oct 12, 2023

Install the missing atomic library on your Linux system, because tcc doesn't include it:

dnf install libatomic

@muhdsalm
Copy link
Author

Solved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

2 participants