LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-20-2024, 01:55 AM   #1
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Odd experience with geeqie and curl: I just want an explanation


As some of you know, I don't have a complete Slackware installation. I have what I need, add stuff if the need arises, and do my own dependency checking.

I use geeqie as my all-purpose image viewer. The other day, I found a need for curl so I installed it. It didn't run the first time I tried it because it was missing one of its dependencies, a library called libcares/c-ares (which does dns processing apparently). So I thought "OK, I'll install that in a minute. I'm busy now.". Then I launched geeqie to look at something I happened to be working on at the time, and suddenly that didn't work either. When I launched it from a terminal (which is how I always investigate this sort of problem), I found it wanted libcares too. So I installed c-ares and then they both worked.

What I want to know is why geeqie worked before without libcares. It's now bound to libcurl, which is bound to libcares, so that explains the dependency, but how did it work before I installed curl/libcurl? And why would an image viewer want to do DNS checking anyway?

Last edited by hazel; 03-20-2024 at 01:56 AM.
 
Old 03-20-2024, 05:24 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,304

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I don't know, but just count the libraries in the output of 'ldd /usr/bin/geeqie |more'

The guy obviously has a lot more features he's imagining he is going to put in.
 
Old 03-20-2024, 05:35 AM   #3
ctrlaltca
Member
 
Registered: May 2019
Location: Italy
Distribution: Slackware
Posts: 323

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
This is the dependency tree:
Code:
/usr/bin/geeqie
    libexiv2.so.28 => /usr/lib64/libexiv2.so.28
        libcurl.so.4 => /usr/lib64/libcurl.so.4
            libcares.so.2 => /usr/lib64/libcares.so.2
So it's libexiv2 that requires curl.
Exiv2 itself is able to parse images from a website, eg:
Quote:
exiv2 [ option [ arg ] ]+ [ action ] file ...

Where file is one or more files containing image metadata. These can optionally be specified using a URL (http, https, ftp, sftp, data and file supported) or a wildcard pattern (e.g., image1.tiff image2.jpg, https://www.exiv2.org/Stonehenge.jpg or *.jpg)
 
1 members found this post helpful.
Old 03-20-2024, 05:36 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
@business_kid
Code:
$ ldd /usr/bin/geeqie|wc -l
227
Wow!

Last edited by hazel; 03-20-2024 at 05:43 AM.
 
Old 03-20-2024, 05:40 AM   #5
giomat
Member
 
Registered: Jul 2017
Posts: 337

Rep: Reputation: 238Reputation: 238Reputation: 238
In geeqie source i don't see explicit calls to libcurl, but there is a download_web_file function in src/ui-fileops.cc that is used in some dialogs. Perhaps curl is invoked there under the hood using the glib interface, and it wasn't before.

[EDIT] sorry didnt see all the replies
 
Old 03-20-2024, 05:42 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by ctrlaltca View Post
This is the dependency tree:
Code:
/usr/bin/geeqie
    libexiv2.so.28 => /usr/lib64/libexiv2.so.28
        libcurl.so.4 => /usr/lib64/libcurl.so.4
            libcares.so.2 => /usr/lib64/libcares.so.2
So it's libexiv2 that requires curl.
Exiv2 itself is able to parse images from a website, eg:
Cool. How did you get that tree btw? I'd like to be able to do that.

But why did libexiv work OK before I installed curl?
 
Old 03-20-2024, 05:52 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,855

Rep: Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311Reputation: 7311
Quote:
Originally Posted by hazel View Post
But why did libexiv work OK before I installed curl?
I guess it does not need curl every time, but there can be some cases when it is required. So it depends on the image you use.
 
Old 03-20-2024, 06:04 AM   #8
ctrlaltca
Member
 
Registered: May 2019
Location: Italy
Distribution: Slackware
Posts: 323

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
Originally Posted by hazel View Post
Cool. How did you get that tree btw? I'd like to be able to do that.
Install https://slackbuilds.org/repository/1...tem/pax-utils/ , it contains a small utility called "lddtree"
 
1 members found this post helpful.
Old 03-20-2024, 06:26 AM   #9
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,787

Rep: Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468
You should have aaa_libraries installed. It is a small collection of shared libraries programs need. For example, it has both libcares and libcurl. That's why the c-ares and curl packages are not needed to run for example geeqie.
 
1 members found this post helpful.
Old 03-20-2024, 06:32 AM   #10
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,787

Rep: Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468Reputation: 1468
Quote:
Originally Posted by ctrlaltca View Post
Install https://slackbuilds.org/repository/1...tem/pax-utils/ , it contains a small utility called "lddtree"
I wrote a little script a few days ago to find similar info. Unfortunately, I called it "lddtree", too... It's here: https://www.linuxquestions.org/quest...2/#post6490128. It shows separately the direct and indirect dependencies of a program or library. The output is different from your example.
 
1 members found this post helpful.
Old 03-20-2024, 07:20 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by Petri Kaukasoina View Post
You should have aaa_libraries installed. It is a small collection of shared libraries programs need. For example, it has both libcares and libcurl. That's why the c-ares and curl packages are not needed to run for example geeqie.
I was planning to install aaa-libraries this morning in my "free" period (pre-8.00 AM) as it's quite a bulky download, but then I saw that I could install c-ares by itself and it's only a few kb, so I did that instead.


PS: I must be going senile. Of course I already had aaa_libraries; it's that package that used to be called aaa_elflibs. But I must have had an earlier version with less in it.

Last edited by hazel; 03-21-2024 at 02:57 AM.
 
Old 03-20-2024, 10:09 AM   #12
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 401

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
A lot of programs with big dependencies uses dlopen or a library that mask the use of dlopen. The library the program want is tested and if it exists it is used. Here maybe libcurl has been tested as ok after been added, and then aborted due to the lack of libcares.

In geeqie, there seems to be libs that encapsulate dlopen.
 
1 members found this post helpful.
Old 03-20-2024, 10:23 AM   #13
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,575

Original Poster
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Quote:
Originally Posted by BrunoLafleur View Post
A lot of programs with big dependencies uses dlopen or a library that mask the use of dlopen. The library the program want is tested and if it exists it is used. Here maybe libcurl has been tested as ok after been added, and then aborted due to the lack of libcares.
That's probably the explanation then.
 
Old 03-20-2024, 03:25 PM   #14
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
Quote:
Originally Posted by Petri Kaukasoina View Post
I wrote a little script a few days ago to find similar info. Unfortunately, I called it "lddtree", too...
So a new name could be "lddres", as in resolver, or reside. Problem (re-)solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Jan 17, 2022 geeqie upgrade and odd behavior when opening new views. gordydawg Slackware 23 02-13-2022 07:58 AM
gv and geeqie crashes and KDE5 security flaw guanx Slackware 6 12-22-2021 12:33 PM
CentOS 6.7 has really OLD curl. Best way to update curl? sneakyimp Linux - Server 4 04-26-2016 03:06 PM
[SOLVED] odd javascript code, would like explanation as to its function if possible, please frieza Programming 2 07-03-2012 01:16 PM
cURL: Server has many IPs, how would I make a cURL script use those IPs to send data? guest Programming 0 04-11-2009 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration