LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 11-15-2008, 12:19 PM   #1
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Checking dependencies


Is using command:
Code:
root@Abitbox:~# ls /var/log/packages/* | grep -i gtk
a satisfactory way to check dependencies?

I ran that command for gtk and got
Code:
root@Abitbox:~# ls /var/log/packages/* | grep -i gtk
/var/log/packages/gtk+-1.2.10-i486-4
/var/log/packages/gtk+2-2.12.9-i486-1
/var/log/packages/gtk2-ex-formfactory-0.65-noarch-2sl
/var/log/packages/gtk2-perl-1.182-i486-2sl
/var/log/packages/gtkmm-2.12.5-i486-1_SBo
/var/log/packages/libgtkhtml-2.11.1-i486-1
/var/log/packages/pygtk-2.12.1-i486-2
root@Abitbox:~#
This brings up more questions:
  1. is it safe to run "removepkg" gtk+1.2.10
  2. do the two gtk packages conflict?
  3. do I need to remove both of them and then re-install gtk+2-2?

Any guidance greatly appreciated

Gary
 
Old 11-15-2008, 12:24 PM   #2
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by garyg007 View Post
Is using command:
Code:
root@Abitbox:~# ls /var/log/packages/* | grep -i gtk
a satisfactory way to check dependencies?
What exactly do you want to check for?

Quote:
Originally Posted by garyg007 View Post
is it safe to run "removepkg" gtk+1.2.10
Only if you have no packages that use gtk+1.2.10.
I wouldn't do that, because something probably uses them.

Quote:
Originally Posted by garyg007 View Post
do the two gtk packages conflict?
Which packages exactly? 1.2.10 and 2.x? No, they don't.
See the listings, they use different files and directories.

Quote:
Originally Posted by garyg007 View Post
do I need to remove both of them and then re-install gtk+2-2?
No. They are independent from each other.

In case you didn't notice, gtk+-1.2.10-i486-4 and gtk+2-2.12.9-i486-1 are different packages, not two different versions of one package. Base name of the first package is "gtk+", and base name of the other one is "gtk+2". So removepkg & etc will affect only one package, not both of them.

Last edited by ErV; 11-15-2008 at 12:30 PM.
 
Old 11-15-2008, 12:57 PM   #3
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Thank you for the reply.
Quote:
Originally Posted by ErV View Post
What exactly do you want to check for?
For example: the dependcies for software to be installed, lists - among others, "Gtk# 2.8";

I want to verify that that dependency is satisfied
by my system. I will run this command for all dependencies before installing new software.
Unless you can suggest a better, more efficient, way to verify that all dependencies are satisfied.


Gary
 
Old 11-15-2008, 01:24 PM   #4
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by garyg007 View Post
Thank you for the reply.
For example: the dependcies for software to be installed, lists - among others, "Gtk# 2.8";

I want to verify that that dependency is satisfied
by my system. I will run this command for all dependencies before installing new software.
To my opinion, normally simplest way to verify dependencies is to run ./configure and see if it doesn't like something. Of course you can write script like you suggested, but it won't be (In my opinion) 100% reliable - it won't have the quality to be included into automated dependency check. It will return additional packages, or miss (if you'll make it more strict) the ones you were looking for.
 
Old 11-15-2008, 03:20 PM   #5
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Thank you ErV, for your comments.

I do not think ./configure is the best initial way to determine what the dependencies for a package are.
for instance, when I try to install Banshee, ./configure produces the following
Code:
checking for GST... configure: error: Package requirements (gstreamer-0.10 >= 0.10.3
                gstreamer-base-0.10 >= 0.10.3
                gstreamer-plugins-base-0.10 >= 0.10.3
                gstreamer-controller-0.10 >= 0.10.3
                gstreamer-dataprotocol-0.10 >= 0.10.3) were not met:

No package 'gstreamer-0.10' found
No package 'gstreamer-base-0.10' found
No package 'gstreamer-plugins-base-0.10' found
No package 'gstreamer-controller-0.10' found
No package 'gstreamer-dataprotocol-0.10' found
The hilighted items were not found by searching for gstreamer. Some research led me to believe that the last two highlited items are part of gtk. For the moment I am assuming that the first highlighted item is part of gstreamer that I installed.

What makes dependencies fun is that when installing dependencies, they in turn have dependencies which in turn have their own depedencies ...... ad-nausium.

I believe that to avoid getting mired down in dependency-hell, a more systematic approach needs to be taken:
  • Check dependencies from the documentation
  • determine whether or not they are available on my system
  • Install those that are not available --- from the bottom up

Cheer's
Gary
 
Old 11-15-2008, 04:11 PM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by garyg007 View Post
No package 'gstreamer-controller-0.10' found
No package 'gstreamer-dataprotocol-0.10'


The hilighted items were not found by searching for gstreamer. Some research led me to believe that the last two highlited items are part of gtk. For the moment I am assuming that the first highlighted item is part of gstreamer that I installed.
It isn't part of gtk. As far as I know, gstreamer is video player, part of GNOME desktop. I'm assuming that banshee (never used that) is using names in fashion they are in debian/ubuntu - when one package can be split into several. When encountering new package, and it doesn't easily compile, the best approach is to find corresponding site and read some docs there. Or even better - search things like gstreamer slackware or slackware compiling banshee with google (just pick bunch of keywords related to your problem).

Quote:
Originally Posted by garyg007 View Post
What makes dependencies fun is that when installing dependencies, they in turn have dependencies which in turn have their own depedencies ...... ad-nausium.
Yes, sometimes this happens.

Quote:
Originally Posted by garyg007 View Post
I believe that to avoid getting mired down in dependency-hell, a more systematic approach needs to be taken:
To me it looks like you make things too complicated:
  • Most software I encountered before didn't have dependency hell problem.
  • Good amount of software that has dependencies with "dependency hell" problem can be ./configured (see ./configure --help) to work without using the dependency that is causing "hell". Some software can be hacked to remove "hell" dependency, but this is rare (example: sdlmame and its gconf dependency).
  • Slackware doesn't have means to check recursive dependency of package that isn't here.
To me it looks like systematic approach will be good in 10% of cases, but in other 90% it'll just take time without any benefits.

Quote:
Originally Posted by garyg007 View Post
[*]Check dependencies from the documentation
It isn't guaranteed to have all info on dependencies. Many program has unmodified default INSTALL documents. The only correct way is to check is to launch configure. Besides, often dependencies can be removed using certain ./configure flags (see ./configure --help).

Quote:
Originally Posted by garyg007 View Post
[*]determine whether or not they are available on my system
This is done by launching ./configure. You could save time and launch configure, and if something looks weird then read docs.

Quote:
Originally Posted by garyg007 View Post
[*]Install those that are not available --- from the bottom up
There are no guranteed "right" order to avoid the dependency hell, you easily might run into situation when the software in the middle of list should have been installed first, because all other dependencies depend on it, and will require recompilation after installing of this one.

I'd make systematic approach a bit different:
1) Try to compile in normal way.
2) If compilation looks complicated, quick-search for slackbuild, ready-to use package, or compilation instructions for your (or similar) distribution (spend 10 minutes at most for this).
3) If there is nothing acceptable, try to find alternative software, without compilation problems (spend 15 minutes at most for this).
4) If everything fails, then make some tea/coffee, and spend good amount of time solving dependency hell problem.

Last edited by ErV; 11-15-2008 at 04:12 PM.
 
Old 11-15-2008, 06:50 PM   #7
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Hekko ErV;

Again Thank you; I appreciate your input.

However I'm afraid that our opinions differ.

I just do not believe that starting at the top with ./configure and working down is the most logical way to appreach the problem. In my opinion, one should determine the lowest level dependencies, fix those and work up the chain.

Perhaps this is a result of my previous life as a mainframe systems programmer; and maybe my prehistoric pickled brain which has a problem keeping track of complex tasks.

Again, thanks for your input

Gary
 
Old 11-15-2008, 07:41 PM   #8
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by garyg007 View Post
I just do not believe that starting at the top with ./configure and working down is the most logical way to appreach the problem. In my opinion, one should determine the lowest level dependencies, fix those and work up the chain.
Of course, it is not "most logical", but in my opinion it is what is fastest in most cases (notice: not always) on slackware(notice: not on every distribution). I.e., structured approach isn't needed with installation of most software, so using it won't pay off, unless you really love to install complex-to-build things very often.

Quote:
Originally Posted by garyg007 View Post
Perhaps this is a result of my previous life as a mainframe systems programmer; and maybe my prehistoric pickled brain which has a problem keeping track of complex tasks.
To my opinion the only correct way to check dependencies automatically is to use dependencies information provided by humans. Such information exists and is part of system package managers on many distributions, but not in slackware.

Of course, all provided info is my opinion, and i might be wrong, and there might be way to actually do what you want. Anyway, I don't have anything else to add right now.
 
Old 11-15-2008, 08:34 PM   #9
the3dfxdude
Member
 
Registered: May 2007
Posts: 327

Rep: Reputation: 95
BTW, why are you interested in Banchee? I know from experience from a co-worker, it's a nightmare to compile even with Gnome installed...
 
Old 11-16-2008, 09:32 AM   #10
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by the3dfxdude View Post
BTW, why are you interested in Banchee? I know from experience from a co-worker, it's a nightmare to compile even with Gnome installed...
Yes, I know - I am currently experiencing the Banshee dependency-hell; but what the heck; I'm retired, I have lots of time.

Why Banshee --- it is one of the few linux apps that supports the IPOD. I believe it has some ipod features that amarok does not.
 
Old 11-17-2008, 07:40 AM   #11
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Gah, just spend ages writing a nice response only to be foiled by an unfortunate interruption and a mis-hit backspace.

I'm likely to have missed something, or maybe phrased something less carefully than it was before. No offense is intended, ymmv, and sometimes opinions differ. With that said, on with the show ...


You've run into an infrequent but irritating problem: working with gnome & base slackware. This is one of the few occasions where you will find yourself scratching your head and looking at a list of dependencies that spans from here to the moon and back.

The snippet of code originally provided is only enough to establish a packages existence within your system, not the contents of the package (which is actually what any program will depend against). There *is* code you can use to check to see if you've actually got a specific library or program installed ... examining a ./configure script will show you examples of this.

These two points coupled together, and put in light of ErV's suggestion that this dependency hell is the exception not the rule, hopefully highlight why ./configure is the fastest way to determine what you actually need.

In this specific case, you will likely have to build lots/most/all of gnome and go from there, so some things to help out there:

* GSB - http://gnomeslackbuild.org/ - should give you a leg up with building gnome deps.
* LFS - http://www.linuxfromscratch.org/ - you'll find a lot of help with dependency information here.
* Slackware package browser - http://packages.slackware.it/ - you can of course run scripts locally to extract the information, but if you don't have a library/program installed, it's harder to determine what package to install.

The more you play with compilation and installation, the easier you'll learn to recognise source that is going to be a pain, and source that will play nice. Gnome-related items I have found predominantly in the former category. Eventually I daresay you won't even need to check to see if something is installed, you'll just know =)

Finally, when you're well and truly involved in compilation, you might want to start writing your own slackbuilds and even chain-build scripts that just sort out all your issues for you should you want to repeat the endeavor in future. Alien_Bob has a slackbuild kit, Shilo has a template (can someone confirm it's Shilo?), and gnashley's src2pkg program turns source into a slackware package with minimal fuss.

I'm a little bias toward src2pkg, but hopefully you've got enough new keywords and links to find something you're comfortable working with.

Good luck, let us know if you get into any other difficulties!
- Piete.
 
Old 11-18-2008, 07:52 PM   #12
the3dfxdude
Member
 
Registered: May 2007
Posts: 327

Rep: Reputation: 95
Quote:
Originally Posted by garyg007 View Post
Yes, I know - I am currently experiencing the Banshee dependency-hell; but what the heck; I'm retired, I have lots of time.

Why Banshee --- it is one of the few linux apps that supports the IPOD. I believe it has some ipod features that amarok does not.
The reason why I asked you why you wanted to use it is because I was pretty sure that you had the same reason my co-worker wanted banchee. He spent weeks trying to sort out how to get banchee to run. Because how long it was taking him, I started helping him to show ways he could compile the dependencies. Finally I had enough and did a google search and had him running his Ipod in a few minutes with a different program:

http://www.gtkpod.org/
 
Old 11-19-2008, 01:24 PM   #13
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Original Poster
Rep: Reputation: 31
the3dfxdude,piete Thank you for the comments; I really appreciate the time and effort to try and pound some sense into my head.

I got quit frustrated the other day after a configure finished without errors and then the make failed. This led to one of my all-to-frequent "oh-no"* seconds ---- I managed to trash the Suse system and, while trying to restore the slackware system, trashed that one also - so I am presently rebuilding from bits-n-pieces of the backup I have.

Oh well, keeps me out of the pubs and out of trouble.

Gary

* The time between when your finger hits the enter key and you realize that you shouldn't-have-done-that

Last edited by garyg007; 11-19-2008 at 01:27 PM.
 
Old 11-19-2008, 02:17 PM   #14
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,768

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
"Oh well, keeps me out of the pubs" -Hey, that's my line!
Anyway now you've found another snag in dependency checking. Quite often, Makefiles will try to link to some library which the configure script has not checked for, or in some cases, the installed library package doesn't include the static library which the Makefile is trying to include. The first case may be the fault of the program developer and the second case may be the fault of your distro.
One other snafu when trying to satisfy dependencies is that some programs need a binray program from another package instead of some library. A good case that demonstrates this is the 'man' program, which needs 'groff' in order to funtion, but ldd won't tell you that, of course.
All this goes to demonstrate that there is no substitute for human input regarding dependency resolution -it's a huge job that only one distro gets consistently right or darned close to it -debian. But there are literally hundreds if not thousands of people involved in the task. Each package is responsible for supplying its' own dependency info. With 20,000+ packages, it's easy to estimate the number of maintainers as some multiple of 1,000. And the vetting process for 'climbing the ladder' to inclusion in a stable release includes hundreds of testers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Checking for Dependencies yougene Slackware 3 12-21-2005 09:07 AM
Checking Dependencies RodimusProblem Programming 7 01-11-2005 08:48 PM
error on start-up checking modules dependencies isamu_vf0 Linux - Software 0 08-17-2004 10:25 PM
Checking for Dependencies Darkman_2099 Linux - Newbie 2 10-29-2003 07:52 PM
building from src ...checking dependencies?? purpleburple Linux - General 1 12-31-2002 11:09 AM


All times are GMT -5. The time now is 05:52 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration