LinuxQuestions.org
Review your favorite Linux distribution.
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 10-12-2006, 05:10 PM   #1
Harp00
Member
 
Registered: Jun 2003
Location: Venice Italy
Distribution: Slackware 12.0 kernel 2.6.21.5
Posts: 284

Rep: Reputation: 30
Compiling qt and KDE 3.5.5 using Pat,s Slackbuild


I am a newbie of scripting and i need an help.
I am trying to compile KDE 3.5.5 using Pat's Slackbuild.
So, i modified KDE.options including Athlon-xp CFLAGS:

Code:
# Set default version/arch/build.  You can override these settings
# in the SlackBuild scripts for each package (koffice, for example,
# usually has a different version number), or by setting your own
# environment variables.

if [ -z $VERSION ]; then
  export VERSION=3.5.4
fi

if [ -z $ARCH ]; then
  export ARCH=i486
fi

if [ -z $BUILD ]; then
  export BUILD=1
fi

# 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

# Use this as CFLAGS and CXXFLAGS:
if [ -z "$CPUOPT" ]; then
  if [ "$ARCH" = "i386" ]; then
    export CPUOPT="-O2 -march=i386 -mcpu=i686"
  elif [ "$ARCH" = "i486" ]; then
    export CPUOPT="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ffast-math -mmmx -m3dnow -msse -mfpmath=sse,387"
  elif [ "$ARCH" = "s390" ]; then
    export CPUOPT="-O2"
  elif [ "$ARCH" = "x86_64" ]; then
    export CPUOPT="-O2"
  fi
fi

# Number of jobs to compile at once:
if [ -z "$NUMJOBS" ]; then
  export NUMJOBS=-j6
fi
I saw output messages during compiling process and qt is compiled with other CFLAGS!
Infact, kde.Slackbuild has theese lines:
Code:
if [ -d qt ]; then
  ( cd qt
    ./qt.SlackBuild
    installpkg /tmp/qt-*.tgz
  )
  . /etc/profile.d/qt.sh
fi
Here is the problem. qt.Slackbuild has theese lines:
Code:
if [ $ARCH = "i486" ]; then
  zcat $CWD/qt.x86.cflags.diff.gz | patch -p1 || exit 1
fi
And finally the PATCH is the following:

Code:
--- ./mkspecs/linux-g++/qmake.conf.orig	Fri Apr 26 00:48:00 2002
+++ ./mkspecs/linux-g++/qmake.conf	Tue May  7 12:05:04 2002
@@ -18,7 +18,7 @@
 QMAKE_CFLAGS_DEPS	= -M
 QMAKE_CFLAGS_WARN_ON	= -Wall -W
 QMAKE_CFLAGS_WARN_OFF	= -w
-QMAKE_CFLAGS_RELEASE	= -O2
+QMAKE_CFLAGS_RELEASE	= -O2 -march=i486 -mtune=i686
 QMAKE_CFLAGS_DEBUG	= -g
 QMAKE_CFLAGS_SHLIB	= -fPIC
 QMAKE_CFLAGS_YACC	= -Wno-unused -Wno-parentheses

I would like to modify something in order to compile qt with CFLAGS I set in KDE.options.
How can I do?

Thank you so much in advance.


P.S. What can you tell me about:


# Number of jobs to compile at once:
if [ -z "$NUMJOBS" ]; then
export NUMJOBS=-j6
fi


What is its function?

Last edited by Harp00; 10-12-2006 at 05:17 PM.
 
Old 10-12-2006, 07:24 PM   #2
Michielvw
Member
 
Registered: May 2005
Location: Leicester,UK
Distribution: Slackware
Posts: 108

Rep: Reputation: 19
Quote:
Originally Posted by Harp00
# Number of jobs to compile at once:
if [ -z "$NUMJOBS" ]; then
export NUMJOBS=-j6
fi


What is its function?
from man make:
-j [jobs], --jobs[=jobs]
Specifies the number of jobs (commands) to run simultaneously. If
there is more than one -j option, the last one is effective. If
the -j option is given without an argument, make will not limit
the number of jobs that can run simultaneously.
 
Old 10-12-2006, 07:38 PM   #3
Michielvw
Member
 
Registered: May 2005
Location: Leicester,UK
Distribution: Slackware
Posts: 108

Rep: Reputation: 19
as a second thought, have you tried changing the diff file (qt.x86.cflags.diff.gz) with the right flags?

vim should be able to edit gzipped files on fly. If you use another editor .. gunzip the file, edit it and gzip it again

replace:
+QMAKE_CFLAGS_RELEASE = -O2 -march=i486 -mtune=i686
with:
+QMAKE_CFLAGS_RELEASE =-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ffast-math -mmmx -m3dnow -msse -mfpmath=sse,387

other than that, you probably could try to edit the qt.SlackBuild to exclude the part where the patch is applied.
 
Old 10-13-2006, 04:48 AM   #4
Harp00
Member
 
Registered: Jun 2003
Location: Venice Italy
Distribution: Slackware 12.0 kernel 2.6.21.5
Posts: 284

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by BlackPanther
as a second thought, have you tried changing the diff file (qt.x86.cflags.diff.gz) with the right flags?

vim should be able to edit gzipped files on fly. If you use another editor .. gunzip the file, edit it and gzip it again

replace:
+QMAKE_CFLAGS_RELEASE = -O2 -march=i486 -mtune=i686
with:
+QMAKE_CFLAGS_RELEASE =-march=athlon-xp -O2 -pipe -fomit-frame-pointer -ffast-math -mmmx -m3dnow -msse -mfpmath=sse,387

other than that, you probably could try to edit the qt.SlackBuild to exclude the part where the patch is applied.
Ok, thank you. It works now. Qt i compiled with the right CFLAGS.
Unfortunately yhere are problems with KDEBASE now.
At the and of compile process, i found only few tgz in /tmp.
Probably there is something wrong with new version of tar.bz2 or patches.
 
  


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
SlackBuild CrEsPo Slackware 2 03-19-2006 01:58 PM
KDE 3.5.1 slackbuild? bird603568 Slackware 7 02-04-2006 12:35 AM
Can Pat Keep it Up? shepper Slackware 16 12-20-2005 11:49 PM
KDE.SlackBuild spaceballs Slackware 8 04-01-2005 08:42 AM
Pat needs our Help! Namaseit Slackware 15 01-31-2005 12:55 PM


All times are GMT -5. The time now is 09:05 AM.

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