CurtTilmes / raku-dbsqlite

SQLite access for Raku
10 stars 4 forks source link

Native lib name sqlite3 vs sqlite #14

Closed hythm7 closed 3 years ago

hythm7 commented 3 years ago

looks like the library name on latest ubuntu is libsqlite3.so.

> use NativeLibs; NativeLibs::Searcher.try-versions('sqlite', 'sqlite3_libversion', 0);
(Any)
> use NativeLibs; NativeLibs::Searcher.try-versions('sqlite3', 'sqlite3_libversion', 0);
libsqlite3.so.0

May be the dependency name in META6.json should be changed to sqlite3:from< native > ?

another alternative would be (based on this comment ) :

{ "any": [ "sqlite3:from< native >", "sqlite:from< native >"] }

although this might be considered abusing the alternative dependencies suggestion.

abraxxa commented 3 years ago

I have a similar issue, the requires in META6.json doesn't allow the Ubuntu 21.04 libsqlite3.so.0 file to be found as valid, installed dependency. The only thing regarding native lib requirements is https://design.raku.org/S22.html#%3Afrom%3Cnative%3E.

CurtTilmes commented 3 years ago

I released a new version that changes sqlite to sqlite3 in META6.json. Hopefully that helps.

hythm7 commented 3 years ago

Thanks. that fixed the issue.

abraxxa commented 3 years ago

Sadly not for me on Ubuntu 21.04:

The following distributions will be upgraded: DB::SQLite:ver<0.7>:auth<github:CurtTilmes>:api<1>
===> Updating: DB::SQLite:ver<0.7>:auth<github:CurtTilmes>:api<1>
===> Searching for missing dependencies: sqlite3:from<native>
===> Failed to find dependencies: sqlite3:from<native>
Failed to resolve some missing dependencies (use e.g. --exclude="sqlite3" to skip)
hythm7 commented 3 years ago

Are you sure you have libsqlite3-dev linux package installed? I just tested on debian 10 latest and it works. without libsqlite3-dev I get similar error, after running # apt install libsqlite3-dev and then trying install DB::SQLite it worked without issues.

abraxxa commented 3 years ago

I've tried that initially but it didn't help so I uninstalled it again. Installed it again now and it solves the issue. But from a technical standpoint the files contained in this package aren't required and the real library should be checked instead.