LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Newbie Question: How do I know if I have the dependencies I need? (https://www.linuxquestions.org/questions/slackware-14/newbie-question-how-do-i-know-if-i-have-the-dependencies-i-need-4175462511/)

Miranden 05-18-2013 02:39 PM

Newbie Question: How do I know if I have the dependencies I need?
 
I would like to install this:

http://slackbuilds.org/repository/14...ktop/nitrogen/

How do I know if I have the dependencies it says I need (and the dependencies of those dependencies)? I did a full install, but I do not know where to check to see if a particular package is installed. Thanks.

Woodsman 05-18-2013 02:53 PM

A primary presumption with slackbuilds.org is a full install of the stock Slackware. That is not always a requirement, just a presumption.

Next check the specific web page for dependencies. In the case of the nitrogen web page you linked, gtkmm is required. Selecting that link indicates mm-common and atkmm are further dependencies. Selecting the atkmm link indicates pangomm is required. Selecting the pangomm link indicates cairomm is required. Selecting the cairomm link indicates glibmm is required. Selecting the glibmm link indicates libsigc++ is required.

Thus the build order would be somethng like this:

libsigc++
glibmm
cairomm
pangomm
atkmm
mm-common
gtkmm
nitrogen

Some folks use sbopkg to avoid having to deal with the manual inspection of dependencies.

Miranden 05-18-2013 02:57 PM

Quote:

Originally Posted by Woodsman (Post 4953906)
A primary presumption with slackbuilds.org is a full install of the stock Slackware. That is not always a requirement, just a presumption.

Next check the specific web page for dependencies. In the case of the nitrogen web page you linked, gtkmm is required. Selecting that link indicates mm-common and atkmm are further dependencies. Selecting the atkmm link indicates pangomm is required. Selecting the pangomm link indicates cairomm is required. Selecting the cairomm link indicates glibmm is required. Selecting the glibmm link indicates libsigc++ is required.

Thus the build order would be somethng like this:

libsigc++
glibmm
cairomm
pangomm
atkmm
mm-common
gtkmm
nitrogen

Some folks use sbopkg to avoid having to deal with the manual inspection of dependencies.

Thank you. That answers my question perfectly. And I guess I can assume that the dependencies listed on Slackbuilds.org will be accurate?

astrogeek 05-18-2013 03:01 PM

Quote:

Originally Posted by Miranden (Post 4953898)
How do I know if I have the dependencies it says I need (and the dependencies of those dependencies)?

The simple way is to see if the desired dependency package exists in /var/log/packages/... maybe like this for example to check for libsigc++

ls /var/log/packages |grep libsigc

/var/log/packages is the "database" of all installed packages.

chess 05-18-2013 03:41 PM

sbopkg also has the concept of queuefiles - basically a text file that lists the dependencies in the right order. sbopkg can load up the queuefile and then you can process the queue. There are folks who maintain repos of sbopkg queuefiles (like this one: http://gitorious.org/sbopkg-slackware-queues). Alternatively, you can pull the sbopkg subversion repository and use a helper script called 'sqg' that will generate queuefiles for you by processing the REQUIRES line in each .info file in SlackBuilds.org. You can also grab the script here: https://sbopkg.googlecode.com/svn/tr...oc/contrib/sqg

Woodsman 05-18-2013 03:41 PM

Quote:

And I guess I can assume that the dependencies listed on Slackbuilds.org will be accurate?
Yes.

Once in a blue moon I notice a listed dependency is not really required, but that involves having used Slackware and free/libre software for many years. When in doubt build the dependencies.

As astrogeek noted, inspecting the contents of /var/log/packages will help you know whether you have already built a dependency package from slackbuilds.org. As I mentioned, a full stock install is presumed and those dependencies are never listed in the slackbuilds.org web pages. Sometimes for people who do not install a full stock system, building a slackbuilds.org package will fail, but the failure message usually provides a clue as to what is missing. Then again, those who do not install a full stock system have been using Slackware long enough to know what they are doing.

If you want to see how the process works, build notrogen without building any of the dependencies. Either the build process will fail with messages why the build failed (missing libraries, etc.) or the build will succeed but the final app will not run as expected, usually with appropriate stdout/stderr messages. The same process applies when a presumed stock Slackware package is not installed. The build process or run-time errors will provide clues.

This process might sound involved or complicated, but in systems that provide dependency checking, the package maintainers still have to manually edit the respective dependency list for the package manager. With slackbuilds.org packages they are listed in the respective web page and there is no automation.

Occasionally a slackbuilds.org package maintainer will build a package a certain way that includes unwanted dependencies. With experience a user learns how to edit the build script to eliminate that dependency when possible. Many of the slackbuilds.org build scripts are written to provide users build parameters and options to avoid that problem.

Whereas sbopkg can remove some of the drudgery and provide some automation, if you are new to the process I recommend building everything manually for a while to understand what is involved. :)

Miranden 05-18-2013 03:52 PM

Quote:

Originally Posted by Woodsman (Post 4953917)
Yes.

Once in a blue moon I notice a listed dependency is not really required, but that involves having used Slackware and free/libre software for many years. When in doubt build the dependencies.

As astrogeek noted, inspecting the contents of /var/log/packages will help you know whether you have already built a dependency package from slackbuilds.org. As I mentioned, a full stock install is presumed and those dependencies are never listed in the slackbuilds.org web pages. Sometimes for people who do not install a full stock system, building a slackbuilds.org package will fail, but the failure message usually provides a clue as to what is missing. Then again, those who do not install a full stock system have been using Slackware long enough to know what they are doing.

If you want to see how the process works, build notrogen without building any of the dependencies. Either the build process will fail with messages why the build failed (missing libraries, etc.) or the build will succeed but the final app will not run as expected, usually with appropriate stdout/stderr messages. The same process applies when a presumed stock Slackware package is not installed. The build process or run-time errors will provide clues.

This process might sound involved or complicated, but in systems that provide dependency checking, the package maintainers still have to manually edit the respective dependency list for the package manager. With slackbuilds.org packages they are listed in the respective web page and there is no automation.

Occasionally a slackbuilds.org package maintainer will build a package a certain way that includes unwanted dependencies. With experience a user learns how to edit the build script to eliminate that dependency when possible. Many of the slackbuilds.org build scripts are written to provide users build parameters and options to avoid that problem.

Whereas sbopkg can remove some of the drudgery and provide some automation, if you are new to the process I recommend building everything manually for a while to understand what is involved. :)

I think it sounds great. I don't want dependency checking. I'd rather learn what's going on.

So, all the packages that are either installed with the Slackware installation or with a Slackbuild (and installpkg) are listed in /var/log/packages? But if I compile a package from source myself it will not be there, right? Are there any other circumstances under which it will not be there? Thank you very much again.

chess 05-18-2013 03:53 PM

Quote:

Originally Posted by Woodsman (Post 4953917)
Whereas sbopkg can remove some of the drudgery and provide some automation, if you are new to the process I recommend building everything manually for a while to understand what is involved. :)

Agreed - in fact sbopkg assumes the user understands how to manually build and install things from SlackBuilds.org. I would not use sbopkg until you are comfortable with the process of doing it manually.

chess 05-18-2013 03:55 PM

Quote:

Originally Posted by Miranden (Post 4953923)
So, all the packages that are either installed with the Slackware installation or with a Slackbuild (and installpkg) are listed in /var/log/packages? But if I compile a package from source myself it will not be there, right? Are there any other circumstances under which it will not be there? Thank you very much again.

Yes, this is correct. Packages are listed in /var/log/packages but manually compiling and installing from source will not be there.

Miranden 05-18-2013 04:40 PM

Thank you. I think I'm all set now.

Woodsman 05-18-2013 04:41 PM

Quote:

But if I compile a package from source myself it will not be there, right? Are there any other circumstances under which it will not be there?
Correct. :)

There is another popular Slackware tool to help compile packages not supported anywhere with a formal build script: src2pkg.

That said, if you compile and install software as recommend by numerous wanna-bes around the web pretending to be a somebody, using the mantra of "configure, make, make install," then just as often as not there is no easy way to remove the files that were installed or even to know which files were installed. If a wanna-be on the web writes to use "configure, make, make install," then grab a copy of the slackbuilds.org build script template and modify as needed to create a build script. The nice thing about using a build script is the software does not get installed immediately, only compiled. Another nice aspect about Slackware build scripts is they are designed to install the software to a directory using the makepkg command rather than install directly to the system. Then the package contents can be inspected and studied. :)

Miranden 05-28-2013 11:03 AM

I will stick with creating build scripts, then. I don't want to have a bunch of untraceable packages hiding all over my system. Thank you for all your help!

samac 05-28-2013 11:22 AM

@chess

Quote:

use a helper script called 'sqg' that will generate queuefiles for you by processing the REQUIRES line in each .info file in SlackBuilds.org.
This is a lovely little script. It would be nice if you could add it to the menu system of sbopkg to allow people to update the queue files after the update the slackbuild lists.

samac

chess 05-30-2013 09:35 PM

@samac - thanks! I also put it up on github along with all the queuefiles it has generated. https://github.com/chessgriffin/sqg. I'll have to think about adding to sbopkg itself.

ReaperX7 05-30-2013 11:24 PM

Usually, the best option is to learn to manually install the dependencies yourself rather than have sbopkg or src2pkg do it for you. Most stuff is already on Slackbuilds.org as it is so all you have to do is follow the dependency list back and build from the furthermost back dependency. It's super easy.


All times are GMT -5. The time now is 04:35 PM.