View previous topic :: View next topic |
Author |
Message |
akrmn24 n00b
Joined: 24 Nov 2024 Posts: 23
|
Posted: Sat Jan 25, 2025 12:04 pm Post subject: tcc on musl/arm64 |
|
|
I am trying out tcc in a chroot on an ARM64/Ampere VPS. I emerge tcc (I unmask the ~arm64 keyword). I make a simple hello world program. Compile it with tcc -o hello hello.c. But When I run ./hello, I get 'Segmentation fault (core dumped)'. When I do tcc -run hello.c it works though.
Any idea? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1455 Location: Richmond Hill, Canada
|
Posted: Sat Jan 25, 2025 12:09 pm Post subject: |
|
|
tcc does not support ARM architecture. It only support X86 |
|
Back to top |
|
|
akrmn24 n00b
Joined: 24 Nov 2024 Posts: 23
|
Posted: Sat Jan 25, 2025 2:30 pm Post subject: |
|
|
It says in their README that they support ARM. I just made a test directly on my raspberry pi with tcc and it worked. I don't know why it doesn't work in the chroot in the Ampere VPS...
Edit: also worked in the Ubuntu host for the Ampere VPS. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1455 Location: Richmond Hill, Canada
|
Posted: Sat Jan 25, 2025 3:50 pm Post subject: |
|
|
So I was outdated
For a long time it did not support ARM
On the chroot environment have you check the binary code type? |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23049
|
Posted: Sat Jan 25, 2025 4:07 pm Post subject: |
|
|
If it crashes with a segmentation fault, then the next step is to debug it to understand what memory it tried to access and why it did that instead of what it should have done. |
|
Back to top |
|
|
|