[Gambas-user] Cannot find proprietary shared libraries.

PICCORO McKAY Lenz mckaygerhard at gmail.com
Tue Jun 5 15:41:27 CEST 2018


when u are using PRIVATIVE LINES you mostly are on your own

Benoit said the most normal and obviously rules to try to solve it! but
more than that are very difficult!

here all cannot make so much due we cannot "see" so much! right? so your
vendor rules must be more flexible!

the readelf reurn no links due there-s no link usage.. maybe the symbols
exported by your libs are bad refence or must not be used as its..

as i said, must ask to the authors of the library

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2018-06-05 8:39 GMT-04:00 ML <d4t4full at gmail.com>:

> On 05/06/18 09:10, Benoît Minisini wrote:
> > Le 05/06/2018 à 14:02, ML a écrit :
> >> Guys, need help accessing proprietary shared libs from Gambas
> >> (v3.11.2) from PPA in Ubuntu 16.04 x64.
> >> I've been given -after signing an NDA with a company- a couple of
> >> development .so files.
> >> I placed these .so files in a subfolder inside my home folder.
> >> I've put this path inside a .conf file, put this .conf file inside
> >> /etc/ld.so.conf.d and ran ldconfig as superuser.
> >> I verified the libs and their location are in the cache by grepping
> >> the output from ldconfig -p: They are both there.
> >> But alas! Gambas cannot find them. I have this sample code (sorry,
> >> cannot give real code details 'cos of the NDA):
> >> Lib call declaration in a module (say it is called modLib):
> >>
> >>    'The call name used is the actual call name, respecting
> >> upper/lowercase, ie: no need for EXEC.
> >>    Public Extern SomeLib_GetVersion(versionStrPtr As Pointer) In
> >> "libName"
> >>
> >> I also have a form with -appx- the following code:
> >>
> >>    Public Sub Form_Open()
> >>      Dim libVersion As String = String(128, " ")
> >>      Dim strPtr As Pointer = VarPtr(libVersion)
> >>      Try modLibrary.SomeLib_GetVersion(strPtr)
> >>      If (Error.Code) Then
> >>        Message.Error(Error.Text)
> >>      End If
> >>    End
> >>
> >> When I call this from a form, I get the following error:
> >> Cannot find dynamic library 'libName.so': libName.so: cannot open
> >> shared object file: No such file or directory
> >> Now, I've seen lib names with a trailing colon and (version?) number.
> >> I don't know how or where can I get this info from, or if I need them.
> >> How can I get Gambas able to find and use these .so files?
> >> Regarding these trailing ":<number>" in EXTERN declarations: How do I
> >> find these out, and how do I know whether I need them or not?
> >>
> >
> > The name of the library is directly passed to the dlopen() function,
> > and the error you get is the error returned by dlopen().
> > The "<number>" after the colon is just the version number of the
> > shared library. You find it in the name of the shared library symbolic
> > link. You have to specify it only if you have multiple versions of the
> > same library, or if you requested a specific feature of a specific
> > version of the library.
> > Regards,
>
> Well, then I'm so far royally screwed... Ran a readelf on the libs, it
> returned this:
>
>    0x00000001 (NEEDED)                     Shared library:
> [libpthread.so.0]
>    0x00000001 (NEEDED)                     Shared library: [librt.so.1]
>    0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
>    0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]
>    0x00000001 (NEEDED)                     Shared library: [libm.so.6]
>    0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
>    0x00000001 (NEEDED)                     Shared library: [libc.so.6]
>
> Then, I ran ldconfig 7 times, grepping the library names one at a time.
> I got 2 entries for each dependency, one for 32 and one for 64 bit.
> Everything seems in place, but no luck.
> Will next try running Gambas as superuser, and if that also fails, I'll
> move the libs to a system folder to see if I have some kind of access
> issue.
>
> Any other suggestions?
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180605/c0a4ea1e/attachment.html>


More information about the User mailing list