Page 1 of 2

Compiler crashes when trying to run PB.

Posted: Tue Dec 28, 2021 11:46 am
by Joris
On Ubuntu 20.04.3 LTS, with latest updates.

I installed the latest PB using the checkinstall.sh, register.sh and launch.sh script.
After a message that the GTK 3.0+- is not installed, I installed it with sudo apt-get install GTK 3.0 added.
When I click launch PB starts, but no matter what (simple) source I try, always the message
The Compiler appears to have crashed or quit unexpectedly.
It will be rerstarted.
P.s. I've also tried that Simple install of PureBasic (Ubuntu, Mint)
https://www.purebasic.fr/english/viewtopic.php?t=74875
As it doesn't work like should, I got more and more confused about
the order on trying things to get it fixed, when did I do this or that ?

Re: Compiler crashes when trying to run PB.

Posted: Tue Dec 28, 2021 7:07 pm
by mk-soft
How PB versions too used?

Here works with Ubuntu 20.04.3 and 21.04
PB v5.73 and PB v6.00

Re: Compiler crashes when trying to run PB.

Posted: Wed Dec 29, 2021 9:19 am
by Joris
The Error message tell's me to report it as a bug. So I will link it into the bug section.

Re: Compiler crashes when trying to run PB.

Posted: Wed Dec 29, 2021 11:50 am
by Bitblazer
I found several problems of any Purebasic version including 5.7x for new linux versions like ubuntu 20+ **

Simply use ubuntu 18.x for anything up to purebasic 5.7x and newer ubuntu versions should work with purebasic 6.x

It obviously depends on the components you intend to use, but as i develop mostly commandline tools, i simply compile them on 18.x and they run on 20+ fine so far. A 3d game with advanced HTML5 UI would be a very different challenge ;)

** some of these problems are not easy to fix, because purebasic attempts to cover the super old x86 range and a lot of that stuff is simply deprecated in newer linux. I tried to dig out years old compatibility libraries but that just makes the problem worse due to more dependencies.

Re: Compiler crashes when trying to run PB.

Posted: Thu Dec 30, 2021 12:59 pm
by Joris
Ok I'll follow this : "newer ubuntu versions should work with purebasic 6.x"

Thanks (and I'll be quiet if it works).
:lol:

Re: Compiler crashes when trying to run PB.

Posted: Sat Jan 01, 2022 10:33 am
by Joris
Ok, PB-6 works (partly), but I had to change the permissions for several components : 'Allow this file to run as a program." Not such a problem if you know what to do (I came up with it after a lot search behind) but the debugger still doesn't work, no idea why.
Now when I run a source I keep getting this message:
[10:21:43] [COMPILER] Assembler error!

What do I need to do to get everything working correctly?

Thanks.

Re: Compiler crashes when trying to run PB.

Posted: Sat Jan 01, 2022 12:43 pm
by mk-soft
I think that something else in the system is completely wrong. Authorise folder, authorise user?

Normally, you only need to unpack the PB and, for example, drag and drop it into your own user folder.
You don't have to change any permissions. (Exception of pb v6.00 beta the pbcompilerc. Was forgotten to set).
The GCC and the developer libraries must also be installed.

Re: Compiler crashes when trying to run PB.

Posted: Sun Jan 02, 2022 12:50 pm
by Joris
Well I really got lost now. I have PB installed in /home/Joris/purebasic.
I executed those scripts before and can start PB by clicking the PB icon (which got placed in the development folder). BUt then every source I run gives me just a small window with and OK button and the same error : [12:46:01] [COMPILER] Assembler error!
I don"t know how to fix this or go back to a situation before installing all PB stuff ('except complete reinstall Ubuntu, which I don't like todo).

What or how can I get it correct ?
Thanks

Re: Compiler crashes when trying to run PB.

Posted: Sun Jan 02, 2022 2:02 pm
by mk-soft
You may have to remove the path settings by the script.

Delete the hidden folder "/home/Joris/.purebasic.

Download PB again (possibly damaged).
Ubuntu is X64, so the 64 bit version of Purebasic.

Re: Compiler crashes when trying to run PB.

Posted: Mon Jan 03, 2022 11:29 am
by Joris
* Deleted the hidden folder "/home/Joris/.purebasic.
* Placed a new copy of complete PB folder over old one.
* Starting the scripts (copied there results here) :
joris@joris-System-Product-Name:~$ sudo /home/joris/purebasic/checkinstall.sh
[sudo] password for joris :
sudo: /home/joris/purebasic/checkinstall.sh: command not found
* Starting the script again because the admission is needed : 'Allow this file to run as a program.'
joris@joris-System-Product-Name:~$ sudo /home/joris/purebasic/checkinstall.sh

This script try to detect if all developments packages are correctly installed. If you are using a Debian or Ubuntu like distribution, you can use the following line to install all needed packages:

$ sudo apt-get install gcc g++ libc6-dev libsdl1.2-dev libgtk-3-dev unixodbc-dev libgnome2-dev libxine2-dev libxxf86vm-dev libwebkit2gtk-4.0-dev libssl-dev

If you want to use the QT subsystem for the GUI, you will need additional dev package:

$ sudo apt-get install qt5-default libqt5webkit5-dev qtmultimedia5-dev libqt5svg5-dev

Package libgnome-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnome-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnome-2.0' found
libgnome devel package need to be installed to use PureBasic
* This package 'libgnome-2.0'is obsoleted as stated elsewhere, so didn't install that.
* Execution of the other scripts only succeeds if access is granted as executables.

* And now :
Execution of purebasic.
This also only succeeds if access is granted as executable, yet a message that compiler failed to load.
In the first run the 'Use compiler' name is just Purebasic, nothing else can be choosen.
After a second run and allowing pbcompiler and pbcompilerc the 'Use compiler' name 'Purebasic 6.00 Beta 1 (Linux -x64)'.
In both cases no other choice is possible.

Yet now the hidden folder "/home/Joris/.purebasic is back again (don't know if it should be removed again ?)

All is just the same as before ... same error.
[11:17:15] [COMPILER] Assembler error!

I'm gonna report it again as bug. What else can I do ?

Re: Compiler crashes when trying to run PB.

Posted: Mon Jan 03, 2022 12:40 pm
by deeproot
Joris wrote: Mon Jan 03, 2022 11:29 am
joris@joris-System-Product-Name:~$ sudo /home/joris/purebasic/checkinstall.sh
[sudo] password for joris :
sudo: /home/joris/purebasic/checkinstall.sh: command not found
* Starting the script again because the admission is needed : 'Allow this file to run as a program.'
Something strange going on here! Never needed to grant execute permission like that, or for any other PureBasic files (other than the recent pbcompilerc). This must be a clue to the problem? Is the tar archive being unpacked properly?

Also "sudo" is not needed here - the install is under user's Home, rather than the secured part of the system.

I've installed under Linux many times, different PB versions and distros. Actually don't often bother to run checkinstall these days, as I already know the dependencies needed (thanks mk-soft). Usually only takes a few minutes to get up and coding.

The hidden .purebasic folder will always be (re)created if it doesn't already exist - that is normal, it holds config preferences and other things. Should only be removed if something is wrong, to give a clean start. (Edit: - it is the same thing as username\AppData\Roaming\PureBasic folder in Windows)

Re: Compiler crashes when trying to run PB.

Posted: Mon Jan 03, 2022 1:03 pm
by #NULL
If you get permission problems, maybe there is an odd filesystem involved? For example if you download/extract PB onto a FAT32 USB drive first and then copy it into your system then executable permissions of the PB binaries and scripts might get lost in the process because FAT32 doesn't have that. I'm not saying that ever happened to me, but know I got problems with [x] Create temp exe in source dir if the source dir is on a FAT32 drive.

Re: Compiler crashes when trying to run PB.

Posted: Mon Jan 03, 2022 1:27 pm
by deeproot
#NULL wrote: Mon Jan 03, 2022 1:03 pm If you get permission problems, maybe there is an odd filesystem involved? For example if you download/extract PB onto a FAT32 USB drive first and then copy it into your system then executable permissions of the PB binaries and scripts might get lost in the process because FAT32 doesn't have that. I'm not saying that ever happened to me, but know I got problems with [x] Create temp exe in source dir if the source dir is on a FAT32 drive.
Good thinking - maybe something like that? I also found that copying a folder over the network to another machine, rather than extracting from the tar, causes executable permissions on the binaries to get lost. So always best to directly extract from the .tgz file.

Re: Compiler crashes when trying to run PB.

Posted: Tue Jan 04, 2022 11:05 am
by Joris
Hi,

It works.
I restarted by extracting the .tgz file on my Ubuntu system instead of on windows and placing it on an USB stick.
Did nothing more then remove the old map and the hidden one, then replaced it by the extracted one.
Did no extra install's as I asume they would be there still.

Yeah it works, so thanks all for the help.

P.s. All this trouble just to find the difference of the ALSA library on the Raspberry PI :
https://www.purebasic.fr/english/viewtopic.php?t=78337
The difference seem to be only in the manual.
Like this one does not exist : snd_rawmidi_info_alloca ???
So who can help on that, your welcome.

Re: Compiler crashes when trying to run PB.

Posted: Tue Jan 04, 2022 5:59 pm
by mk-soft
@NULL :evil: :twisted: :wink:

You had the right idea. I would never have thought of the invalid drive format.
There had to be a reason for it somewhere.