LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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-09-2003, 04:36 AM   #1
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Rep: Reputation: 15
Question Building programs from source and checkinstall


I recently installed the Checkinstall package as suggested by shade and now I have a couple of questions. When it installed a program for me it defaulted to i386 architecture and gave me an option to change this to whatever I wanted. I choose i686. Is this right? I have an Athlon 1.4GHz, I recently built my own kernel and selected the architecture there as Athlon. Does this mean all the packages I have built myself from source without checkinstall are optimized for i386? I thought they were built by whatever was the selected architecture in the kernel? How can I change it so that all future packages use i686 or Athlon optimizations?

Also when I build packages from source I know it is ok to remove the original tar.gz file but is it ok to remove the directory created when I unzip the tar.gz archive (The one which the build takes place in)? i.e are the binary and configuration files automatically copied across to where they need to go? Is this the same if I use checkinstall? At the minute all I do is make clean as suggested in most Readme files.

Thank you
 
Old 11-09-2003, 08:57 AM   #2
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
You select your processor options during the ./configure stage. If you do ./configure --help, you will get a list of compilation options for that particular package.

In particular, you can specify your CPU architecture in the CFLAGS environment variable. Here is a relevant article (see section 4): http://www.cs.auc.dk/~enrique/linux/fromsource.html

Also, check out the relevant section on processor options from the gcc manual

Last edited by spurious; 11-09-2003 at 09:07 AM.
 
Old 11-09-2003, 09:07 AM   #3
Nu-Bee
Member
 
Registered: Dec 2002
Location: USA
Distribution: Mandrake 9.2
Posts: 269

Rep: Reputation: 30
Re: Building programs from source and checkinstall

Quote:
Originally posted by changcheh
I recently installed the Checkinstall package as suggested by shade and now I have a couple of questions. When it installed a program for me it defaulted to i386 architecture and gave me an option to change this to whatever I wanted. I choose i686. Is this right? I have an Athlon 1.4GHz, I recently built my own kernel and selected the architecture there as Athlon. Does this mean all the packages I have built myself from source without checkinstall are optimized for i386? I thought they were built by whatever was the selected architecture in the kernel? How can I change it so that all future packages use i686 or Athlon optimizations?

Also when I build packages from source I know it is ok to remove the original tar.gz file but is it ok to remove the directory created when I unzip the tar.gz archive (The one which the build takes place in)? i.e are the binary and configuration files automatically copied across to where they need to go? Is this the same if I use checkinstall? At the minute all I do is make clean as suggested in most Readme files.

Thank you
The checkinstallrc file : /usr/lib/checkinstall/checkinstallrc

...allows many options.

As far as some of your other Qs, I am not sure but I think it is taken care of during compile, and it just asks where to place the packages. Make sure that you use a lower case "a" in athlon or you will end up with two athlon/Athlon dirs.

Here is mine:



#############################################################################
# CheckInstall configuration file #
########################################

####################################################################
# These are default settings for CheckInstall, modify them as you #
# need. Remember that command line switches will override them. #
####################################################################

# Debug level
# 0: No debug
# 1: Keep all temp files except the package's files
# 2: Keep the package's files too

DEBUG=0

# Location of the "installwatch" program
INSTALLWATCH_PREFIX="/usr/"
INSTALLWATCH=${INSTALLWATCH_PREFIX}/bin/installwatch

# Location of the makepkg program. "makepak" is the default, and is
# included with checkinstall. If you want to use Slackware's native "makepkg"
# then set this to "makepkg"
MAKEPKG=/usr/sbin/makepak

# Where will we keep our temp files?
BASE_TMP_DIR=/var/tmp ## Don't set this to /tmp or / !!

# Where to place the installed document files
DOC_DIR="/home/joseph/CI_ProgramsDocs"

# Default architecture type (Leave it empty to allow auto-guessing)
ARCHITECTURE="athlon"

# Default package type. Leave it empty to enable asking everytime
# S : Slackware
# R : RPM
# D : Debian

INSTYPE="R"

# Storage directory for newly created packages
# By default they will be stored at the default
# location defined for the package type

PAK_DIR="/home/joseph/CI_DocPaks"

# RPM optional flags
RPM_FLAGS=" --force --nodeps --replacepkgs "

# dpkg optional flags
DPKG_FLAGS=""


## These are boolean. Set them to 1 or 0

# Interactively show the results of the install command (i.e. "make install")?
# This is useful for interactive installation commands
SHOW_INSTALL=1

# Show Slackware package installation script while it runs? Again, useful if
# it's an interactive script
SHOW_SLACK_INSTALL=0

# Automatic deletion of "doc-pak" upon termination?
DEL_DOCPAK=1

# Automatic deletion of the spec file?
DEL_SPEC=1

# Automatic deletion of "description-pak"?
DEL_DESC=1

# Automatically strip all ELF binaries?
STRIP_ELF=1

# Automatically strip all ELF shared libraries?
# Note: this setting will automatically be set to "0" if STRIP_ELF=0
STRIP_SO_ELF=1

# Automatically compress all man pages?
COMPRESS_MAN=1

# Set the umask to this value
CKUMASK=0022

# Backup files overwritten or modified by your install command?
BACKUP=1

# Write a doinst.sh file that installs your description (Slackware)?
AUTODOINST=1

# Use the new (8.1+) Slackware description file format?
NEW_SLACK=0

# Comma delimited list of files/directories to be ignored
EXCLUDE=""

# Accept default values for all questions?
ACCEPT_DEFAULT=0

Last edited by Nu-Bee; 11-09-2003 at 09:10 AM.
 
Old 11-09-2003, 07:51 PM   #4
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Original Poster
Rep: Reputation: 15
5th gear optimizations

Thank you to you both. I've spent the last hour reading up on CFLAGS. I'm going to use the -o2 optimizations with -march = athlon-tbird and build with the -pipe flag to try and speed up the compiles.

I found the checkinstall file was in /usr/local/lib/checkinstall/checkinstall.rc under slackware 9.1 after a quick dip into the checkinstall docs .

thanks
changcheh
 
Old 11-14-2003, 03:24 AM   #5
fuelinux
Member
 
Registered: Oct 2003
Location: Tbilisi, Georgia
Posts: 85

Rep: Reputation: 15
I was unable to install Checkinstall. There was no Isntall script in the package (file is checkinstall-1.5.3-i386-1.tgz). How to install it?
thanks in advance
 
Old 11-14-2003, 04:57 AM   #6
daYz
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 164

Rep: Reputation: 30
Quote:
Originally posted by fuelinux
I was unable to install Checkinstall. There was no Isntall script in the package (file is checkinstall-1.5.3-i386-1.tgz). How to install it?
thanks in advance
You can install it using pkgtool, or "installpkg checkinstall-1.5.3-i386-1.tgz"

You can also type something like "īnstallpkg checkins*" in case you don't know this. The * replaces the rest of the filename.
 
Old 11-14-2003, 06:18 AM   #7
fuelinux
Member
 
Registered: Oct 2003
Location: Tbilisi, Georgia
Posts: 85

Rep: Reputation: 15
pkgtool doesn't see checkinstall's package. it only lists packages from Slack's original distro.
i'll try other options you have listed. do i have to be in the same directory as checkinstall's tarball is?
thanks

Last edited by fuelinux; 11-14-2003 at 06:20 AM.
 
Old 11-14-2003, 06:31 AM   #8
daYz
Member
 
Registered: Nov 2003
Distribution: Ubuntu
Posts: 164

Rep: Reputation: 30
Quote:
do i have to be in the same directory as checkinstall's tarball is?
No you don't. If it's for example in your home directory (/home/username), and you are in /home, you can do "installpkg /home/username/checki*"

You can see in wich directory you're in with the command "pwd" (Present Working Directory)

I thought I installed checkinstall with the pkgtool, using the Current option, but I'm not sure. Maybe you weren't in the directory checkinstall was.

Last edited by daYz; 11-14-2003 at 06:35 AM.
 
Old 11-14-2003, 09:27 AM   #9
jeramy
Member
 
Registered: Nov 2003
Location: Ottawa, Canada
Distribution: Ubuntu 5.10
Posts: 46

Rep: Reputation: 15
Re: Building programs from source and checkinstall

Quote:
Originally posted by changcheh
Also when I build packages from source I know it is ok to remove the original tar.gz file but is it ok to remove the directory created when I unzip the tar.gz archive (The one which the build takes place in)? i.e are the binary and configuration files automatically copied across to where they need to go?
Yes, it's ok to remove the directory. You just won't be able to uninstall it short of deleting files from /usr/bin or /usr/local/bin.

Quote:
Is this the same if I use checkinstall? At the minute all I do is make clean as suggested in most Readme files.
With checkinstall, here's what I've been doing. I have installed and uninstalled packages successfully.

Download the tar.gz or tar.bz2 file to /home/jeramy/downloads
Extract it (/home/jeramy/downloads/newprogram)
cd to that folder
Do ./configure, and make.
su to root.
Run checkinstall
mv the newly created .tgz package to /opt/packages (Note that this is not necessary; this is just where I've been putting my packages)
exit to my user account
cd ..
rm -rf newprogram

If I want to uninstall a package, I just type
removepkg newprogram
and voilā!
 
Old 11-14-2003, 10:37 AM   #10
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
to install checkinstall or any slack package ending in .tgz need to su to root
 
Old 11-14-2003, 10:43 AM   #11
changcheh
Member
 
Registered: Nov 2003
Location: china
Distribution: Linux Mint
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks jeramy thats exactly what I wanted to know. It will save me a lot of diskspace.

changcheh
 
  


Reply



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: Building C++ programs on Linux hylke LinuxAnswers Discussion 34 05-22-2017 08:18 PM
DISCUSSION: Building C programs on Linux crabboy LinuxAnswers Discussion 29 09-04-2013 10:19 AM
Information about building a network server and the right programs Blackharaz Linux - General 3 04-29-2005 02:14 PM
building from source Protex Slackware 2 02-24-2004 08:26 PM
Building Kylix programs Puck2099 Programming 4 06-06-2003 11:44 AM

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

All times are GMT -5. The time now is 05:26 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