LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-30-2009, 06:30 AM   #1
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 89
Question SlackBuilds and Slackware64


Hi,

I've been following Slackware64-current on one of my machines for some time now and it has proven very stable. I have no need for 32-bit software, so I'll probably switch totally to Slackware64 when it is released.
For some packages I compiled 64-bit versions using the scripts from Slackbuilds.org

I noticed that many SlackBuild scripts already are prepared for Slackware64 with these lines:
Code:
if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
fi
I put "export ARCH=x86_64" in my ~/.bash_profile and all works fine.

But I wonder if this is enough to keep things clean...

For instance, the libburn and libisofs SlackBuilds put the libraries in /usr/lib instead of /usr/lib64

So my question is:
Should I alter the SlackBuild scripts (like in the "./configure" part) to use the /usr/lib64 folders, or leave it as it is? The software runs fine with the libraries in /usr/lib of course.

Or should I just be patient and wait for an official Slackware64 release and a Slackware64-section on SlackBuilds.org?

Any other hints / suggestions?
 
Old 06-30-2009, 06:58 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
Quote:
Originally Posted by niels.horn View Post
So my question is:
Should I alter the SlackBuild scripts (like in the "./configure" part) to use the /usr/lib64 folders, or leave it as it is?
You should change the configure section so that it uses this for --libdir

Code:
  --libdir=/usr/lib${LIBDIRSUFFIX} \
This is the code given in the template found here
http://www.slackbuilds.org/template.SlackBuild
 
Old 06-30-2009, 07:02 AM   #3
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
I would advocate porting the script 'properly', which is to say:

Code:
LIBDIRSUFFIX=""
if ...
elif [ "$ARCH" = "x86_64" ]; then
...
  LIBDIRSUFFIX=64
fi

...

configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX}
A lot (all? most?) of Eric's scripts already do something similar to this. Usual package creation rules apply - make sure you know the build system and double check to see if your libraries (and *.pc files) are ending up in the right place, or if you need to add some extra options (--package-config-dir=/usr/lib${LIBDIRSUFFIX} as an imaginary example) to land everything in the right place. If it's 64-bit and it's not in lib64, it's wrong

Unlike 5 years ago when I started messing with this, pretty much everything will build very happily on 64 bit without too much coercion. If you want a second opinion on 64 build scripts, try http://builds.slamd64.com/ (also compatible with sbopkg I think). Between that an SBo, you've probably got your bases covered.

One useful trick if things are not playing nice, is throwing in extra linker flags. Something I got very used to typing:

LDFLAGS=-l/usr/lib64 CFLAGS=-fPIC -O2 ./configure --prefix=/usr --libdir=/usr/lib64

My guess is you won't ever have to do that, but if you start getting a lot of linker errors during compile, bear it in mind

Best of luck, let us know how it turns out.
- Piete.
 
Old 06-30-2009, 07:11 AM   #4
XGizzmo
Member
 
Registered: Mar 2007
Distribution: Slackware
Posts: 264

Rep: Reputation: 68
The SlackBuilds.org template was updated after slackware64-current was made public.
The LIBDIRSUFFIX parts will have to be added to any build that does not have it already,
even with these changes many things will not build a proper x86_64 package.

Code:
if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
fi
Code:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --build=$ARCH-slackware-linux


cmake based stuff is a bit different of course, try something like:

Code:
cmake \
  -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
  -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DLIB_SUFFIX:STRING=${LIBDIRSUFFIX} || exit 1
And one last note since this is all stuff based off -current it is
subject to change at any moment.

Last edited by XGizzmo; 06-30-2009 at 07:15 AM.
 
Old 06-30-2009, 07:15 AM   #5
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Original Poster
Rep: Reputation: 89
uhm, my bad, I should have checked the updated template on SlackBuilds.org

OK, so I'll alter the SlackBuilds with this simple addition and do some testing later tonight.
If it works fine (I guess it will), I'll contact the authors of the SlackBuild scripts that do not follow the newer template and suggest the changes.
 
Old 06-30-2009, 07:28 AM   #6
XGizzmo
Member
 
Registered: Mar 2007
Distribution: Slackware
Posts: 264

Rep: Reputation: 68
Quote:
Originally Posted by niels.horn View Post
If it works fine (I guess it will), I'll contact the authors of the SlackBuild scripts that do not follow the newer template and suggest the changes.
Hold off on that, submissions are closed right now and they would not be able to update them. Also there is a very good chance it will be fix when 13.0 is released.
 
Old 06-30-2009, 07:29 AM   #7
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
For slamd64 I always compile using:

Code:
/configure --prefix=/usr --libdir=/usr/lib64
with '--shlibdir=/usr/lib64' for ffmpeg.

As for cmake I use:

Code:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib64 .
 
Old 06-30-2009, 02:36 PM   #8
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Original Poster
Rep: Reputation: 89
Quote:
Originally Posted by XGizzmo View Post
Hold off on that, submissions are closed right now and they would not be able to update them. Also there is a very good chance it will be fix when 13.0 is released.
I understand that after the release of Slackware 13.0 at least e new category will be started in SlackBuilds.
But will all SlackBuild scripts have to pass through a new evaluation to be listed as "13.0 compatible"?
Or will there be a category for "64-bit compatible"?

Some SlackBuild scripts need to be split because they use different "sources" for 32 & 64 bit (Opera comes to mind).
Others simply won't be available for 64-bits, like GoogleEarth, since there is no 32-bits "source" available.

Ah well, I'll just wait for the new release and see what will happen.
 
Old 06-30-2009, 02:53 PM   #9
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 728

Rep: Reputation: 168Reputation: 168
Quote:
Originally Posted by niels.horn View Post
I understand that after the release of Slackware 13.0 at least e new category will be started in SlackBuilds.
But will all SlackBuild scripts have to pass through a new evaluation to be listed as "13.0 compatible"?
Or will there be a category for "64-bit compatible"?

Some SlackBuild scripts need to be split because they use different "sources" for 32 & 64 bit (Opera comes to mind).
Others simply won't be available for 64-bits, like GoogleEarth, since there is no 32-bits "source" available.

Ah well, I'll just wait for the new release and see what will happen.
All will be made clear soon enough. :-)
 
Old 06-30-2009, 04:00 PM   #10
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Original Poster
Rep: Reputation: 89
Quote:
Originally Posted by chess View Post
All will be made clear soon enough. :-)
Suspense... Suspense...

"Anxiety leads to the dark side"
 
  


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
building kdebluetooth from Slackbuilds on Slackware64-current gtludwig Slackware 5 06-27-2009 05:59 PM
Slackware64...Where? cwwilson721 Slackware 16 05-28-2009 08:21 AM
Current and SlackBuilds SqdnGuns Slackware 8 05-18-2009 04:55 AM
Slackbuilds from 12.0 for 12.1 arubin Slackware 7 05-07-2008 03:51 AM
Use SlackBuilds.org or my own hosting to offer up SlackBuilds? hollywoodb Slackware 6 11-30-2006 08:56 PM


All times are GMT -5. The time now is 03:18 PM.

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