[Linux] C backend confusion / segfault

Linux specific forum
User avatar
kenmo
Addict
Addict
Posts: 2039
Joined: Tue Dec 23, 2003 3:54 am

[Linux] C backend confusion / segfault

Post by kenmo »

Still experimenting with PB 6.12 x64 on ElementaryOS 7.1 (Ubuntu 22)... enjoying it very much!

I'm a bit confused about the C backend though, which I have only used on Windows before.

In PB 6.12 IDE, compiling and running on Elementary works fine, but in the compile options it only shows one compiler option "PureBasic 6.12 LTS (Linux - x64)" - which seems to be the ASM backend (matches #PB_Backend_Asm). No C backend listed. Why might that be?

Furthermore... from the terminal in "purebasic/compilers/" directory, I can't run ./pbcompiler or ./pbcompilerc from the commandline, both print "Segmentation fault" - Why might that be??? Somehow the compiler runs OK from the IDE!

Any suggestions, PB Linux users?
Last edited by kenmo on Wed Sep 25, 2024 5:30 am, edited 1 time in total.
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: [Linux] C backend confusion

Post by StarBootics »

You need to go to the Preferences->Compiler->Additional Compilers

And you need to browse for the pbcompilerc executable then click the Add button.

After that you will be able to select the compiler you want to use in the Compiler Options menu.

It work under Debian, but never tested under other Linux OS but should work.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
kenmo
Addict
Addict
Posts: 2039
Joined: Tue Dec 23, 2003 3:54 am

Re: [Linux] C backend confusion

Post by kenmo »

Oops, that's embarrassing. You're right. Added OK. Maybe I had to do that on Windows too, but it was a while ago and I forgot?

Any idea why pbcompiler/c might Segfault from the terminal commandline? :shock:
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: [Linux] C backend confusion / segfault

Post by StarBootics »

Maybe a little launch with valgrind ./pbcompilerc will help to see what is crashing when it crash.

Otherwise Fred can probably answer that question.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Post Reply