It is currently Thu Apr 02, 2020 5:34 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: PB 5.7 Beta Linker error
PostPosted: Tue Dec 18, 2018 5:44 pm 
Offline
Addict
Addict

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 1071
Location: Portugal
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

_________________
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.70 Beta Linker error
PostPosted: Thu Dec 20, 2018 6:23 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Dec 17, 2009 12:00 pm
Posts: 190
Location: Llangadog, Wales, UK
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:
Quote:
/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
interesting things:
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.

_________________
www.deeproot.co.uk


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.7 Beta Linker error
PostPosted: Wed Oct 02, 2019 12:42 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Dec 17, 2009 12:00 pm
Posts: 190
Location: Llangadog, Wales, UK
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!)

_________________
www.deeproot.co.uk


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.7 Beta Linker error
PostPosted: Thu Oct 03, 2019 8:51 am 
Online
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1693
Location: Germany
deeproot wrote:
Unfortunately, with Linux 32-bit the linker error above still exists.

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):
[-] 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:
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.

Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.7 Beta Linker error
PostPosted: Thu Oct 03, 2019 10:09 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Dec 17, 2009 12:00 pm
Posts: 190
Location: Llangadog, Wales, UK
Thanks Shardik - very good information!

I clearly need to find more computer and disk space to load extra distos :mrgreen:

The issue above was on MX Linux 18.3 x86. I have Mint and Manjaro for testing only, but 64-bit.

_________________
www.deeproot.co.uk


Top
 Profile  
Reply with quote  
 Post subject: Re: PB 5.7 Beta Linker error
PostPosted: Thu Oct 03, 2019 10:47 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2332
Location: Germany
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..

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye