|
Post by Stefan Pendl on Apr 3, 2021 0:05:16 GMT -5
Executing any SQLite sample shipping with LB5 on 64-bit Windows or Linux stop at the sqlconnect statement without error. The same samples work fine on 32-bit platforms.
|
|
|
Post by metro on Apr 3, 2021 2:37:55 GMT -5
I had to get the 64bit Dll for windows www.sqlite.org/download.htmland use this with 64bit Linux sub sqlExec query$ sqliteconnect #records, "Records.db","/usr/lib/x86_64-linux-gnu" #records execute(query$) #records disconnect() end sub
|
|
|
Post by Carl Gundel on Apr 3, 2021 8:27:29 GMT -5
I had to get the 64bit Dll for windows www.sqlite.org/download.htmland use this with 64bit Linux sub sqlExec query$ sqliteconnect #records, "Records.db","/usr/lib/x86_64-linux-gnu" #records execute(query$) #records disconnect() end sub
Many distros come with it preinstalled, but you will need to install it with some. If you open a terminal and type sqlite3 and press Enter it will respond in the affirmative if it is already installed. Otherwise you may need to download it, or install it using apt-get. www.quackit.com/sqlite/tutorial/sqlite_installation.cfmUltimately all this will need to be made simple as possible and with some good documentation to bridge the gap where needed.
|
|
|
Post by Stefan Pendl on Apr 6, 2021 8:27:17 GMT -5
So for the 64-bit Windows package of LB5 the wrong SQLite DLL is included, which needs to be fixed. Chris Iverson would you mind adding sqlite3 as a dependency to your package?
|
|
|
Post by Stefan Pendl on Apr 6, 2021 9:00:37 GMT -5
sub sqlExec query$ sqliteconnect #records, "Records.db","/usr/lib/x86_64-linux-gnu" #records execute(query$) #records disconnect() end sub
Thanks metro for pointing out the need for the path to the library.
|
|
|
Post by Stefan Pendl on Apr 6, 2021 9:01:58 GMT -5
Downloading the correct DLL for Windows 64-bit has worked a treat ;-)
|
|
|
Post by Carl Gundel on Apr 6, 2021 10:05:50 GMT -5
sub sqlExec query$ sqliteconnect #records, "Records.db","/usr/lib/x86_64-linux-gnu" #records execute(query$) #records disconnect() end sub
Thanks metro for pointing out the need for the path to the library. Yeah, there is no standard place to find it. Linux is like that for a lot of things.
|
|
|
Post by Carl Gundel on Apr 6, 2021 10:11:39 GMT -5
Write a Linux LB5 program to search for sqlite3 drivers.
|
|
|
Post by Chris Iverson on Apr 6, 2021 12:06:24 GMT -5
So for the 64-bit Windows package of LB5 the wrong SQLite DLL is included, which needs to be fixed. Chris Iverson would you mind adding sqlite3 as a dependency to your package? It should already have a dependency on SQLite. chris@shinoko:~$ apt show lb5-alpha Package: lb5-alpha Version: 0.5.352 Priority: extra Section: devel Maintainer: Chris Iverson <cj.no.one@gmail.com> Installed-Size: 57.3 MB Depends: libc6, libx11-6, zlib1g, libsqlite3-0 Homepage: https://libertybasic.com License: unknown Vendor: Shoptalk Systems Download-Size: 16.5 MB APT-Manual-Installed: yes APT-Sources: https://chrisiverson.net/lb5-alpha/repo dev/main amd64 Packages Description: Liberty BASIC v5.0 alpha 352 for Linux amd64
|
|
|
Post by metro on Apr 6, 2021 15:05:08 GMT -5
Write a Linux LB5 program to search for sqlite3 drivers.
so I ran this in lb5
run "find /usr/lib/*/libsqlite3.so.0 > found.txt"'
using the locate command instead, with out the path will find dozens of copies. been experimenting with both 64 and 32 bit so needed a way to set the path to the library based upon the architecture . That way I can use the same function
run "arch > arch.txt"
|
|
|
Post by Carl Gundel on Apr 6, 2021 17:24:44 GMT -5
Write a Linux LB5 program to search for sqlite3 drivers.
so I ran this in lb5
run "find /usr/lib/*/libsqlite3.so.0 > found.txt"'
using the locate command instead, with out the path will find dozens of copies. been experimenting with both 64 and 32 bit so needed a way to set the path to the library based upon the architecture . That way I can use the same function
run "arch > arch.txt"
In my own experience using several different Linux distros the libraries are not consistently located.
|
|
|
Post by Chris Iverson on Apr 6, 2021 18:53:41 GMT -5
The path(s) aren't the same, but you can usually find those paths by looking at /etc/ld.so.conf, and well as any files that references(usually any files in /etc/ld.so.conf.d/*)
It can be in multiple places, depending on the distribution and architecture(and the architectures can be split, like x86 and x86-64 are.)
For example, here's all the library locations on my main linux system(and the commands I used to find them):
chris@shinoko:/$ cat /etc/ld.so.conf include /etc/ld.so.conf.d/*.conf
chris@shinoko:/$ ls /etc/ld.so.conf.d fakeroot-x86_64-linux-gnu.conf libc.conf zz_i386-biarch-compat.conf i386-linux-gnu.conf x86_64-linux-gnu.conf zz_x32-biarch-compat.conf
chris@shinoko:/$ cd /etc/ld.so.conf.d
chris@shinoko:/etc/ld.so.conf.d$ cat fakeroot-x86_64-linux-gnu.conf /usr/lib/x86_64-linux-gnu/libfakeroot
chris@shinoko:/etc/ld.so.conf.d$ cat i386-linux-gnu.conf # Multiarch support /usr/local/lib/i386-linux-gnu /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /usr/local/lib/i686-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu
chris@shinoko:/etc/ld.so.conf.d$ cat libc.conf # libc default configuration /usr/local/lib
chris@shinoko:/etc/ld.so.conf.d$ cat x86_64-linux-gnu.conf # Multiarch support /usr/local/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
chris@shinoko:/etc/ld.so.conf.d$ cat zz_i386-biarch-compat.conf # Legacy biarch compatibility support /lib32 /usr/lib32
chris@shinoko:/etc/ld.so.conf.d$ cat zz_x32-biarch-compat.conf # Legacy biarch compatibility support /libx32 /usr/libx32
chris@shinoko:/etc/ld.so.conf.d$
The libraries can be located in any one of the listed folders, which will vary depending on the architecture it's made for.
The folders would be searched in order, looking for matching architectures.
|
|