LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 multilib, can't compile 32-bit apps. (http://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


All times are GMT -5. The time now is 02:34 AM.