LinuxQuestions.org
Help answer threads with 0 replies.
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-29-2013, 04:58 PM   #1
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
Install the 32 bit version and the 64 bit version, on multilib system.


Hi, i'm running Slackware 14, multilib. I have installed TiMidity++ from Slackbuilds.org, compiled as 32 bit. I would also like to install it as a 64 bit application as well, is this possible? I was thinking the naming would be an issue. Pkgtool reports it as this: TiMidity++-2.14.0-x86_64-1

Last edited by Knightron; 11-29-2013 at 07:58 PM.
 
Old 11-29-2013, 07:18 PM   #2
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 567

Rep: Reputation: Disabled
Quote:
Knightron:
I have installed TiMidity++ from Slackbuilds.org, compiled as 32 bit.
Do you know this for a fact? Because if pkgtool reports: TiMidity++-2.14.0-x86_64-1 it sounds like you built a 64-bit version of the package.

My guess is, you didn't build a 32-bit package on your multilib installation. To do so:

Code:
. /etc/profile.d/32dev.sh # (or 32dev.csh if you use that).
./TiMidity++.SlackBuild
This will create a 32-bit package of TiMidity++ which you can then use convertpkg-compat32 on like this:

Code:
convertpkg-compat32 /path/to/TiMidity++-2.14.0-i?86-1.tgz
Which will give you the same 32-bit package with a few changes (e.g. /usr/bin/32) and a different name. Then you can build a 64-bit package normally (although not in the same environment since the /etc/profile.d/32dev.sh script was sourced).

Now you'll have 2 separate packages and can install them normally.
 
Old 11-29-2013, 08:07 PM   #3
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469

Original Poster
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
Hi TommyC7. Thanks for the advice. Eric has stated the following when compiling packages as 32 bit.
Quote:
Compiling 32-bit programs
=========================

In case you need to compile a 32-bit program (wine and grub are two examples
of open source programs that are 32-bit only) you first configure your
shell environment by running the command:

. /etc/profile.d/32dev.sh

Note the 'dot' in front of the filename - that is actually part of the
commandline! It will change or create several environment variables so
that 32-bit versions of binaries are preferred.

You will be able to use standard SlackBuild scripts to build 32-bit packages
for Slackware64. You have to keep two things in mind:
(1) You will have to define the ARCH variable as 'x86_64' even though you
are compiling a 32-bit program!
(2) You will have to edit the SlackBuild and if it wants to use 'lib64/'
directories for "$ARCH = x86_64", you will have to force it to use 'lib/'
directories instead. Usually, this is accomplished by finding a definition
like:
LIBDIRSUFFIX="64"
and change this line to
LIBDIRSUFFIX=""
I have done all this, pkgtool reports it as a x86_64 because of point 1 in Eric's guide.
 
Old 11-30-2013, 12:16 AM   #4
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 567

Rep: Reputation: Disabled
In that case, I would recommend appending the ARCH variable manually like so:

Code:
. /etc/profile.d/32dev.sh # source 32dev.sh
ARCH=i486 ./TiMidity++.SlackBuild # setting the ARCH will take care of that LIBDIRSUFFIX thing too
convertpkg-compat32 -i /tmp/TiMidity++-2.14.0-i?86-1.tgz
 
Old 11-30-2013, 05:07 AM   #5
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hello,

Quote:
Originally Posted by TommyC7 View Post
In that case, I would recommend appending the ARCH variable manually like so:

Code:
. /etc/profile.d/32dev.sh # source 32dev.sh
ARCH=i486 ./TiMidity++.SlackBuild # setting the ARCH will take care of that LIBDIRSUFFIX thing too
convertpkg-compat32 -i /tmp/TiMidity++-2.14.0-i?86-1.tgz
As stated by Eric here, this will result in gcc error :

Quote:
You will have to define the ARCH variable as 'x86_64' even though you are compiling a 32-bit program!
This is related to the triplet of “$ARCH-slackware-linux” which is normally used in the “configure” command. Also, try setting the ARCH to for instance “i486” and you will see that the CFLAGS definition for that architecture will result in gcc errors like ”compiler can not create executables”.
AFAIK, you can pass any 32-bit package built on Slackware64 to convertpkg-compat32 without any issue.

Note that, regardless of the input package ARCH field value, convertpkg-compat32, will warn you if it seems to contain 64-bit libraries :

Code:
# Check if the user fed us a 64bit package:
if [ -d usr/lib64 -o -d lib64 ]; then
  echo "** This script converts 32bit packages for Slackware64 multilib!"
  echo "** It looks like you gave me a 64bit package instead."
  echo "** Are you certain you want to convert the package $(basename $PKGPATH) ?"
  echo "** Press [Ctrl]-[C] now if you want to abort the script."
  read JUNK
fi
Cheers.


--
SeB
 
Old 11-30-2013, 07:31 AM   #6
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469

Original Poster
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
It's not making the package that i'm concerned about.
I desire to install both the 32bit and 64bit version of the same package. I am concerned there might be files that'll get over written, or maybe won't even be able to install since they will be named the same.
 
Old 11-30-2013, 08:05 AM   #7
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hello,

Quote:
Originally Posted by Knightron View Post
It's not making the package that i'm concerned about.
I desire to install both the 32bit and 64bit version of the same package. I am concerned there might be files that'll get over written, or maybe won't even be able to install since they will be named the same.
You should not experience that kind of issue with 32 bit packages converted using convertpkg-compat32 which preserves only 32 bit binaries, 32 bit libraries and some documentation files from input package. Moreover, 32bit binaries are moved into /usr/bin/32.

--
SeB

Last edited by phenixia2003; 11-30-2013 at 08:08 AM.
 
Old 11-30-2013, 08:17 AM   #8
TommyC7
Member
 
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 567

Rep: Reputation: Disabled
Quote:
phenixia2003:
As stated by Eric here, this will result in gcc error :
Quote:
You will have to define the ARCH variable as 'x86_64' even though you are compiling a 32-bit program!
This is related to the triplet of “$ARCH-slackware-linux” which is normally used in the “configure” command. Also, try setting the ARCH to for instance “i486” and you will see that the CFLAGS definition for that architecture will result in gcc errors like ”compiler can not create executables”.
I only get that error when I don't source /etc/profile.d/32dev.sh first:
Code:
ARCH=i486 ./gpicview.SlackBuild
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i486-slackware-linux-gnu
checking host system type... i486-slackware-linux-gnu
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/gpicview-0.2.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
But if I do source /etc/profile.d/32dev.sh and append the ARCH=i486 variable, the package is successfully built.

Quote:
Knightron:
I desire to install both the 32bit and 64bit version of the same package. I am concerned there might be files that'll get over written, or maybe won't even be able to install since they will be named the same.
That's where the convertpkg-compat32 script comes in. It'll install the 32-bit version of the stuff in /usr/bin into /usr/bin/32, /lib64 stuff will go into /lib, etc. You use the convertpkg-compat32 script on a 32-bit package (which is what I believe led us into the discussion of building 32-bit packages on Slackware64).
 
Old 12-01-2013, 05:37 AM   #9
jtsn
Member
 
Registered: Sep 2011
Posts: 925

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Using setarch(1) in addition to setting $ARCH could be useful, too.
 
Old 12-01-2013, 08:45 AM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
As the name "multilib" already says, it is intended to provide 32 bit libraries for applications that don't exist as 64 bit binaries. It is not intended to have the 32 and 64 bit version of an application installed simultaneously. This wouldn't make sense anyway, why would you install the 32 bit version if you have already the 64 bit version? If you really want to have both versions available I would opt for a chroot with a 32 bit Slackware system.
 
Old 12-01-2013, 03:08 PM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120Reputation: 8120
I think I need to re-visit the instructions for compiling 32-bit software on a multilib 64-bit Slackware computer. Setting ARCH to i486 appears to work correctly these days - when I wrote these instructions around the time of Slackware 13.0, I just got compliler errors.

What I think will change in those instructions, is this: you simply set ARCH=i486 and then you'll end up with a package name like foobar-1.1-i486-1.txz. The ARCH variable nicely distinguishes it from the 64-bit version of such a package. And then, when you convert it to a "compat32" package I would like the resulting package "foobar-compat32" to have an arch "x86_64" because setting it to "i486" would perhaps cause too much confusion after all these years of multilib.

Knightron, rename your 32-bit package from TiMidity++-2.14.0-x86_64-1 to TiMidity++-2.14.0-i486-1 and then run convertpkg-compat32 on it. That should solve your issue.

phenixia2003 - changing the package arch for 32-bit packages on multilib to "i486" may have impact on your scripts. Please check if you have to change anything, I won't do anything until you know how to handle this. Like I said, I would like to keep the ARCH for compat32 packages to "x86_64". So perhaps you do not have to change a bit.

Eric
 
Old 12-02-2013, 04:38 AM   #12
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009Reputation: 1009
Hello,

Quote:
Originally Posted by Alien Bob View Post
phenixia2003 - changing the package arch for 32-bit packages on multilib to "i486" may have impact on your scripts. Please check if you have to change anything, I won't do anything until you know how to handle this. Like I said, I would like to keep the ARCH for compat32 packages to "x86_64". So perhaps you do not have to change a bit.
If you don't change how convertpkg-compat32 works (i.e output package with ARCH=x86_64), I will have nothing to do. Otherwise, compat32pkg will be slightly impacted(only one line of code to change), and slackpkg+ (development version) already allows to mix 32-bit and 64-bit packages on Slackware64 (disabled by default). This has been introduced following this thread.

Cheers.

--
SeB
 
Old 12-02-2013, 09:23 PM   #13
Knightron
Senior Member
 
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469

Original Poster
Blog Entries: 6

Rep: Reputation: 200Reputation: 200Reputation: 200
Quote:
Originally Posted by Alien Bob View Post
Knightron, rename your 32-bit package from TiMidity++-2.14.0-x86_64-1 to TiMidity++-2.14.0-i486-1 and then run convertpkg-compat32 on it. That should solve your issue.
Cheers
 
  


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
[SOLVED] Cannot install fpc 32 bit on 64 bit multilib slackbuild. george-lappies Slackware 8 05-26-2011 09:37 AM
Is the 64 bit version of Mandriva Powerpack multilib enabled? Cultist Mandriva 2 09-15-2010 05:56 PM
32-bit version of every 64-bit package on system? sancho Fedora 11 08-05-2008 08:58 AM
How to install 32-bit version of libXp on x86_64 system (FC5) srosburg Fedora 3 08-23-2006 01:44 PM
Which version of 32 bit redhat will install on IBM xSeries 366 (64 bit)? Hello123 Linux - Hardware 2 09-14-2005 05:50 AM

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

All times are GMT -5. The time now is 12:59 AM.

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