LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Keeping track of compiled programs etc. (https://www.linuxquestions.org/questions/linux-newbie-8/keeping-track-of-compiled-programs-etc-152009/)

mnjdesigns 02-29-2004 07:14 PM

Keeping track of compiled programs etc.
 
Hello,

I've been having a hell of a time using Fedora Core 1 and I've learned so much reading many documents but I haven't been able to find answers as to how to keep track of compiled programs. I know how to check for installed packages and remove them if I must. Packages seem to be easier to maintain.

However... what about compiled sources. I usually prefer compiling the source since you have more control the install. Here is one thing for sure I cannot figure out. Where are the default places people usually moved their compiled programs? I've been moving them to /usr/bin

When I compile something I know files are being made and put everywhere at such a fast pace I don't know where everything is going. If I wanted to uninstall the program correctly how would I go finding the files it created as fast as possible? :scratch:

Is there a file that keeps track of installed programs like a .conf file? Any help would be great whether it be a link to another document or an explanation. Thanks!

DrOzz 02-29-2004 07:21 PM

well first if you still have the sources, you can go into that folder
and type : make uninstall
and see if the developer included that ...
or you can start using CheckInstall

lsmith 02-29-2004 07:21 PM

In general - and I invite any other comments on this - /usr/local/ is where you install new stuff for use on your machine.

E.g. /usr/local/FireFox/ is where firefox is installed.

Instead of copying the executable to /usr/local/bin (or /usr/bin/ which do people think is more appropriate?), you could create a symbolic link instead. This means that the executable can stay in the directory it was created, but there is a file that points to it, and acts like it was a copy.

As for keeping track of installated programs, I think slackware uses a system of packaging similar to what you are asking (pkgtool?) - I've just installed slack so I don't know how it works yet.

Other than that, its really up to you to keep track of what files are where I think. Well documented software should have documented where everything will go when you run 'make install'.

'make uninstall' should remove all those files too - but not all software does this. Often deleteing the directory where it is installed is enough.

mnjdesigns 03-01-2004 12:29 PM

That sounds easy enough. How about system variables? For example windows has a registry (which I do not like), and that thing gets really messy even when using the uninstaller (windows).

However, I was hoping that when a file was compiled that Linux does not do the same. If a program does the same thing? Where are important system files installed that programs depend on etc.? This is what confuses me the most. I hope my question doesn't confuse people. Thanks for the reply's they helped a lot.

lsmith 03-01-2004 01:50 PM

Software can depend on libraries to run. These are the equivalent to a .dll file under windows, but under linux have the .so extension (stands for shared object).

There is a run time linker program that is responsible for letting programs link at run time to various libraries that they may need. It is called 'ld.so' . Check out 'man ld.so' to read about it - but you don't have to use it yourself day to day.

However it does need to be told in advance all the libraries that can be made available to other programs. Check out 'man ldconfig'. ldconfig configures the cache of libraries for use by ld.so. The standard library directories are /lib and /usr/lib, but you can add extra library paths by altering the /etc/ld.so.conf file.

As for system variables, a program inherits the environment variables of the shell from which it was launched. These are set up by the shell scripts that run when you log in, but you are free to change them from the command line and they only affect that particular shell at that time. For example - open a new shell and type 'export PATH=' and hit enter (I assume you are running bash). Now try and run 'ls' and it can't find it. Open a new one and it works fine now because they have seperate environments.

Enter 'env' at a prompt to get all the environment variables for your current shell. Because all the shells are seperate - everyone who uses the machine can have a different environment - there is no central registry.... (yay!)

There is a lot more to it but this is about as much as I know...... hope this helps.

mnjdesigns 03-01-2004 04:43 PM

Hey thanks a lot for that explanation! That helps a lot. I will be reading those man pages from top to bottom. Understanding how the OS works and how programs rely on libraries will help keep my system clean.

One of the things I hate about Windows is that even with an uninstall programs things get really messy. Files are left in the directory and the registry still has a record of it. This not only starts to slow down the computer after so many programs have been installed it leads to messy directory tables and unwanted files.

I feel like I have more control over my OS more then ever now. Even though hardware is still kind of rough around the edges such as drivers and stuff I couldn't be happier. I'd click on the affero link and give you some good comments but I haven't signed up for it yet! Will soon though... thanks lsmith!

Demonbane 03-01-2004 10:34 PM

You might want to try Gentoo, its a source based distro and package management using Portage is simple yet powerful.

mnjdesigns 03-02-2004 01:18 AM

I'd try to use Gentoo if my goal was to try learning how to use a distro that is often being used in big businesses. Even though Fedora is EXACTLY red hat, the basis and a very very good portion of it is still red hat. So I'm trying to learn this specific distro even if its not the simplest distro to start off with. I hear a lot fo good things about Gentoo though.

I have a lot of friends who use it. I'll give it a look when I have more free time. thanks =)

qwijibow 03-02-2004 06:37 AM

one word... "Checkinstall"

install source, then use this method to compile.

./configure
make
checkinstall

checkinstall reads the install rule of the makefile,
and adds the compiled and installed program to
the rpm database.

you can then test if it is installed (and what version) with the usual rpm -q
and un-install with rpm -e

king_nothingzzz 03-02-2004 08:38 AM

checkinstall rocks!!!

Amazing....!!

Too bad i didnt know about this wondeful program all the while

cheers

king_nothingzzz

thehundredthone 03-02-2004 11:03 AM

i second that!!!!
 
man i wish i had read this earlier!! all the while i had been make installing programs and had no idea how to uninstall them unless i had the source or i had ./configure --prefix 'ed them

checkinstall all the way!! :D

mnjdesigns 03-02-2004 11:38 AM

Awesome! Good thing I haven't really done much compiling! Cheers!:D


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