SliTaz Linux "Assembler Error"

Linux specific forum
Cyberity
User
User
Posts: 11
Joined: Wed Nov 26, 2014 6:51 pm

SliTaz Linux "Assembler Error"

Post by Cyberity »

Dear Community,

I have noticed that on SliTaz linux for some reason I just can't compile any code I mean its says "[COMPILER]: Assembler Error" even to
Debug "TEST". I have checked the ./checkinstall file and its says everything is fine. I have tried to install the lastest fasm aswell still no success. Maybe its not a bug and I did something wrong but I have no clue.. I also tried older versions and I got the same result.
Cyberity
User
User
Posts: 11
Joined: Wed Nov 26, 2014 6:51 pm

Re: SliTaz Linux "Assembler Error"

Post by Cyberity »

Cyberity wrote:Dear Community,

I have noticed that on SliTaz linux for some reason I just can't compile any code I mean its says "[COMPILER]: Assembler Error" even to
Debug "TEST". I have checked the ./checkinstall file and its says everything is fine. I have tried to install the lastest fasm aswell still no success. Maybe its not a bug and I did something wrong but I have no clue.. I also tried older versions and I got the same result.
I forget to mention the PB version is 5.50 x86 and the SliTaz is also x86.
User avatar
Shardik
Addict
Addict
Posts: 2066
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: SliTaz Linux "Assembler Error"

Post by Shardik »

I can confirm the "Assembler Error" problem on SliTaz 5.0 (Rolling release, x86, 14.08.2016). I have tested on SliTaz 5.0 with different PB compiler versions (4.61, 5.31, 5.43, 5.50) from Terminal and IDE. I even tried to start the PB compiler with gdb and valgrind (I even replaced /lib/ld-2.14.1.so with the non-stripped version containing debugging symbols) but compiling the single line

Code: Select all

MessageRequester("Message", "Hello world!")
always produced this output
PB compiler wrote:******************************************
PureBasic 5.43 LTS (Linux - x86)
******************************************

Loading external modules...
Starting compilation...
Starting compilation...
1 lines processed.
Creating the executable.
Segmentation fault
Error: Assembler
Valgrind with the option --leak-check=full only prints a HEAP SUMMARY and a LEAK SUMMARY behind the above posted PB messages but unfortunately doesn't report anything about the segmentation fault...

These are the packages I had to install in a newly installed SliTaz 5.0 with
sudo tazpkg get-install PackageName
in order to get an OK from checkinstall.sh:
- gcc
- gtk+-dev
- gtk+3-dev
- libgnome-dev
- glibc-dev
- glibc-locale
- xine-lib-dev
- xorg-libXxf86vm-dev
- libsdl-dev
- unixODBC-dev

After getting the segmentation fault when compiling PureBasic programs I tried to compile a C sourcecode (to verify that the gcc toolchain is working) and to compile an assembler sorcecode with FASM contained in the PB compiler folder (to verify that PB's version of FASM is working).

When compiling the program Mask from http://zetcode.com/gfx/cairo/clippingmasking/ with

Code: Select all

gcc Mask.c -o Mask `pkg-config --cflags --libs gtk+-2.0`
I obtained the following error:
gcc wrote:/usr/include/bits/local_lim.h:39:26: fatal error: linux/limits.h: No such file or directory
This error message reveals that the kernel headers are missing. After installing the SliTaz toolchain with

Code: Select all

sudo tazpkg get-install slitaz-toolchain
the compilation of the Mask.c sourcecode was successfull.

For testing FASM contained in PB I downloaded this HelloWorld asssembler sourcecode for Linux. I only had to remove the trailing "3" in the first line. The compilation didn't throw any error and the compiled file correctly displayed "Hello world!" in the console.

In essence gcc and FASM are working correctly but in PureBasic the call of FASM leads to a segmentation fault (starting pbcompiler with flags -k or -pp is working correctly but doesn't call FASM to compile an executable).

During the last years I have tested more than 20 different full blown Linux distributions with PureBasic which all don't show the reported segmentation fault but SliTaz is the first very small-sized distro...
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3943
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: SliTaz Linux "Assembler Error"

Post by wilbert »

What if you try to compile a small console application ?
Does that also cause the same error ?
Windows (x64)
Raspberry Pi OS (Arm64)
User avatar
Shardik
Addict
Addict
Posts: 2066
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: SliTaz Linux "Assembler Error"

Post by Shardik »

wilbert wrote:What if you try to compile a small console application ?
Does that also cause the same error ?
Yes. When compiling the following sourcecode from console with "Executable Format: Console" on SliTaz 5.0 the same error messages as above are displayed

Code: Select all

OpenConsole("Test")
PrintN("Hello world!")
Input()
whereas on other Linux distros "Hello world!" is displayed in the console.
Post Reply