Tiny Core Linux

Tiny Core Extensions => TCE Bugs => Topic started by: beetle on May 23, 2018, 12:33:58 AM

Title: Missing shared object for svn in new install (current)
Post by: beetle on May 23, 2018, 12:33:58 AM
I just did a minimalistic tinycore install.

Wanted to get some files off an svn repo. But it appears there's a missing dependency.

Code: (bash) [Select]
tc@box:~$ svn
svn: error while loading shared libraries: libsasl2.so.3: cannot open shared object file: No such file or directory

Not sure of what I should do to cleanly work around this.

Code: (bash) [Select]
tc@box:~$ uname -a
Linux box 4.14.10-tinycore #876 SMP Mon Jan 1 15:00:32 UTC 2018 i686 GNU/Linux
Title: Re: Missing shared object for svn in new install (current)
Post by: Rich on May 23, 2018, 12:40:26 AM
Hi beetle
That's available in  cyrus-sasl.tcz.
Title: Re: Missing shared object for svn in new install (current)
Post by: beetle on May 23, 2018, 12:52:56 AM
Oh thanks! After I installed cyrus-sasl.tcz, svn complained of a missing libsqlite3 so.

Code: (bash) [Select]
svn: error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory
I guessed and installed libsqlite3.tcz and now it complains about libldap

Code: (bash) [Select]
svn: error while loading shared libraries: libldap-2.4.so.2: cannot open shared object file: No such file or directory
While I'm still looking for the package that would contain this... 1) what's the easy way to find packages that contain "those" files ?

Also I understand that the dependencies for svn.tcz were not completed. 2) Guessing the maintainer needs help?

Thanks!
Title: Re: Missing shared object for svn in new install (current)
Post by: Rich on May 23, 2018, 01:01:00 AM
Hi beetle
That's in  openldap.tcz.

Quote
1) what's the easy way to find packages that contain "those" files ?
In the  Apps  utility click the button labeled  Search  and change it to  Provides. Then enter what you are looking for in
the text box to the right.
Title: Re: Missing shared object for svn in new install (current)
Post by: beetle on May 23, 2018, 01:09:17 AM
Thanks... Now I know better...
And since I'm all console / no GUI, I just discovered I can do that (search using "Provides") with tce-ab.
Case closed!
Thanks!

Title: Re: Missing shared object for svn in new install (current)
Post by: Rich on May 23, 2018, 01:13:42 AM
Hi beetle
You are welcome.
Title: Re: Missing shared object for svn in new install (current)
Post by: Juanito on May 23, 2018, 01:46:45 AM
dep file adjusted - thanks for reporting this.
Title: Re: Missing shared object for svn in new install (current)
Post by: squigley on August 13, 2018, 11:21:38 AM
Not sure if I should be opening a new thread or replying to this one.

I am trying to install the svn extension however it has a dependency on "open-ldap", except the extension is "openldap", so it is getting a 404 when trying to download/install "open-ldap.tcz".

Is there a way to workaround the dep file?
Title: Re: Missing shared object for svn in new install (current)
Post by: Rich on August 13, 2018, 11:31:46 AM
Hi squigley
You could modify your copy of the dependency file until an administrator can fix the copy in the repository.
Title: Re: Missing shared object for svn in new install (current)
Post by: Nathan_SR on August 14, 2018, 11:41:32 AM

As a means of detecting library dependencies of binaries in all packages, automatically, here is a piece of code, that I found on the internet, after a google search, which can be adapted suitably, to meet our needs :

Code: [Select]
echo ":: $file ..."
        if file $file | grep 'ELF' 1>/dev/null; then
          if ldd $file | grep 'not found' 1>/dev/null; then
            pkg=$(basename $(grep -E "^$(echo $file | sed 's:^/::')$" --recursive /var/log/packages | sed 's/:.*//'))
            libraries=$(ldd $file | grep 'not found' | sed 's/ =>.*//')
            for library in $libraries; do
              in_package="$(slackpkg file-search $library | grep uninstalled | sed 's/^.* //' | xargs)"
              if [ -z "$in_package" ]; then
                in_package="$(grep $library --recursive /var/log/packages | sed -e 's/:.*//' -e 's:.*/::')"
                if [ -n "$in_package" ]; then
                continue
                fi
                in_package="?"
              fi
              echo "$file [$pkg] => $library [$in_package]"
            done
          fi
        fi

This code is from this article : https://gist.github.com/nihilismus/3888a82b6f83eda9a837

Needless to say, loading and un-loading of each extension needs to take place, in a vanilla system, thereby isolating each extension seperately from others, to check if all its dependencies are covered, in its .dep file.

These QA / QC checks can be routinely automated with a custom script like this.

Hope this helps.
Title: Re: Missing shared object for svn in new install (current)
Post by: Juanito on August 14, 2018, 11:54:59 AM
dep file corrected - thanks for reporting this
Title: Re: Missing shared object for svn in new install (current)
Post by: Nathan_SR on August 14, 2018, 12:45:29 PM

Hi Juanito,

I guess, my post is not understood properly. I am talking about a way of detecting library dependencies of binaries, either in all Extensions, automatically OR for an individual / future Extension, submitted, on demand.

This will prevent issues like the one in this topic.

Regards,

Nathan SR
Title: Re: Missing shared object for svn in new install (current)
Post by: Rich on August 14, 2018, 01:00:48 PM
Hi Nathan_SR
Here is a thread with a similar script:
http://forum.tinycorelinux.net/index.php/topic,12002.msg63894.html#msg63894
Title: Re: Missing shared object for svn in new install (current)
Post by: Nathan_SR on August 14, 2018, 02:19:19 PM

Hi Rich,

I read through the entire topic, including the scripts, by Jason W. Great Work. He has prevented overwriting of current libraries by newer extensions, by that script.

What we are talking about in this thread, is to identify "not found" libraries of any Extension, be it already there OR newly submitted ones. Just imagine this: the author of a new extension, may have all libraries at his end, due to his installation of previous extensions and so the new extension works at his end, perfectly. But, when installed and tested on a Vanilla System, by our new users, the .dep file is missing some library dependencies, like the ones you identified in this topic.

So, the script, I am talking about, works in that angle of perfecting, any .dep file, including adding entries to it, automatically.

I hope you are getting my point. Please go through the script I gave above, closely, to understand, how it identifies, "not found" library entires from the ldd output and can re-build the .dep file, automatically.

Regards,

Nathan SR
Title: Re: Missing shared object for svn in new install (current)
Post by: Misalf on August 14, 2018, 04:52:32 PM
Hi Nathan_SR,
as I understand it, extension creators are meant to test their extensions on a base vanilla system before submission.
See: http://wiki.tinycorelinux.net/wiki:creating_extensions#testing (http://wiki.tinycorelinux.net/wiki:creating_extensions#testing)
Nonetheless, sometimes errors do occur.
Title: Re: Missing shared object for svn in new install (current)
Post by: Nathan_SR on August 14, 2018, 08:07:04 PM
Thanks Misalf for pointing it out.

As it says:

Quote
It is easy to leave out a required dependency from your .dep file. Do use base norestore, and check the dependencies in particular.

An automated script/tool would be handy to check and correct it out, which is the subject of my posts here.

Another script/tool by Jason W already checks if the new extension will overwrite any existing libraries. My suggestion is an extension to that script. Hope all these scripts get documented, in that wiki page as well, for the benefit of future extension makers.
Title: Re: Missing shared object for svn in new install (current)
Post by: polikuo on August 14, 2018, 11:22:40 PM
As a means of detecting library dependencies of binaries in all packages ...
I've made a script (http://forum.tinycorelinux.net/index.php/topic,20584.msg128291.html) for that purpose years ago.
The latest script is available on my github (https://raw.githubusercontent.com/polikuo/practice/master/get-dep-list).
To run it, type
Code: [Select]
./scriptname /tmp/tcloop/extension_name
Title: Re: Missing shared object for svn in new install (current)
Post by: Nathan_SR on August 15, 2018, 12:57:58 AM

Yes polikuo, this is exactly, what I was referring to.

@Juanito,

is there a possibility of running the polikuo's script, to detect missing libraries of existing/new extensions, at either end ( i.e. Maintainer's as well as the Central Quality Controller's end )

This will help to prevent issues like that of svn, discussed in this topic.
Title: Re: Missing shared object for svn in new install (current)
Post by: Juanito on August 15, 2018, 04:45:35 AM
The svn error was caused by my own typo  :P

Dependencies found in this way are only part of the issue, there are also run time dependencies and "nice to have" dependencies to be considered.