LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Running openbox on slack 12.1 (https://www.linuxquestions.org/questions/slackware-14/running-openbox-on-slack-12-1-a-643872/)

nonis 05-22-2008 07:00 PM

Yeah, I read up on it a little bit and it seems like /usr is for distro stuff and /usr/local is for additional. At least generally speaking.

It seems like a lot of programs I am trying to build need to be installed in /usr. For instance, I just compiled the murrine theme engine for gtk+ 2, and if I ./configure;make;make install, gtk gives constant warnings that it cannot find the engine. If I use prefix=/usr, however, it does not give those warnings.

Also, after that I rebuilt gtk+ 2 with x input support and rebuilt the gimp. The gimp wouldn't build unless I compiled gtk+ 2 with /usr prefix.

Why would the default for gtk be to have a prefix /usr/local but then the default for gimp be to search for gtk in /usr? It seems a little bit messed up.

shadowsnipes 05-22-2008 08:54 PM

Quote:

Originally Posted by nonis (Post 3161882)
Yeah, I read up on it a little bit and it seems like /usr is for distro stuff and /usr/local is for additional. At least generally speaking.

No, /usr/local is for programs for your local computer only, while stuff under /usr could be programs on an entire network. The situation where this might occur is when you mount you /usr partition from a network drive. /opt is for the "additional" stuff and generally has self-contained programs (ie. most, if not all of it files are contained under its folder under /opt).

nonis 05-22-2008 09:47 PM

That makes sense. But still, why do so many things which seem like they should be built on a computer to computer basis, and which are built outside of a distribution, require they be built in /usr?

shadowsnipes 05-22-2008 11:12 PM

Quote:

Originally Posted by nonis (Post 3161972)
That makes sense. But still, why do so many things which seem like they should be built on a computer to computer basis, and which are built outside of a distribution, require they be built in /usr?

They don't necessarily, but depending on what you are building you may have to specify where to find its dependencies (at configure time). If what you are building is a library or package that many other packages are dependent on, you can't just put it where ever you want. You need to put it in a place that the other software knows to look for it. That's why I said earlier that the important thing is consistency. So, if you rebuild gtk+ 2 and have it under /usr/local, then you need to make sure that all the packages that depend on it know to look for it there. So, when you tried to rebuild GIMP you probably needed to specify where to find you library since it was in a non-standard spot.

In general for Slackware, unless you have a good reason not to, always use a prefix of /usr. And if you are rebuilding slackware packages use the official slackBuilds from the Slackware source.

vadkutya 05-23-2008 06:42 AM

why haven't you looked for libobrender.so.21 in the first place? if it works with slackbuild then you have the lib but not where the system is looking for it. then you should have done either:

a) ./configure --help to see how you can tell the configure script to look in the right places (best), or
b) copy the lib to where the system is looking for (bad because it's not just redundant but will cause problems through updates).
c) link to the lib (worse).

also the prefix depends where you want the app to reside. i am generally not fond of installing everything systemwide (e.g. doing make install as root) because you easily bloat your system and in the end you do not know what you need and what not. i use to install everything locally (see: http://www.linuxquestions.org/questi...-small-640347/)

cheers vadkutya

nonis 05-23-2008 01:39 PM

To make sure I can uninstall everything, I keep all sources in a ~/sources folder in my home directory. If I realize I do not need something, I can either make uninstall from there or use pkgtool to remove it if it is a package. That has worked for me.

But your idea of installing everything locally sounds like a good one. I will possibly try that next time I install.

T3slider 05-23-2008 03:18 PM

Quote:

Originally Posted by nonis
To make sure I can uninstall everything, I keep all sources in a ~/sources folder in my home directory. If I realize I do not need something, I can either make uninstall from there or use pkgtool to remove it if it is a package. That has worked for me.

But your idea of installing everything locally sounds like a good one. I will possibly try that next time I install.

`make uninstall` only works well if a good uninstall rule is included in the Makefile, which isn't always the case. It's ALWAYS better to make packages, in my opinion, since they can be installed/upgraded/removed with ease (and you will always know what's on your system with a simple `ls /var/log/packages`). As for installing locally to /home, it is a possibility, but not *everything* will be able to run that way -- though if done right most things should. I'm not really a fan of installing things to /home, but that's just me. Installing to /home means that the application is only available for one user. Also, if you ever decide to mount /home as noexec for security purposes (though this is still not 100% secure since shell scripts and perl script etc. can still be run) none of the apps will run. However, there's nothing *wrong* with installing things locally to /home. Basically, it's all a personal choice. Pick a solution that works for you and is easy to administer. I would always recommend making packages regardless of where you install to.

shadowsnipes 05-23-2008 04:42 PM

I, too, recommend always creating packages. I personally prefer to use or make slackBuilds, but I hear src2pkg also works well for most things. And for openbox (which is what this thread originally was about), there is already a working slackBuild for it at slackBuilds.org.

mazon 07-11-2008 09:57 AM

You probably need to run ldconfig
linux keeps a cache of shared libraries in /etc/ld.so.cache so it will go fast to load a shared library and in this case the make install script didnt update the cache so then you have to run it manual.


All times are GMT -5. The time now is 02:41 PM.