Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
tcc on musl/arm64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
akrmn24
n00b
n00b


Joined: 24 Nov 2024
Posts: 23

PostPosted: Sat Jan 25, 2025 12:04 pm    Post subject: tcc on musl/arm64 Reply with quote

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
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1455
Location: Richmond Hill, Canada

PostPosted: Sat Jan 25, 2025 12:09 pm    Post subject: Reply with quote

tcc does not support ARM architecture. It only support X86
Back to top
View user's profile Send private message
akrmn24
n00b
n00b


Joined: 24 Nov 2024
Posts: 23

PostPosted: Sat Jan 25, 2025 2:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1455
Location: Richmond Hill, Canada

PostPosted: Sat Jan 25, 2025 3:50 pm    Post subject: Reply with quote

So I was outdated :oops:

For a long time it did not support ARM

On the chroot environment have you check the binary code type?
Code:
file a.out
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23049

PostPosted: Sat Jan 25, 2025 4:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum