Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-29-2013, 04:58 PM
|
#1
|
Senior Member
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469
|
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.
|
|
|
11-29-2013, 07:18 PM
|
#2
|
Member
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 567
Rep: 
|
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.
|
|
|
11-29-2013, 08:07 PM
|
#3
|
Senior Member
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469
Original Poster
|
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.
|
|
|
11-30-2013, 12:16 AM
|
#4
|
Member
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 567
Rep: 
|
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
|
|
|
11-30-2013, 05:07 AM
|
#5
|
Senior Member
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052
|
Hello,
Quote:
Originally Posted by TommyC7
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
|
|
|
11-30-2013, 07:31 AM
|
#6
|
Senior Member
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469
Original Poster
|
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.
|
|
|
11-30-2013, 08:05 AM
|
#7
|
Senior Member
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052
|
Hello,
Quote:
Originally Posted by Knightron
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.
|
|
|
11-30-2013, 08:17 AM
|
#8
|
Member
Registered: Mar 2012
Distribution: Slackware, Alma, OpenBSD, FreeBSD
Posts: 567
Rep: 
|
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).
|
|
|
12-01-2013, 05:37 AM
|
#9
|
Member
Registered: Sep 2011
Posts: 925
|
Using setarch(1) in addition to setting $ARCH could be useful, too.
|
|
|
12-01-2013, 08:45 AM
|
#10
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
12-01-2013, 03:08 PM
|
#11
|
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559
|
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
|
|
|
12-02-2013, 04:38 AM
|
#12
|
Senior Member
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052
|
Hello,
Quote:
Originally Posted by Alien Bob
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
|
|
|
12-02-2013, 09:23 PM
|
#13
|
Senior Member
Registered: Jan 2011
Location: Australia
Distribution: openSUSE
Posts: 1,469
Original Poster
|
Quote:
Originally Posted by Alien Bob
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 
|
|
|
All times are GMT -5. The time now is 12:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|