LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 02-12-2006, 03:12 AM   #1
Dachy
Member
 
Registered: Apr 2004
Location: san diego, ca
Distribution: Slackware 12.1
Posts: 99

Rep: Reputation: 15
Going crazy trying to install gtkpod, amarok, libraries.. general noob stuff


I'm focusing on gtkpod for now to get my ipod working in linux so that's what I would like to talk about. I am on 10.2 running the 2.6.13 kernel.

So far I've downloaded and installed gtkpod. It needs libgpod.so.0 (this is what it says when I try running gtkpod). So I downloaded libgpod.0.3.0 to /home/dachy/Desktop (this is the file i ended up finding on the gtkpod page). I did tar -xzvf filename.tar.gz then it made a directory. *so far pretty standard right?* I read the INSTALL and README it explained what the 'configure' script does, what 'make' does, and what 'make clean' does. So, I did: ./configure, make, make clean. For shit's and giggles I did 'install' to see if it would make a difference. Well of course I tried to run gtkpod, it returned the same message as before about needing the library.

Okay, before this goes on, I'd like to add one more thing to help me understand what I did wrong and what to do in the future. Several times this has happened to me and left me dumbfounded. I run tar -xzvf on a file in /home/dachy/Desktop (as root)... now it creates a directory in '/Desktop/newdirectory'. So I go into that directory and raise hell running all those commands. My question is, after all of that do I delete this directory? Is it just there for the sake of install and now it's disposable? Or, is this where the program or whatever it is installed from now on? If this isn't disposable, where should I put the file I'm installing to do it properly? If it's a lib? If it's a program? (of course I would like root and all users to be able to access/make use of these files/programs).
 
Old 02-12-2006, 07:03 AM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Welcome to the world of "compile from source"!

It seems to me you have some fundamentally flawed concepts of how the whole thing works, so let's start from the beginning.

Broadly, there are 3 methods of software delivery (I will deal with Slackware specifically, but you could adapt to any other distro easily):

a) Slackware packages
b) Binary packages
c) Source

Slackware packages are installed with installpkg and usually have the extension .tgz. You knew this already, so I won't bore you with the details. Suffice to say that Slackware packages contain the program binaries and just plonk all the associated stuff into your system, and then log it (ls /var/log/packages/) so you can later remove it with removepkg or, if you were so inclined, by hand =) Anything of the Slack cds will be a Slackware package.

"Aren't binary packages the same as Slackware packages?" I hear you cry! Well, yes, and no. Slackware packages can contain binaries, and so are a type of binary package, but binary packages are most definitly *not* Slackware packages. Binary packages don't use pkgtool at all and don't keep track of where they're putting things (no /var/log/packages/ entry for them). The Java runtime environment and the nVidia installer are both good examples of a binary package. Anything that contains an architecture (i386, i486, amd64, x86_86, mipsel) in it's filename should be a binary package for that architecture (this sounds like another topic, so I will leave it for now!).

Finally we come to the compile from source situation. The general rule with compile from source is:

1) Unpack the archive (tar xfz foo.tar.gz )
2) cd foo
3) ./configure
4) make
5) su -c 'make install'

You can read the Makefile if you want to know what make, make clean, make install will actually do. In your case, you've been building the programs but failing to install it. I would advise reading up on checkinstall and replacing step 5 with:

5) su -c 'checkinstall'

Then instead of having this program installed straight into your system without tracking where it's putting everything, it will make a basic Slackware package and install that. So you get your /var/log/packages/ fix and things are all hunky dory!

This works for pretty much everything unless the readme / install files say differently. It's worth noting that a lot of the time people use "generic" readme / install files that don't always directly reflect the useage of their own files.

You can check what "make" options by reading the Makefile, maybe you'll understand, maybe you won't - have a squint at a few and do some reading if you're interested. With ./configure you can pass --help as an argument and it'll show you all the other options that are relevant to that configure script.

So, now you know about some stuff, let's deal with specifics.

Quote:
So far I've downloaded and installed gtkpod. It needs libgpod.so.0 ...
Good, you've found and dealt with the dependency. I don't want to confuse the issue, but if you are building from source - you usually need to build the dependencies first and the program after, since one sits on the other. This leads me to believe you have downloaded a binary / Slackware package of gtkpod (maybe from linuxpackages.org?).

Let's assume that you can just install libgpod and gtkpod will work ... if gtkpod doesn't work, then you'll have to reinstall it later, but that's a real-life situation and this is just theory work =)

So you run `./configure && make && su -c 'make install'` in the libgpod directory, and it should configure, make and install itself. Voila!

In reality I would advise running something like:

Code:
~$ ./configure --prefix=/usr
~$ make
~$ su -c checkinstall
Once it's installed, there is very little reason to keep the directory. Some programs (read: software) have "make uninstall" as a part of their Makefiles, so you could archive up the preconfigured directory and if you needed to get rid of a program later, untar it and run make uninstall. I prefer the checkinstall option, personally.

Quote:
where should I put the file I'm installing to do it properly?
Just so we're abundantly clear: make install will do this for you, lib or program, or anything else you can think of. No need to manually be moving stuff around =)

Alright, so that's not true for 100% of the cases, but, in those cases you'll probably only have 1 binary file to move ... in which case, you can still use checkinstall to log it - go read up on it =)

I hope that's cleared up a few issues and helped you out!

Good luck,
- Piete "Argh! Not Another Essay!" Sartain.
 
  


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
Noob - General help needed plzz!!! Mmc245 Linux - General 3 03-08-2005 11:38 PM
General stuff - Super Newbie. NewToLinuxOS Linux - Newbie 1 02-28-2005 06:39 AM
Who should own files in /usr/local (and executables, libraries in general)? erika_Dec2004 Linux - Newbie 5 01-12-2005 11:56 PM
General noob questions LouisTheDamned Linux - Newbie 6 03-19-2004 08:43 PM
Multiple values with SQL (Noob stuff) Travis86 Programming 6 09-03-2003 09:38 PM


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

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