LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   SlackBuilds and Slackware64 (http://www.linuxquestions.org/questions/slackware-14/slackbuilds-and-slackware64-736657/)

niels.horn 06-30-2009 06:30 AM

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?

wildwizard 06-30-2009 06:58 AM

Quote:

Originally Posted by niels.horn (Post 3591322)
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

piete 06-30-2009 07:02 AM

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.

XGizzmo 06-30-2009 07:11 AM

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.

niels.horn 06-30-2009 07:15 AM

uhm, my bad, I should have checked the updated template on SlackBuilds.org :o

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.

XGizzmo 06-30-2009 07:28 AM

Quote:

Originally Posted by niels.horn (Post 3591373)
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.

H_TeXMeX_H 06-30-2009 07:29 AM

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 .

niels.horn 06-30-2009 02:36 PM

Quote:

Originally Posted by XGizzmo (Post 3591393)
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.

chess 06-30-2009 02:53 PM

Quote:

Originally Posted by niels.horn (Post 3591938)
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. :-)

niels.horn 06-30-2009 04:00 PM

Quote:

Originally Posted by chess (Post 3591955)
All will be made clear soon enough. :-)

Suspense... Suspense...

"Anxiety leads to the dark side" :jawa:


All times are GMT -5. The time now is 08:07 PM.