LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 07-11-2005, 01:00 PM   #1
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
Target?


I have be recompiling/optimizing slackware packages for my P4 over the weekend. I managed to do 42 including KDE (KDE took me 20 hours on a 1.8 GHz P4 w/ 256 MB of RAM). Other than KDE I am trying to replace all of those i386 packages first. I am quite happy with my progress and I haven't ran across any problems. NOTE: I am only redoing the ones with .SlackBuilds as opposed to the ones with .Build for now. I'm trying to take baby steps and learn as I go. The SlackBuild scripts are amazing! I really understand all but one thing that I have ran across in a few packages. Here is a little exert from one of the packages for an example.


Code:
VERSION=3.3.6
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486-slackware-linux}
BUILD=${BUILD:-1}
What exactly is [ TARGET ] referring to and is it safe to change it to i686?

I noticed that Pat put this warning in the KDE.options file

Code:
# Target arch (this should be set to i486 for any 32-bit x86, unless
# you want problems finding your compiler...):
if [ -z $TARGET ]; then
  export TARGET=i486
fi
Can someone explain why that is?
 
Old 07-11-2005, 02:14 PM   #2
slackermike
LQ Newbie
 
Registered: Jun 2005
Location: U.S.A.
Distribution: Slackware-current
Posts: 10

Rep: Reputation: 0
It doesn't matter.

You could change i486 to s390 and it would mean the same thing.

Don't worry, be happy....

Last edited by slackermike; 07-11-2005 at 02:17 PM.
 
Old 07-11-2005, 02:37 PM   #3
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Original Poster
Rep: Reputation: 31
Quote:
It doesn't matter.

You could change i486 to s390 and it would mean the same thing.

Don't worry, be happy.....
What???

Geez!!

Anyway, I figured it out on my own. Sorry for wasting you guys time.

TARGET should always equal the specific ARCH that GCC was compiled/optimized for. Out-of-the bow slackware GCC is i486. Until I recompile/optimize GCC for i686 I should not change that entry in the SlackBuild script.

Got it
 
Old 07-15-2005, 05:20 AM   #4
aikidoist72
Member
 
Registered: Jan 2005
Location: Australia
Distribution: Slackware Archlinux FreeBSD
Posts: 218

Rep: Reputation: 30
hi mianve,

Interesting post !!! I have been playing with gentoo for a few weeks and have the itch to do the same with my beloved Slackware. Could you post a few tips regarding how you have done this please.

Cheers
 
Old 07-15-2005, 05:30 AM   #5
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
Quote:
NOTE: I am only redoing the ones with .SlackBuilds as opposed to the ones with .Build for now. I'm trying to take baby steps and learn as I go. The SlackBuild scripts are amazing! I really understand all but one thing that I have ran across in a few packages.
Could you please help me with the following questions?
What are SlackBuild scripts? Are they officially releases with Slackware packages? Where can I find them?
 
Old 07-15-2005, 06:56 AM   #6
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
SlackBuild scripts contain all the information that PV uses to build the Slackware release packages. Ie: all the ./configure options and the symlink options in the final package (and whole bunch of other stuff ... ).

They can be found, along with the sources and any referenced patches, on Disks 3 and 4.

In short, you run the .SlackBuild script from within the source directory of whatever (as root in some cases, or with makepkg in your path for most), and you end up with a Slackware .tgz package located (typically) in /tmp !

Enjoy!
- Piete.
 
Old 07-15-2005, 07:50 AM   #7
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Original Poster
Rep: Reputation: 31
This is where where you can grab the sources in current from...

ftp://ftp.slackware.no/linux/slackwa...urrent/source/

Of course, keep in mind that if you are not already running current, as in upgrading as current upgrades, you may make life difficult by installing software too new for your systems present state.

The latest stable releases sources can be found at......

ftp://ftp.slackware.no/linux/slackwa...e-10.1/source/

As for how to do it..

Do as I did.

Read, read, read...

Here are some good things to read.

http://www.linuxpackages.net/howto.p...=Package+Howto

And

http://slackwiki.org/Writing_A_SlackBuild_Script

Read those more than once. Then download the sources. Next look in the source directories (folders) to find those with a file called .SlackBuild or someprogram.SlackBuild. Those are slackbuild scripts. Stay away from those source packages with scripts named .build or someprogram.build. Those are build scripts and not SlackBuilds. Pat is gradually replacing those with slackbuild scripts. They work great however, but some prefer the slackbuild scripts, including Pat, because of the way they work.

My advice, read through the SlackBuild scripts to see how they are made. They are built several different ways depending on the program itself. There are things that you can edit in some slackbuild scripts that you can't in others. Build something small and unimportant first just to learn and get a feel for it before you start rebuilding X11 or glibc. By the way, the first thing I rebuilt was bsd-games!

Good Luck

Last edited by AxXium; 07-15-2005 at 08:05 AM.
 
Old 07-15-2005, 08:06 AM   #8
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Re: Target?

Quote:
Originally posted by mianve
I managed to do 42 including KDE (KDE took me 20 hours on a 1.8 GHz P4 w/ 256 MB of RAM).
That's insane!

Two tips for speeding up KDE compiles, should you ever wish to try again:

1. Get another 256MB of RAM.
2. Use the ./configure option "--enable-final".

On my 2GHz machine I can get most of KDE compiled in about 6 hours.
 
Old 07-15-2005, 08:13 AM   #9
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Original Poster
Rep: Reputation: 31
Quote:
1. Get another 256MB of RAM.
256 MB of ram for my pc cost $300.00 to $400.00

I have Rambus ram

Sucks for me

The [ ./configure option "--enable-final" ], now that I can do.

Thanks for the tip.
 
Old 07-15-2005, 08:15 AM   #10
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Quote:
Originally posted by mianve
256 MB of ram for my pc cost $300.00 to $400.00
Eek.

Quote:
The [ ./configure option "--enable-final" ], now that I can do.
Thing is, that option is best used with lotsa RAM. Still, worth a try.
 
Old 07-15-2005, 08:21 AM   #11
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
Quote:
Of course, keep in mind that if you are not already running current, as in upgrading as current upgrades, you may make life difficult by installing software too new for your systems present state.
What is the proper way to update to current? I am running 10.1 currently.

Quote:
2. Use the ./configure option "--enable-final".
What does the option do?
 
Old 07-15-2005, 08:38 AM   #12
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Quote:
Originally posted by Basel
What does the option do?
Apparently, "--enable-final" concatenates all the source code files into one block before compiling, which means you get a faster compile, and supposedly smaller binaries. Unsurprisingly, this method can be very RAM-hungry.
 
Old 07-15-2005, 09:05 AM   #13
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Original Poster
Rep: Reputation: 31
Code:
What is the proper way to update to current? I am running 10.1 currently.
The time consuming but safest way would be to.......

1. Print out or copy the changlog.

ftp://ftp.slackware.com/pub/slackwar.../ChangeLog.txt

2. Read it. Observe all warnings if there are any in both the changelog as well as the readme found in the host site where the upgraded packages are stored.

3. Download the upgraded packages. Keep in mind that some packages listed in the change log may have been upgraded more than once and only the latest version may be found in the "current" directory. You may want to scan over the changelog and note where packages have been upgraded more than once before you download anything.

ftp://ftp.slackware.no/linux/slackwa...kware-current/

use the [upgradepkg] command in a terminal to upgrade it.

example.....

su to assume root

Code:
user@darkstar# su
Move to the directory where you stored the upgraded package

Code:
root@darkstar# cd /place-where-you-stored-the-upgraded-package.
Next run upgradepkg [in this example I will use "qt-3.3.4" as found in KDE


Code:
root@darkstar# upgradepkg qt-3.3.4-i486-2.tgz
you could also do this to upgrade everything at once

Code:
root@darkstar# upgradepkg *.tgz
But you may not want to, espically if you find warnings in the changelog stating that some packages need to be upgraded in a certain order.
Also keep in mind that some packages upgraded will work better if you reboot the system after upgrading the package.
Good Luck

Last edited by AxXium; 07-15-2005 at 09:10 AM.
 
Old 07-15-2005, 11:54 AM   #14
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
Thanks Nobber, mianve and piete I will give it a shot tomorrow.

Last edited by Basel; 07-15-2005 at 11:57 AM.
 
Old 07-16-2005, 04:47 AM   #15
Nitrox
Member
 
Registered: Aug 2004
Location: Detroit.
Distribution: Slack 12.1 - Vector (exp)
Posts: 51

Rep: Reputation: 15
I definitely see myself picking up some knowledge trying this,
which is enough reason for me to do it.

But I was wondering about the performance increase?
How would you rate it? Noticable, Not noticable, HUGE ??

I keep hearing that using i686 options could actually SLOW down
your system, rather than using the i486 defaults. Any input?
 
  


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
No rule to make target coal-fire-ice Linux - Software 2 07-21-2005 11:28 AM
How to specify target when compile binutils? huweiming268 Programming 3 07-17-2005 11:42 PM
Mandrake 9.2 and IMQ target help!!!! debloxie Linux - Networking 1 02-19-2004 10:48 AM
No rule to make target? jimdaworm Linux - Newbie 21 08-27-2003 01:38 PM
samba + target directory robyso Linux - Networking 0 07-11-2003 05:07 AM

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

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