Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
06-24-2006, 10:11 AM
|
#1
|
Member
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351
Rep:
|
Checkinstall and Compiling
I'm not new to Slackware nor am I afraid of compiling a program from source. I recently read a thread on LQ about methods of software installtion which lead me to checkinstall. Usually when I compile a package I run
./configure
make
make install
TADA....Finished!
Recently, I tried
./configure
make
checkinstall
TADA!
Checkinstall did a great job, but I couldn't help but notice that the package that got installed was i386 and NOT optimized for my processor (ahem...i586). How do I compile a package and make sure it is optimized for my system?
|
|
|
06-24-2006, 10:33 AM
|
#2
|
Member
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 769
Rep:
|
Usage: checkinstall [options] [command [command arguments]]
Options:
*Package type selection*
-t,--type=<slackware|rpm|debian> Choose packaging system
-S Build a Slackware package
-R Build a RPM package
-D Build a Debian package
*Scripting options*
-y, --default Accept default answers to all questions
--pkgname=<name> Set name
--pkgversion=<version> Set version
-A, --arch, --pkgarch=<arch> Set architecture
--pkgrelease=<release> Set release
--pkglicense=<license> Set license
--pkggroup=<group> Set software group
--pkgsource=<source> Set source location
--pkgaltsource=<altsource> Set alternate source location
--pakdir=<directory> The new package will be saved here
--maintainer=<email addr> The package maintainer (.deb)
--provides=<list> Features provided by this package (.rpm)
--rpmflags=<flags> Pass this flags to the rpm installer
--dpkgflags=<flags> Pass this flags to the dpkg installer
--spec=<path> .spec file location
--nodoc Do not include documentacion files
-A, --arch, --pkgarch=<arch> Set architecture
or set it in /etc/checkinstall/checkinstallrc
tobyl
|
|
|
06-24-2006, 11:03 AM
|
#3
|
Member
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
Thanks for your help. The checkinstall package I installed using Swaret did not come with a man page for checkinstall so I couldn't RTFM on my own.
|
|
|
06-24-2006, 02:50 PM
|
#4
|
Member
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
Ok, so I compiled QTCurve 0.38 as a test. I changed my checkinstallrc to have "architecture="k6-2" since that is the exact processor in my machine. Next I ran the following
./configure
make
checkinstall
I noticed when I ran ./configure that the openning lines that are displayed on the screen make reference to i586 which the K6-2 technically is. My question is, should I add something to the configure line to specify k6-2 so that it lines up with what I am doing with checkinstall??
|
|
|
06-24-2006, 08:42 PM
|
#5
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
Unless checkinstall is replaying the last few lines of .bash_history, all that you're changing is the tags it stores about the package it creates. All the binaries should be complete and "set in stone" after you've run ./configure and make so nothing you do to checkinstall is going to affect that.
Look at the GCC info pages relating to the -march and -mcpu options, and pass them in CFLAGS in the environment when you run the configure script.
|
|
|
06-24-2006, 09:46 PM
|
#6
|
Member
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351
Original Poster
Rep:
|
Quote:
Originally Posted by evilDagmar
Unless checkinstall is replaying the last few lines of .bash_history, all that you're changing is the tags it stores about the package it creates. All the binaries should be complete and "set in stone" after you've run ./configure and make so nothing you do to checkinstall is going to affect that.
Look at the GCC info pages relating to the -march and -mcpu options, and pass them in CFLAGS in the environment when you run the configure script.
|
??
If I am understanding you correctly, when I run ./configure and it shows me those lines that says "blah blah.....i586" that GCC is compiling the package as i586 and checkinstall is simply putting a label on the name of the package? So GCC is autodetecting my CPU?
|
|
|
06-25-2006, 12:44 AM
|
#7
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
Whatever "blah blah...i586" means.
|
|
|
06-25-2006, 01:34 AM
|
#8
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
Quote:
Originally Posted by evilDagmar
Whatever "blah blah...i586" means.
|
Rather than that, evilDagmar, how about "That seems to be correct".
And to tubatod,instead of 'blahblah', the generally accepted term is 'foo'
And in answer to your question, that is kind of right, in a very generalized sense.
|
|
|
06-25-2006, 01:47 AM
|
#9
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
Quote:
Originally Posted by cwwilson721
Rather than that, evilDagmar, how about "That seems to be correct".
And to tubatod,instead of 'blahblah', the generally accepted term is 'foo'
And in answer to your question, that is kind of right, in a very generalized sense.
|
No, because when that much detail is cribbed out I've got no idea what he's referring to. Configure scripts say many, many things in their output. The string "i586" appearing in that in some unspecified location with no context associated with it could mean pretty much anything.
Furthermore, it's only very seldomly that gcc bothers to look at the CPU type. More usually it's looking at the kernel or the options that gcc itself was built with.
Last edited by evilDagmar; 06-25-2006 at 01:51 AM.
|
|
|
06-25-2006, 01:52 AM
|
#10
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
I read the whole thread, and understood what the OP was talking about.
So I got helpful.
As mama said, "If you don't have anything constructive to say, keep your mouth shut"
|
|
|
06-25-2006, 02:01 AM
|
#11
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
Dude, I did read the whole thread and "got helpful". "Look at the GCC info pages relating to the -march and -mcpu options, and pass them in CFLAGS in the environment when you run the configure script." I said.
I posted exactly what makes gcc do what he was asking. In return I got a query which I could not be made sensible unless I want to go and download the package and run it's configure script to see what it does. ...so I got equally vague in my response. I figured he'd see it and come back and clarify what "blah blah i586" was referring to specifically.
You should listen to your mama more often.
|
|
|
06-25-2006, 02:07 AM
|
#12
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
Quote:
Originally Posted by tubatodd
I noticed when I ran ./configure that the openning lines that are displayed on the screen make reference to i586
|
And
Quote:
Originally Posted by tubatodd
If I am understanding you correctly, when I run ./configure and it shows me those lines that says "blah blah.....i586" that GCC is compiling the package as i586 and checkinstall is simply putting a label on the name of the package?
|
Hmm.....
What else could it be?
However, lets take your point of view.
Instead of
Quote:
Originally Posted by evilDagmar
Whatever "blah blah...i586" means.
|
You could have posted:
Quote:
What do you mean by 'blah blah...i586? In reference to?...
|
One is a snide remark, the other asks for clarification.
Last edited by cwwilson721; 06-25-2006 at 02:15 AM.
|
|
|
06-25-2006, 02:13 AM
|
#13
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
Nice going, editing your post there after only initially saying "And" and "Hmm..."
Your guess is wrong and it's likely to remain wrong.
A system's architecture type is not the same thing as it's CPU type. The configure scripts of most packages (notable exceptions being LAME and a few others) almost never look at the CPU type. Period.
In what way are your comments contributing positively to this thread?
Last edited by evilDagmar; 06-25-2006 at 02:33 AM.
|
|
|
06-25-2006, 02:29 AM
|
#14
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
To get back to the last question by tubatodd, and expand a little bit (These are generalizations: There are always exceptions. However, for the purpose of this thread and your question, they are valid assumptions)
'make install' and 'checkinstall' only finish the process done by './configure' (setting up the compile with correct options), and 'make' (the actual compile).
The ./configure script,through other libs and programs, and by options passed by the user, determines the actual compile process. For example, the cpu class, what libs are required, etc.
The make actually compiles (creates files) using the options created by ./configure.
The make install or checkinstall basically moves the files to their final resting place, and runs some scripts, etc, to finish the process (writing to conf files, making the actual *tgz pkg). As far as checkinstall is concerned, you can name the package whatever you wish. It does not change the package itself.
I hope this makes things a little bit clearer for you.
Last edited by cwwilson721; 06-25-2006 at 02:58 AM.
|
|
|
06-25-2006, 02:55 AM
|
#15
|
Member
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480
Rep:
|
To put the final nail in the coffin here...
Not only do configure scripts not usually look at the CPU type, the resulting makefiles still treat most generic architecture types all the same. The thing can be saying i586-pc-gnu-linux, i686-pc-linux-slackware, or i386-pc-linux and it's still going to pass the same lines down to gcc when it builds the binaries.
If you want gcc to actually do something special for your hardware, you usually need to set the CFLAGS arguments to contain the -march and/or -mcpu arguments.
|
|
|
All times are GMT -5. The time now is 11:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|