LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 multilib, can't compile 32-bit apps. (https://www.linuxquestions.org/questions/slackware-14/slackware64-multilib-cant-compile-32-bit-apps-812226/)

RajahBrooke 06-04-2010 06:36 PM

Slackware64 multilib, can't compile 32-bit apps.
 
I installed Slackware64 13.1 two days ago for the first time ever on my Dell Inspiron 1525 after using linux for about a year (Debian and Fedora, though I've installed a few others in VMs). I've really enjoyed Slackware so far, it's been comparatively trouble free. However, I decided to follow AlienBOB's instructions to make it multilib, and though I thought I'd done everything right - I can't seem to compile any 32-bit 13.1 slackbuilds; I've tried with sbopkg as well as the normal method, but it simply won't work. I must have done something wrong, but I've re-read the instructions on getting mutilib working several times and I can't work out what it is. This is the first time I've joined a Linux-oriented forum, so I'm not used to telling other people what's going wrong. What sort of info should I give? Also, is this the right place for this question? :P

Cheers.

rfernandez 06-04-2010 06:41 PM

Yes, here's the right place for your question. Maybe Alien Bob himself will come here to give you proper advice. But, for now, have you fallowed the steps to compile 32 bit programs on a 64 bit environment?

http://alien.slackbook.org/dokuwiki/...2-bit_programs

By having the multilib support on your system, it will make you able to _run_ 32bit programs without any needed action. But, compiling 32 bit programs will need some modifications, specified on the above link.

SqdnGuns 06-04-2010 09:22 PM

I just did this an hour ago in order to run Skype, Alien Bob's guide works perfectly...............Thanks Alien, may need to throw a few more $$ to your fund soon. (Gotta get a new job 1st)

Daedra 06-05-2010 02:49 AM

Quote:

Originally Posted by SqdnGuns (Post 3992977)
I just did this an hour ago in order to run Skype, Alien Bob's guide works perfectly...............Thanks Alien, may need to throw a few more $$ to your fund soon. (Gotta get a new job 1st)

Hey Huntington beach... I'm up long beach. Nice to know there are slackers around :).

RajahBrooke read Alien Bob's guide, its easy. I just compiled wine in Slackware64 using the same info. It works.

RajahBrooke 06-05-2010 05:18 AM

Thankyou for the replies.

@ rfernandez: As I said in the OP - I followed every instruction - including typing
Code:

. /etc/profile.d/32dev.sh
in the terminal before trying to compile apps, I make sure to put my ARCH as x86_64, and I remove mentions of 64-bit libraries when they appear in slackbuilds - as instructed. Is there the output to something that might help point to what I've done wrong?

@ Daedra and SqdnGuns: I know the instructions are supposed to be easy to follow, and I read every post on the internet mentioning AlienBOB's instructions, as well as re-reading his instructions endlessly. So, though I am very happy that it works for you - it clearly hasn't for me.

I want to give useful information so I can get this sorted and get out of everyone's hair - please, tell me how I can be more helpful.

Daedra 06-05-2010 05:23 AM

ignore this
wrong post, sorry

ponce 06-05-2010 05:49 AM

are you sourcing /etc/profile.d/32dev.sh and launching the slackbuilds as root (needed)?
which slackbuilds are you trying to build for 32bit?
post the modified slackbuilds and output of the failing build: if it's an huge output you can use http://pastebin.com

wadsworth 06-05-2010 05:58 AM

Sounds like you've done everything right.
Here's one more modification to try in the build script:
CFLAGS="-m32"
CXXFLAGS="-m32"

RajahBrooke 06-05-2010 06:15 AM

hello, when you say "sourcing", what exactly do you mean? I do "su -" then I type ". /etc/profile.d/32dev.sh" and press enter before trying to compile anything. Is that the correct order?

I've mostly been trying to install skype (though I've tried virtualbox, which completely fails to compile) - it appears to work, but then when I try to launch skype, the icon flashes for a moment, than disappears.

Here's the slackbuild - note the only change I've made was to the ARCH - which you have to do, unless I completely misunderstood:

Code:

#!/bin/sh

# Slackware build script for skype

# Copyright 2006  Martin Lefebvre <dadexter@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# Modified by the SlackBuilds.org project
# Ported from 12.1 repository; now only Skype 2.0 compatible

PRGNAM=skype
VERSION=2.0.0.72
ARCH=x86_64 # leave this alone
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# This is a repackage of a binary distribution
# CFLAGS are not required

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
chmod 644 sounds/*

mkdir -p $PKG/usr/bin $PKG/usr/share/{skype,pixmaps,applications} \
  $PKG/etc/dbus-1/system.d
cp -a skype $PKG/usr/bin
cp -a avatars sounds lang $PKG/usr/share/skype
cp skype.desktop $PKG/usr/share/applications/skype.desktop
cp icons/SkypeBlue_48x48.png $PKG/usr/share/pixmaps/skype.png
cp skype.conf $PKG/etc/dbus-1/system.d/skype.conf.new

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

It builds without any warnings or errors I can notice, and the package installs fine with installpkg. However, upon trying to launch it, it just doesn't work. It is acting exactly as it did when I mistakenly tried to build skype on Slackware without the multilib support. I think the system is continuing to prefer 64-bit over 32-bit - in spite of ". /etc/profile.d/32dev.sh"

It's obvious that I've done something wrong while following the instructions to make the system multilib, but I don't know where - I was very careful to follow the instructions... I don't know what to do to find where I've messed up.

This is frustrating because, otherwise, this is pretty much the most trouble-free install I've had... a little problem with mplayerplug-in (occasionally sound stops working for no good reason) and the fact that I need to do "modprobe -r b43 ; modprobe -r wl ; modprobe wl" everytime I reboot otherwise my system won't detect my wireless (it's put wireless as eth1 instead of wlan0 and doesn't think the former exists). Otherwise - rock solid.

ponce 06-05-2010 06:43 AM

that skype script doesn't compile to you a 32bit skype, it simply take the skype distribution tarball and packages it following some standard slackware paths.
so, in this special case and a few others like this where you don't have to compile, the ". /etc/profile.d/32dev.sh" (same thing as "source /etc/profile.d/32dev.sh") is not really needed (it contains some environment stuff that you should need only at build time).

you can't probably run it because to run 32bit apps you need in your multilib system also a set of basic -compat32 packages (because the 32bit binaries need 32bit libs on the system), as the ones generated by the massconvert32.sh script (you should have it available, is in the compat32-tools package).
you can convert them yourself from a slackware-13.1 mirror and install the results running as root
Code:

mkdir compat32
cd compat32
massconvert32.sh -u http://www.slackware.at/data/slackware-13.1/slackware
upgradepkg --install-new --reinstall *-compat32/*.t?z

as indicated in alien bob's guide to multilib.

these are the libraries skype uses (the ones on /usr/lib are from the -compat32 packages)
Code:

$ ldd skype
        linux-gate.so.1 =>  (0xf77bf000)
        libasound.so.2 => /usr/lib/libasound.so.2 (0xf76be000)
        libXv.so.1 => /usr/lib/libXv.so.1 (0xf76b9000)
        libXss.so.1 => /usr/lib/libXss.so.1 (0xf76b6000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xf76ae000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xf7696000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xf7689000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xf7680000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xf7679000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xf7674000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xf766b000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xf7667000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xf75f1000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xf75c3000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xf75b5000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xf749a000)
        librt.so.1 => /lib/librt.so.1 (0xf7490000)
        libdl.so.2 => /lib/libdl.so.2 (0xf748c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf7473000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf7383000)
        libm.so.6 => /lib/libm.so.6 (0xf735d000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xf7340000)
        libc.so.6 => /lib/libc.so.6 (0xf71dd000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xf71d8000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xf71c0000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xf71bd000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xf71b8000)
        libz.so.1 => /usr/lib/libz.so.1 (0xf71a4000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xf7183000)
        /lib/ld-linux.so.2 (0xf77c0000)


RajahBrooke 06-05-2010 06:55 AM

@ ponce: I said I followed every instruction - I used massconvert, with the -u option, and pointed it at a UK slack mirror. I have all the compat32 tools, and I installed all the compat32 packages; I can see them all installed with pkgtool. Should I try following the instructions again from the start, as if I'd not done any of it? Is this safe?

Nothing will compile - virtualbox fails altogether. I know I must have either misunderstood, or missed something in the AlienBOB's guide - I know it's a good guide since I'm the only one with any problems :P

ponce 06-05-2010 06:58 AM

can you please post the output of
Code:

ldd /usr/bin/skype
the output of the command
Code:

skype
launched in a terminal
and the output of
Code:

zgrep IA32 /proc/config.gz
?

also the output of
Code:

ls -1 /var/log/packages/*
can help

if something else doesn't build we should see the output errors you got from building, so we have something to base on our guesses (if not we blind-shoot) ;)

RajahBrooke 06-05-2010 08:26 AM

alright - I've got an exam now, so I can't do all that now. However, when I get back, I'll try and build virtualbox - since I know that doesn't work. I've uninstalled the skype package already, I'm afraid - but I will post the output of "ls -l /var/log/packages/*" when I get back... won't that be absolutely massive? I must have like 15000 packages on this or something (full install, plus things I needed for whatever reason). Not used the pastebin before - when I work it out, I'll post.

edit - here's the result for "ls -l /var/log/packages/*"

ponce 06-05-2010 08:45 AM

to try help you i need also the other outputs: virtualbox is not a 32bit application, and so is not related to your multilib problem.

remember to post the errors you got: "this doesn't work/build" is not enough to have help.

but, as first thing that I can see from the /var/log/packages stuff, you have not installed alien glibc multilib packages.

wadsworth 06-05-2010 09:23 AM

Looks like you've upgraded to these packages:
gcc-4.4.4_multilib-x86_64-1alien.txz
gcc-g++-4.4.4_multilib-x86_64-1alien.txz
gcc-gfortran-4.4.4_multilib-x86_64-1alien.txz
gcc-gnat-4.4.4_multilib-x86_64-1alien.txz

but missed all these:
gcc-java-4.4.4_multilib-x86_64-1alien.txz
gcc-objc-4.4.4_multilib-x86_64-1alien.txz
glibc-2.11.1_multilib-x86_64-3alien.txz
glibc-i18n-2.11.1_multilib-x86_64-3alien.txz
glibc-profile-2.11.1_multilib-x86_64-3alien.txz
glibc-solibs-2.11.1_multilib-x86_64-3alien.txz
glibc-zoneinfo-2.11.1_multilib-noarch-3alien.txz

RajahBrooke 06-05-2010 11:11 AM

OK, back from my exam. Took a look at what you pointed out (re not having all the gcc and glibc packages) and have rectified the problem. I realise now what I did - I downloaded all the packages, but there were already packages in the directory I put them in (vlc, and a couple of others). In trying to remove the already existing packages, I managed to accidentally delete a few of the packages I actually needed - schoolboy error; rather embarrassed now.

Have since also made sure all the compat32 packages were in working order and have reattempted to install skype using sbopkg. It now runs - though it crashes unexpectedly with the following message:

Code:

ALSA lib control.c:902:(snd_ctl_open_noupdate) Invalid CTL hdmi
output of "ldd /usr/bin/skype"
Code:

linux-gate.so.1 =>  (0xffffe000)
        libasound.so.2 => /usr/lib/libasound.so.2 (0xf769d000)
        libXv.so.1 => /usr/lib/libXv.so.1 (0xf7698000)
        libXss.so.1 => /usr/lib/libXss.so.1 (0xf7695000)
        librt.so.1 => /lib/librt.so.1 (0xf768c000)
        libQtDBus.so.4 => /usr/lib/libQtDBus.so.4 (0xf7612000)
        libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0xf6b81000)
        libQtNetwork.so.4 => /usr/lib/libQtNetwork.so.4 (0xf6a5b000)
        libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0xf67d9000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf67c0000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf66d0000)
        libm.so.6 => /lib/libm.so.6 (0xf66a9000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xf668c000)
        libc.so.6 => /lib/libc.so.6 (0xf6529000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xf640e000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xf6400000)
        libdl.so.2 => /lib/libdl.so.2 (0xf63fc000)
        /lib/ld-linux.so.2 (0xf7763000)
        libQtXml.so.4 => /usr/lib/qt/lib/libQtXml.so.4 (0xf63b8000)
        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xf63b4000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xf62e4000)
        libpng14.so.14 => /usr/lib/libpng14.so.14 (0xf62be000)
        libz.so.1 => /usr/lib/libz.so.1 (0xf62aa000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xf6233000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xf61f9000)
        libEGL.so.1 => /usr/lib/libEGL.so.1 (0xf61ec000)
        libSM.so.6 => /usr/lib/libSM.so.6 (0xf61e4000)
        libICE.so.6 => /usr/lib/libICE.so.6 (0xf61cd000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xf61c4000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xf6195000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xf617d000)
        libuuid.so.1 => /lib/libuuid.so.1 (0xf6179000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xf6159000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xf6155000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xf6150000)

output of "zgrep IA32 /proc/config.gz"

Code:

CONFIG_IA32_EMULATION=y
# CONFIG_IA32_AOUT is not set

output of "ls -1 /var/log/packages/*"
here

RajahBrooke 06-05-2010 11:22 AM

BTW, sorry for double-posting, but I wanted to ask if this now counts as solved. The original problem appears to have been solved. Should I start a new thread if I want help with the skype problem (assuming I can't find a solution with a bit of googling :P)?

ponce 06-05-2010 11:36 AM

you might, but I would check if skype is seeing the sound card you're using, because it looks like it's trying to use the hdmi output of your video card and not the internal sound chipset.

check which sound card is configured with alsaconf.

following what I read, the problem should be also that your sound card doesn't support hardware mixing and you are launching skype while some other app is using the sound card.

(but I'm not much into alsa, so I think I'll pass).

and yes, google about it before opening a new thread ;)

SqdnGuns 06-05-2010 11:41 AM

Quote:

Originally Posted by RajahBrooke (Post 3993422)
OK, back from my exam. Took a look at what you pointed out (re not having all the gcc and glibc packages) and have rectified the problem. I realise now what I did - I downloaded all the packages, but there were already packages in the directory I put them in (vlc, and a couple of others). In trying to remove the already existing packages, I managed to accidentally delete a few of the packages I actually needed - schoolboy error; rather embarrassed now.

Have since also made sure all the compat32 packages were in working order and have reattempted to install skype using sbopkg. It now runs - though it crashes unexpectedly with the following message:

Quote:

Originally Posted by RajahBrooke (Post 3993179)
@ Daedra and SqdnGuns: I know the instructions are supposed to be easy to follow, and I read every post on the internet mentioning AlienBOB's instructions, as well as re-reading his instructions endlessly. So, though I am very happy that it works for you - it clearly hasn't for me.

I want to give useful information so I can get this sorted and get out of everyone's hair - please, tell me how I can be more helpful.

OK, you obviously did not follow Aliens instructions exactly......

I'd mark this thread as solved and create a new thread for your Skype issue.

RajahBrooke 06-05-2010 12:02 PM

Yeah, I was confused by the fact that all the links to the gcc and glibc packages had clearly been followed (they were purple instead of the usual blue) meaning I had downloaded them all - but thanks to my hamfistedness, I managed to delete a bunch of rather important packages :P I suppose it's one of those things - you sometimes need an extra pair of eyes to see the bleeding obvious! OK, marking this as solved, and will look into the alsaconf issue and try not to post a new thread until I'm sure I can't figure it out on my own. Cheers everyone.


All times are GMT -5. The time now is 01:22 PM.