LinuxQuestions.org
Visit Jeremy's Blog.
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 06-24-2006, 10:11 AM   #1
tubatodd
Member
 
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
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?
 
Old 06-24-2006, 10:33 AM   #2
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 769

Rep: Reputation: 66
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
 
Old 06-24-2006, 11:03 AM   #3
tubatodd
Member
 
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351

Original Poster
Rep: Reputation: 30
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.
 
Old 06-24-2006, 02:50 PM   #4
tubatodd
Member
 
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351

Original Poster
Rep: Reputation: 30
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??
 
Old 06-24-2006, 08:42 PM   #5
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.
 
Old 06-24-2006, 09:46 PM   #6
tubatodd
Member
 
Registered: Jun 2003
Location: Birmingham, Alabama (USA)
Distribution: Slackware
Posts: 351

Original Poster
Rep: Reputation: 30
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?
 
Old 06-25-2006, 12:44 AM   #7
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Whatever "blah blah...i586" means.
 
Old 06-25-2006, 01:34 AM   #8
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
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.
 
Old 06-25-2006, 01:47 AM   #9
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.
 
Old 06-25-2006, 01:52 AM   #10
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
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"
 
Old 06-25-2006, 02:01 AM   #11
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.
 
Old 06-25-2006, 02:07 AM   #12
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
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.
 
Old 06-25-2006, 02:13 AM   #13
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.
 
Old 06-25-2006, 02:29 AM   #14
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
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.
 
Old 06-25-2006, 02:55 AM   #15
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
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.
 
  


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
Compiling xawtv - with checkinstall - no scantv found vharishankar Slackware 3 04-05-2006 02:27 AM
compiling kernel & checkinstall Fascistchicken Slackware 2 10-14-2004 06:03 AM
Checkinstall in 5.1.1 Kroenecker Linux From Scratch 5 07-13-2004 12:37 PM
checkinstall... marsques Linux - Software 3 05-25-2004 01:56 PM
Checkinstall ... durden2.0 Linux - Software 1 07-02-2003 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:11 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
Open Source Consulting | Domain Registration