Clean Install of PB 5.7 Beta on UBUNTU.
Compiler runs Ok compiling the lines of code then reports a linker error as below:-
/home/dave/Programmes/purebasic/purelibraries/linux/libraries/libpbsqlite3.a(sqlite3.o): In function `backupOnePage.isra.517':
sqlite3.c:(.text+0x42a0a): undefined reference to `__divmoddi4'
collect2: error: ld returned 1 exit status
Any Ideas?
CD
PB 5.7 Beta Linker error
-
- Addict
- Posts: 1309
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
PB 5.7 Beta Linker error
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
-
- Enthusiast
- Posts: 271
- Joined: Thu Dec 17, 2009 12:00 pm
- Location: Llangadog, Wales, UK
- Contact:
Re: PB 5.70 Beta Linker error
I have just hit exactly the same problem - cannot see any obvious cause
Details:-
Fresh install of PureBasic 5.70 beta 4 x86
Running on MX Linux 17 32-bit with all latest updates installed.
./checkinstall.sh runs with no issues found.
My error message:
PureBasic 5.62 x86 is installed in a separate directory of same computer - runs fine and compiles the same source files with no problem.
On a different machine I have PureBasic 5.70 beta 4 x64, running under MX Linux 17 64-bit - same source files compile with no problem (many times in fact! this is my main Linux dev system).
BTW - for anyone who doesn't know, MX Linux is a Debian based distro. PureBasic versions usually install fine with no fuss.
Details:-
Fresh install of PureBasic 5.70 beta 4 x86
Running on MX Linux 17 32-bit with all latest updates installed.
./checkinstall.sh runs with no issues found.
My error message:
interesting things:/home/geoff/purebasic570/purebasic/purelibraries/linux/libraries/libpbsqlite3.a(sqlite3.o): In function `backupOnePage.isra.517':
sqlite3.c:(.text+0x42a0a): undefined reference to `__divmoddi4'
collect2: error: ld returned 1 exit status
PureBasic 5.62 x86 is installed in a separate directory of same computer - runs fine and compiles the same source files with no problem.
On a different machine I have PureBasic 5.70 beta 4 x64, running under MX Linux 17 64-bit - same source files compile with no problem (many times in fact! this is my main Linux dev system).
BTW - for anyone who doesn't know, MX Linux is a Debian based distro. PureBasic versions usually install fine with no fuss.
-
- Enthusiast
- Posts: 271
- Joined: Thu Dec 17, 2009 12:00 pm
- Location: Llangadog, Wales, UK
- Contact:
Re: PB 5.7 Beta Linker error
Same issue for PB 5.71 LTS
After a long break I've just got back to some coding and installed 5.71LTS on a couple of systems. Unfortunately, with Linux 32-bit the linker error above still exists.
Not sure if this is a valid solution? - but it can be fixed by replacing libpbsqlite3.a with the same file from an installation of PB 5.62 x86. My program then compiles fine and when tested everything appears to be working (with a lot of SQLite stuff!).
I believe, after reading another thread, the linker problem can also be avoided with UseSQLiteDatabase(lib-file) to load an external library.
So it's not such a bad problem. However, it seems a pity that 5.71 x86 does not work "out of the box" when using SQLite
As with 5.70, there is no problem with 5.71 x64
(Edit: I'd just like to add - on my systems the 5.71 IDE appears to be much more stable than previous versions. Not one crash so far - great!)
After a long break I've just got back to some coding and installed 5.71LTS on a couple of systems. Unfortunately, with Linux 32-bit the linker error above still exists.
Not sure if this is a valid solution? - but it can be fixed by replacing libpbsqlite3.a with the same file from an installation of PB 5.62 x86. My program then compiles fine and when tested everything appears to be working (with a lot of SQLite stuff!).
I believe, after reading another thread, the linker problem can also be avoided with UseSQLiteDatabase(lib-file) to load an external library.
So it's not such a bad problem. However, it seems a pity that 5.71 x86 does not work "out of the box" when using SQLite
As with 5.70, there is no problem with 5.71 x64
(Edit: I'd just like to add - on my systems the 5.71 IDE appears to be much more stable than previous versions. Not one crash so far - great!)
Re: PB 5.7 Beta Linker error
This is not true in general for all 32-bit Linux distributions. I have tested PureBasic's example program from the help for UseSQLiteDatabase() with the following 32-bit Linux distributions and PB 5.71 x86 with default GTK3 (a minus sign denotes that PB 5.71 x86 on the specified distribution terminates on execution of UseSQLiteDatabase() with the error message posted by deeproot):deeproot wrote:Unfortunately, with Linux 32-bit the linker error above still exists.
[-] Bodhi Linux 4.5.0 x86 with Moksha
[+] Debian 10 x86 'Buster' with LXDE
[-] Kubuntu 16.04 x86 with KDE
[+] Kubuntu 18.04 x86 with KDE
[+] Linux Mint 19 x86 'Tara' with Cinnamon
[-] Lubuntu 16.04 x86 with LXDE
[+] Lubuntu 18.04 x86 with LXDE
[-] MX Linux 18.3 x86 'Continuum' with Xfce
[+] Q4OS 3.8 x86 with Trinity
[-] Ubuntu 16.04 x86 with Unity
[+] Ubuntu 18.04 x86 with Gnome 3 and default Unity theme
[+] Ubuntu Budgie 18.04 x86 with Budgie
[-] Ubuntu MATE 16.04 x86 with MATE
[+] Ubuntu MATE 18.04 x86 with MATE
[-] Xubuntu 16.04 x86 with Xfce
[+] Xubuntu 18.04 x86 with Xfce
All older distributions based on Ubuntu 16.04 x86 LTS (which is supported by Canonical until March 2021) terminate on execution with the error message posted by deeproot. The error might indeed be circumvented by using libpbsqlite3.a from a PB 5.62 installation:
Code: Select all
UseSQLiteDatabase("Path/to/PB_5.62_Home/purelibraries/linux/libraries/libpbsqlite3.a")
Last edited by Shardik on Fri Oct 04, 2019 10:10 am, edited 2 times in total.
-
- Enthusiast
- Posts: 271
- Joined: Thu Dec 17, 2009 12:00 pm
- Location: Llangadog, Wales, UK
- Contact:
Re: PB 5.7 Beta Linker error
Thanks Shardik - very good information!
I clearly need to find more computer and disk space to load extra distos
The issue above was on MX Linux 18.3 x86. I have Mint and Manjaro for testing only, but 64-bit.
I clearly need to find more computer and disk space to load extra distos
The issue above was on MX Linux 18.3 x86. I have Mint and Manjaro for testing only, but 64-bit.
Re: PB 5.7 Beta Linker error
The problem is that Ubuntu v19.x and others are using the new kernel and compilers.
For some reason unknown to me, so much has been changed that many have to adapt their programs.
Constants names changed, functions removed and created with new names, etc..
For some reason unknown to me, so much has been changed that many have to adapt their programs.
Constants names changed, functions removed and created with new names, etc..
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive