LinuxQuestions.org
Visit the LQ Articles and Editorials 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 11-02-2009, 03:25 AM   #16
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32

Do not overwrite whole PKG_CONFIG_PATH envvar. Better way is to install libtorrent into /usr prefix, or export PKG_CONFIG_PATH=/usr/local/src/libtorrent-0.12.5/:${PKG_CONFIG_PATH} .

If You overwrite this var, the pkg-config will not be able to find necessary basic packages other, than libtorrent .
 
Old 11-02-2009, 03:29 AM   #17
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by Switch7 View Post
I'll go ahead and read slackbuilds.org and try to follow it. I'm trying to access slackwiki.org since slackbuilds.org mentions to take a look there but it still seems to be down.
Yeah its down for the time being. You can access slackwiki.info in the meantime.
 
Old 11-02-2009, 03:49 AM   #18
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
I have just successfully compiled rtorrent in Slackware64 with the following

Build order
Build commands for each
Code:
./configure --prefix=/usr --libdir=/usr/lib64 infodir=/usr/info --build=x86_64-slackware-linux
make
make install
There were no errors and no extra libs are required other than libsigc++ and libtorrent
 
Old 11-02-2009, 04:06 AM   #19
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Martinezio View Post
Do not overwrite whole PKG_CONFIG_PATH envvar. Better way is to install libtorrent into /usr prefix, or export PKG_CONFIG_PATH=/usr/local/src/libtorrent-0.12.5/:${PKG_CONFIG_PATH} .

If You overwrite this var, the pkg-config will not be able to find necessary basic packages other, than libtorrent .
I guess I royally messed up. Time to clean everything and retry.

Quote:
Originally Posted by wildwizard View Post
I have just successfully compiled rtorrent in Slackware64 with the following

Build order
Build commands for each
Code:
./configure --prefix=/usr --libdir=/usr/lib64 infodir=/usr/info --build=x86_64-slackware-linux
make
make install
There were no errors and no extra libs are required other than libsigc++ and libtorrent

Wouldn't it be painful if you ever need to get rid of it without making slackware package? I'm thinking of adding "./configure --prefix=/usr --libdir=/usr/lib64 infodir=/usr/info --build=x86_64-slackware-linux" whenever I need to compile a program then just make a slackware package.

Whenver I google search the '--prefix=/usr', '--libdir=/usr/lib64', etc. I'm getting directed to pre-made scripts and I'm not understanding it but I'm guessing the --prefix=/usr will install it in /usr, libdir=/usr/lib64 would put the libs (like libtorrent) in there. No idea about infodir=/usr/info and I think --build=x86_64-slackware-linux will build it optimized for x86_64. I'm probably completely wrong since I'm guessing on everything.

I apologize in advance, I'm probably annoying people at this point but it's a extremely steep learning curve as someone who has been using windows for my entire life and only recently switched to linux 2 months ago.
 
Old 11-02-2009, 04:55 AM   #20
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Originally Posted by Switch7 View Post
Wouldn't it be painful if you ever need to get rid of it without making slackware package?
If you don't touch the source directory after installation you can do this with most software :-

Code:
make uninstall
Quote:
Originally Posted by Switch7 View Post
Whenver I google search the '--prefix=/usr', '--libdir=/usr/lib64', etc. I'm getting directed to pre-made scripts and I'm not understanding it but I'm guessing the
If you do
Code:
./configure --help
You can get a list of options that configure will accept for that particular project as well as a short description of what each option does.

I tried to find something like a "configure for dummies" guide online but resources are lacking and some sites are linking to hideously out of date documentation.

If demand for such is wanted I could knock something up.

Last edited by wildwizard; 11-02-2009 at 05:15 AM.
 
Old 11-02-2009, 05:33 AM   #21
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by wildwizard View Post
If you don't touch the source directory after installation you can do this with most software :-

Code:
make uninstall


If you do
Code:
./configure --help
You can get a list of options that configure will accept for that particular project as well as a short description of what each option does.

I tried to find something like a "configure for dummies" guide online but resources are lacking and some sites are linking to hideously out of date documentation.

If demand for such is wanted I could knock something up.
The --help is good enough, thank you. I remember seeing that command but forgot about it.

Quote:
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

--libdir=DIR object code libraries [EPREFIX/lib]

--infodir=DIR info documentation [DATAROOTDIR/info]

--build=BUILD configure for building on BUILD [guessed]
I think something like this build command for each software and every dependency would get the job done:
Code:
# cd /usr/local/src
# wget http://libtorrent.rakshasa.no/downlo...-0.12.5.tar.gz
# tar -zxvf libtorrent-0.12.5.tar.gz
# cd libtorrent
# Read the README
# ./configure --prefix=/usr --build=x86_64-slackware-linux
# make
# make test
# mkdir /tmp/libtorrent-0.12.5
# make install DESTDIR=/tmp/libtorrent-0.12.5
# cd /tmp/libtorrent-0.12.5
# makepkg /tmp/libtorrent-0.12.5-1.txz
# installpkg /tmp/libtorrent-0.12.5-1.txz
Looking at the explanation above, I have a feeling doing --infodir=DIR might cause problem when I make a slackware package. The same for --libdir=DIR. I might be making another newbie misconception though.

Last edited by Switch7; 11-02-2009 at 05:39 AM.
 
Old 11-02-2009, 05:42 AM   #22
slackd
Member
 
Registered: Sep 2009
Location: Bhubaneswar, India
Distribution: Slackware, Ubuntu, Windows
Posts: 260
Blog Entries: 1

Rep: Reputation: 60
Wink

Quote:
Originally Posted by Switch7 View Post
I think something like this build command for each software and every dependency would get the job done:
Code:
# cd /usr/local/src
# wget http://libtorrent.rakshasa.no/downlo...-0.12.5.tar.gz
# tar -zxvf libtorrent-0.12.5.tar.gz
# cd libtorrent
# Read the README
# ./configure --prefix=/usr --build=x86_64-slackware-linux
# make
# make test
# mkdir /tmp/libtorrent-0.12.5
# make install DESTDIR=/tmp/libtorrent-0.12.5
# cd /tmp/libtorrent-0.12.5
# makepkg /tmp/libtorrent-0.12.5-1.txz
# installpkg /tmp/libtorrent-0.12.5-1.txz
Looking at the explanation above, I have a feeling doing --infodir=DIR might cause problem when I make a slackware package. The same for --libdir=DIR. I might be making another newbie misconception though.
try this, its the best option.
 
Old 11-02-2009, 08:33 PM   #23
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by wildwizard View Post
I have just successfully compiled rtorrent in Slackware64 with the following

Build order
Build commands for each
Code:
./configure --prefix=/usr --libdir=/usr/lib64 infodir=/usr/info --build=x86_64-slackware-linux
make
make install
There were no errors and no extra libs are required other than libsigc++ and libtorrent
Thank you. The way you did it worked flawlessly and I have rtorrent running now. Before I did it the same way as you did, I tried making a slackware pkg (doing a: ./configure --prefix=/usr) but I still got the same error.

I did more search on how to uninstall it but wanted to confirm it before I make some sort of mistake and create dependency hell. I saved the tar in /usr/local/src as root (su) because I can trust this source and know it doesn't include rm. I have three directory in here called "libsigc++-2.2.4.2" "libtorrent-0.12.5" and "rtorrent-0.8.5"

To uninstall these and the file associated with it, I just simply go the directory (ex: cd /usr/local/src/libtorrent-0.12.5) and type "make uninstall" while I'm in the directory. Then I just do this for all dependency and the actual software.

Is this correct?

Quote:
If you don't touch the source directory after installation you can do this with most software :-
I noticed in another thread that it mentioned that not all includes something convenient command like "make uninstall" When this happens, do I just delete the files one by one? I read there that I should do something like:

Code:
./configure
make
check install
if it doesn't include "make uninstall"

Quote:
Originally Posted by slackd View Post
try this, its the best option.
I think I got how compiling from source works so I'll move on to slackbuilds and try to understand what each command is doing. This is all for learning linux and understanding more about it (not just installing a program and feel relieved about it). I'm trying to learn deeper but maybe I'm rushing it a little too much (didn't even know what dependency was a week ago). Thank you for the link.

Last edited by Switch7; 11-02-2009 at 08:56 PM.
 
Old 11-03-2009, 03:12 AM   #24
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32
Quote:
Originally Posted by Switch7 View Post
I noticed in another thread that it mentioned that not all includes something convenient command like "make uninstall" When this happens, do I just delete the files one by one? I read there that I should do something like:

Code:
./configure
make
check install
if it doesn't include "make uninstall"
So the best way is to build slackware package - this give You an easy opportunity to make uninstall Most of makefiles have the ability, to redirect installation process into other directory. It uses mostly DESTDIR environment variable, or INSTALL_ROOT, sometimes INSTALL_DIR, or so - You can find it by viewing Makefile generated by configure script - check the installation routines.
You can invoke this variable in installation command like this:
Code:
./configure [your options]
make all
make install DESTDIR=/full/path/to/install/redirect
After that, You may go to $DESTDIR directory, and build slackware package. To do this, just make a directory named "install" and place into it a file called slack-desc with package description. All lines, that You need to shown as description, must be started by package name and semicolon.
Next go back into previous path, and type command:
Code:
makepkg ../packagename-version-arch-build_no.txz
At the end, You can installpkg this TXZ package created by You, and You can start using binaries from package If the package doesn't satisfy You, You can perform
Code:
uninstallpkg packagename
and You be clean
 
Old 11-03-2009, 04:03 AM   #25
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Martinezio View Post
So the best way is to build slackware package - this give You an easy opportunity to make uninstall
Thank you for the reply. I done it in a similar fashion but for some odd reason, doing a 'make' will cause tons of error. This is not the case for anything that does not rely on dependencies. The urxvt slackware package I succeeded on, actually had no dependencies. It was optional. There is no 'make uninstall' for urxvt so the slackware package is really convenient and I hope I could solve this issue.

Everything was smooth until making a rtorrent slackware package.
This is how I did it before failing at the final part at the 'make.'

I got the first depedency from slackbuilds. (just a note but for the other one where I suceeded on the rtorrent, I did a simple

Code:
./configure --prefix=/usr --libdir=/usr/lib64 infodir=/usr/info --build=x86_64-slackware-linux
make
make install
for all three of it (libsigc++, libtorrent, and rtorrent. I noticed the libsigc++ slackbuild's version is 2.2.3 and the latest is 2.4.2. I'm not too sure if this matters at all but I think it's worth noting.)

Continuing on with the slackware package creation, I proceeded with:
Code:
# cd /usr/local/src
# wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.5.tar.gz
# tar -zxvf libtorrent-0.12.5.tar.gz
# cd libtorrent-0.12.5
# ./configure --prefix=/usr
# make
# mkdir /tmp/libtorrent-0.12.5
# make install DESTDIR=/tmp/libtorrent-0.12.5
# cd /tmp/libtorrent-0.12.5
# makepkg libtorrent-0.12.5-1.txz
# installpkg /tmp/libtorrent-0.12.5-1.txz
Code:
# cd /usr/local/src
# wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.5.tar.gz
# tar -zxvf rtorrent-0.8.5.tar.gz
# cd rtorrent-0.8.5
# ./configure --prefix=/usr
# make
After make, I get errors. I noticed you said:

Code:
# make all
Instead of 'make' Maybe this could be the problem for me?

Doing the above without making a slackware package succeeds flawlessly so I'm not too sure where I messed up.

Last edited by Switch7; 11-03-2009 at 04:09 AM.
 
Old 11-03-2009, 04:55 AM   #26
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32
make all is the default option of make utility, so invokin' "make" You invoke de facto "make all"

The problem of tons of errors is due missing dependencies. Even, If You thing otherwise Probably wrong version of software, maybe missing features (i.e. default installation, that don't enrich the software with special capabilities needed by desired programm)... A lot of possibilities. Read carefuly README and INSTALL, or see the web for compiled packages (even in RPM, or DEB) and grab them, unpack and search for dependencies info (i.e. ldd program, read installation script routines, or special information files).
 
Old 11-03-2009, 05:05 AM   #27
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Martinezio View Post
make all is the default option of make utility, so invokin' "make" You invoke de facto "make all"

The problem of tons of errors is due missing dependencies. Even, If You thing otherwise Probably wrong version of software, maybe missing features (i.e. default installation, that don't enrich the software with special capabilities needed by desired programm)... A lot of possibilities. Read carefuly README and INSTALL, or see the web for compiled packages (even in RPM, or DEB) and grab them, unpack and search for dependencies info (i.e. ldd program, read installation script routines, or special information files).
I read the README very carefully. It was stated in the README on which dependencies I needed and those were it. I'll keep trying it and will take a look at debian's packages. I thought someone might spot a error on the way I installed it for slackware packages but it seems like I'm doing it correctly since no one commented on it. Maybe it could be the version or some special capabilities needed by the program but since it worked when I never made a slackware packages, I don't think that's the case. Maybe it's worth a try though.

It's getting late here so I'll try it out using this instead for the slackware packages tomorrow:
Code:
./configure --prefix=/usr --libdir=/usr/lib64 infodir=/usr/info --build=x86_64-slackware-linux
You're probably wondering why I'm still at this but I'd really like to expand my knowledge with these technical things instead of running and looking for alternatives. But I'm actually having lots of fun learning it.

Last edited by Switch7; 11-03-2009 at 05:33 AM.
 
Old 11-03-2009, 07:32 AM   #28
Martinezio
Member
 
Registered: May 2009
Location: Warsaw, Poland
Distribution: Slackware64-current
Posts: 191

Rep: Reputation: 32
Quote:
Originally Posted by Switch7 View Post
You're probably wondering why I'm still at this but I'd really like to expand my knowledge with these technical things instead of running and looking for alternatives. But I'm actually having lots of fun learning it.
Well, I'm not It's Your choice, but I'm trying to help You. Human learn all life long
I have one question... Do You have installed multilib packages? If so, You may need to pass proper LDFLAGS for gcc compilator. Currently, I always set LDFLAGS, when running configure script:
Code:
LDFLAGS="-L/usr/lib64" ./configure [options]
It's because libtool try's to find required libraries during compilation process in default path, when no LDFLAGS is set, and this path is set to /usr/lib. In multilib environment, this path is pointing to 32-bit libraries, and compiling for default build, You compile 64-bit app. But You cannot mix two different architectures - ldd will not load 32-bit libraries for 64-bit app.
That's my digression, but it's worth to be mention
 
Old 11-03-2009, 07:47 AM   #29
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Martinezio View Post
Well, I'm not It's Your choice, but I'm trying to help You. Human learn all life long
I have one question... Do You have installed multilib packages? If so, You may need to pass proper LDFLAGS for gcc compilator. Currently, I always set LDFLAGS, when running configure script:
Code:
LDFLAGS="-L/usr/lib64" ./configure [options]
It's because libtool try's to find required libraries during compilation process in default path, when no LDFLAGS is set, and this path is set to /usr/lib. In multilib environment, this path is pointing to 32-bit libraries, and compiling for default build, You compile 64-bit app. But You cannot mix two different architectures - ldd will not load 32-bit libraries for 64-bit app.
That's my digression, but it's worth to be mention
Unless multilib is installed by default, no. The softwares that I listed in the first post of this thread is everything I have except virtualbox since I no longer need that and didn't install it. I think that used the multilib but I didn't install it after all.

Quote:
Originally Posted by Martinezio View Post
Well, I'm not It's Your choice, but I'm trying to help You. Human learn all life long
Thank you very much. I have no plans on giving up so this thread might be alive for awhile.

I'll try out other './configure' and the latest release of libsigc++ and see how it goes.
 
Old 11-03-2009, 04:58 PM   #30
Switch7
Member
 
Registered: Sep 2009
Posts: 92

Original Poster
Rep: Reputation: 16
Smile

I finally succeeded in making a slackware package for rtorrent. I'm running it now and it's working great. Download speed is a lot higher than the other torrents I used in the past. However, I'm still worried about what I saw earlier which was:


Code:
Creating Slackware package:  /tmp/rtorrent-0.8.5-1.txz

./
usr/
usr/share/
usr/share/man/
usr/share/man/man1/
usr/share/man/man1/rtorrent.1
usr/bin/
usr/bin/rtorrent
WARNING:  /usr/share/man (with possibly not gzipped man pages) detected

Slackware package /tmp/rtorrent-0.8.5-1.txz created.

bash-3.1# installpkg /tmp/rtorrent-0.8.5-1.txz
Verifying package rtorrent-0.8.5-1.txz.
Installing package rtorrent-0.8.5-1.txz:
PACKAGE DESCRIPTION:
Package rtorrent-0.8.5-1.txz installed.
Code:
Slackware package maker, version 3.14159.

Searching for symbolic links:
usr/lib64/libtorrent.so.11 -> libtorrent.so.11.0.5
usr/lib64/libtorrent.so -> libtorrent.so.11.0.5

Making symbolic link creation script:
( cd usr/lib64 ; rm -rf libtorrent.so.11 )
( cd usr/lib64 ; ln -sf libtorrent.so.11.0.5 libtorrent.so.11 )
( cd usr/lib64 ; rm -rf libtorrent.so )
( cd usr/lib64 ; ln -sf libtorrent.so.11.0.5 libtorrent.so )

It is recommended that you make these lines your new installation script.

Would you like to make this stuff the install script for this package
and remove the symbolic links ([y]es, [n]o)? y


Removing symbolic links:
removed `./usr/lib64/libtorrent.so.11'
removed `./usr/lib64/libtorrent.so'

Creating your new ./install/doinst.sh...
I'm not sure what the warning is and I'm a bit worried about it. Doing a quick search brought me to several people with the same warning but it didn't look like anyone commented on that. Doing a 'man rtorrent' will give me a normal man page that I normally get with everything else.

This is what my usr/share/man looks like:

Code:
bash-3.1$ cd /usr/share/man && ls -a
.                bg    cat5  catn  es            hr            it.UTF-8                 man-pages-3.22.lsm  man4  man9          pl.UTF-8  ru.KOI8-R     sr
..               cat1  cat6  cs    fi            hu            ja                       man1                man5  mann          pt        ru.UTF-8      whatis
Changes          cat2  cat7  da    fr            id            jp                       man2                man6  nl            pt_BR     ru_RU.KOI8-R
POSIX-COPYRIGHT  cat3  cat8  de    fr.ISO8859-1  it            ko                       man3                man7  pl            ro        sk
README           cat4  cat9  el    fr.UTF-8      it.ISO8859-1  man-pages-3.22.Announce  man3p               man8  pl.ISO8859-2  ru        sl
I did more searches but it turns out there's absolutely no information regarding this warning.

And for the symbolic links, I think I made the right choice and it was alright to remove the symbolic links correct?

Last edited by Switch7; 11-04-2009 at 12:53 AM.
 
  


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
DISCUSSION: Compiling Programs from Source jeremy LinuxAnswers Discussion 51 11-21-2005 05:35 AM
compiling programs from source Frank Leone Linux - Newbie 3 10-30-2005 01:47 AM
Any debian tool to help download missing dependencies when compiling from source? Akhran Debian 2 08-18-2005 05:26 PM
Compiling Programs from Source-help orisma Linux - Newbie 6 03-03-2005 08:57 AM
Compiling Source & Dependencies arpanet1969 Linux - Newbie 7 12-30-2004 08:24 PM


All times are GMT -5. The time now is 01:18 PM.

Main Menu
Advertisement
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