Skip to content

Conversation

EchoPouet
Copy link

Prevent compilation errors such as those encountered when compiling “hello world”.

# c3c build
sh: 1: cc: not found
Failed to link executable 'build/hello' using command 'cc -o build/toto -rdynamic -pthread ....

@lerno
Copy link
Contributor

lerno commented Sep 16, 2025

Although if it's missing using --linker=builtin will work

@EchoPouet
Copy link
Author

EchoPouet commented Sep 16, 2025

Sorry, but I tried again with a Docker container on Ubuntu 24.04 with only c3c and libxml2.
The result with your option produces this error:

root@4dd523af4351:/# ./c3/c3c --linker=builtin compile  hello.c3 
Failed to find the C runtime at link time.

Furthermore, this option is not mentioned in the tutorial on compiling hello world.

@lerno
Copy link
Contributor

lerno commented Sep 23, 2025

If you are in a special environment that lacks even a linker and a compiler, then you need to point to the crt files etc to link with. But odds are not even that exists in such an environment. I doubt anything can make it work in a Docker container that is missing all relevant system libraries.

@EchoPouet
Copy link
Author

Perhaps the solution would be to add a paragraph listing the minimum packages/libraries required to compile a project with C3, wouldn't it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants