LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 02-05-2013, 06:14 PM   #1
insectiod
LQ Newbie
 
Registered: Feb 2013
Posts: 24

Rep: Reputation: Disabled
Problem building fst on a multilib system


Im using Slackware 14.0 64 bit, and I installed the multilib packages from Alien Bob, following his guide. It seems to work fine because I could build both 32 bit wine and 32 bit jack-audio-connection-kit without any problems. However when I try to build the package fst from slackbuilds.org I run into trouble.

This is the error message I get:

Code:
winegcc -mwindows -o fst audiomaster.o fst.o fstinfofile.o gtk.o jfst.o fpsparser.o vstwin.o    -L/usr/lib32 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgi
o-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -ljack -lpthread -lrt   -L/
usr/X11R6/lib -lpthread -lrt -lX11 -m32   -luuid
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../lib/libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/../lib/libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib64/libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libjack.so when searching for -ljack
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: cannot find -ljack
collect2: error: ld returned 1 exit status
winegcc: gcc failed
make: *** [fst] Error 2
So there is a problem with libjack.so. But I do have a 32 bit version of that library installed:
Code:
>>>grep libjack /var/log/packages/jack-audio-connection-kit-compat32-0.121.3-x86_64-1_SBocompat32 
usr/lib/libjack.la
usr/lib/libjackserver.so.0.0.28
usr/lib/libjackserver.la
usr/lib/libjack.so.0.0.28
>>>ls -l /usr/lib/libjack.so
lrwxrwxrwx 1 root root 17 Feb  6 00:26 /usr/lib/libjack.so -> libjack.so.0.0.28
So why doesn't it build?
 
Old 02-05-2013, 06:36 PM   #2
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 505
Blog Entries: 2

Rep: Reputation: 67
It looks like you didn't edit the slackbuild and change the line that has
LIBDIRSUFFIX="64" to
LIBDIRSUFFIX=""

Don't forget to run ". /etc/profile.d/32dev.sh" (including the dot) first.
 
1 members found this post helpful.
Old 02-05-2013, 09:06 PM   #3
insectiod
LQ Newbie
 
Registered: Feb 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Thanks, I actually did edit the slackbuild like you explained. Here's what I did:

Code:
>. /etc/profile.d/32dev.sh
>which gcc
/usr/bin/32/gcc
Edit the slackbuild:
added this line:
Code:
ARCH=x86_64
And changed this part:
Code:
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX=""
Running the slackbuild script it creates the package without problems:
Code:
Slackware package /tmp/jack-audio-connection-kit-0.121.3-x86_64-1_SBo.tgz created
Code:
>sudo convertpkg-compat32 -i /tmp/jack-audio-connection-kit-0.121.3-x86_64-1_SBo.tgz
Package created:  /tmp/jack-audio-connection-kit-compat32-0.121.3-x86_64-1_SBocompat32.txz
Code:
>sudo installpkg /tmp/jack-audio-connection-kit-compat32-0.121.3-x86_64-1_SBocompat32.txz
>file /usr/lib/libjack.so.0.0.28 
/usr/lib/libjack.so.0.0.28: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
The part that confuses me is that according to the instructions here, under the headline compiling 32bit programs, it says that I should set ARCH to x86_64. I tried building it with the ARCH=i686 instead and I do get a 32 bit version of libjack. But if possible it would be nice not to overwrite the 64 bit version of jack, which I suspect will happen if I just install the i686 version. How is multilib compiling supposed to work, should a 32 bit package be build because i run /etc/profile.d/32dev.h, even though the the ARCH variable is set to 64?

Last edited by insectiod; 02-05-2013 at 09:08 PM.
 
Old 02-05-2013, 11:29 PM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,314

Rep: Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816Reputation: 816
If a 32bit application needs some other 32bit dep to build that is not in standard slackware, and then not in the compat32 packages distributed by Alien, general path to follow is to install its x86_64 version and the corrisponding compat32 package together.

This is more or less how I do it:
I have three of them that I use this way here, OpenAL, jack and lua (I use the first two for wine and the other for etlegacy): for each of them I built a 32bit package on a slackware 32bit virtual machine (I don't usually build 32bit packages on multilib) that I after converted on the target system in a compat32 package on the target system with multilib with
Code:
convertpkg-compat32 -i my32bitpackage.txz
and I installed there both the resulting package and the x86_64 version.

Then, to build wine, I source /etc/profile.d/32dev.sh and I use ARCH=x86_64: the resulting binary is 32bit
Code:
$ file /usr/bin/wine                    
/usr/bin/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

Last edited by ponce; 02-06-2013 at 02:08 AM.
 
1 members found this post helpful.
Old 02-06-2013, 02:07 AM   #5
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 505
Blog Entries: 2

Rep: Reputation: 67
Quote:
Originally Posted by insectiod View Post
Thanks, I actually did edit the slackbuild like you explained. Here's what I did:
< - - - snip - - ->
Code:
>sudo convertpkg-compat32 -i /tmp/jack-audio-connection-kit-0.121.3-x86_64-1_SBo.tgz
Did you use sudo for making your package?

I suspect that each time you ran sudo you lost the environment that was setup by . /etc/profile.d/32dev.sh so that although it used /usr/lib instead of /usr/lib64 it still generated a 64-bit package.

Run su - and THEN run . /etc/profile.d/32dev.sh and it should generate a 32-bit library. (Don't forget that dot at the beginning is important).

Last edited by psionl0; 02-06-2013 at 02:11 AM.
 
1 members found this post helpful.
Old 02-06-2013, 02:40 AM   #6
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 505
Blog Entries: 2

Rep: Reputation: 67
Quote:
Originally Posted by insectiod View Post
How is multilib compiling supposed to work, should a 32 bit package be build because i run /etc/profile.d/32dev.h, even though the the ARCH variable is set to 64?
Yes.

Just to test it out, I made both 32-bit and 64-bit versions of jack-audio-connection-kit and it worked:
Code:
~# ls /var/log/packages/jack*
/var/log/packages/jack-audio-connection-kit-0.121.3-x86_64-1_SBo
/var/log/packages/jack-audio-connection-kit-compat32-0.121.3-x86_64-1_SBocompat32
~# file /usr/lib64/libjack.so.0.0.28 
/usr/lib64/libjack.so.0.0.28: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
~# file /usr/lib/libjack.so.0.0.28 
/usr/lib/libjack.so.0.0.28: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

Last edited by psionl0; 02-06-2013 at 02:47 AM.
 
1 members found this post helpful.
Old 02-06-2013, 04:43 AM   #7
insectiod
LQ Newbie
 
Registered: Feb 2013
Posts: 24

Original Poster
Rep: Reputation: Disabled
Thanks psionl0, you where right, changing user to root and then sourcing /etc/profile.d/32dev.sh and running the slackbuild fixed the problem.

Just out of curiosity, does anyone know the purpose of setting ARCH to x86_64? I tried setting it to i686 and that also worked in this case.
 
Old 02-06-2013, 07:44 AM   #8
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 505
Blog Entries: 2

Rep: Reputation: 67
It looks like problem [SOLVED] . Alien Bob is smarter than me so if he says, set ARCH to x86_64 then I set ARCH to x86_64.

BTW the only time I use sudo is when I select a menu item or click on a WBAR icon that needs root privileges to run (eg "shutdown"). From the terminal, I almost always use su.
 
Old 02-06-2013, 07:57 AM   #9
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 247

Rep: Reputation: 138Reputation: 138
Hello,

Quote:
Originally Posted by insectiod View Post
Thanks psionl0, you where right, changing user to root and then sourcing /etc/profile.d/32dev.sh and running the slackbuild fixed the problem.

Just out of curiosity, does anyone know the purpose of setting ARCH to x86_64?
This is clearly explained into the section "Compiling 32-bit programs" from Eric's multilib wiki page :

Quote:
1. 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”. This is related to the design of a SlackBuild script. Rather than editing the script and change/remove CFLAGS definitions, you can set the ARCH to “x86_64” and save yourself some time. The real work is being done by the 32dev.sh script.
Cheers.

--
SeB
 
1 members found this post helpful.
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] mk-slack64-multilib : A tool to create slackware64+multilib tree/iso phenixia2003 Slackware 5 12-28-2012 05:42 AM
[SOLVED] Multilib system; dependency question Knightron Slackware 3 02-04-2012 05:45 PM
Building WINE on Slackware64 multilib? Lufbery Slackware 12 07-19-2010 06:22 PM
[SOLVED] Broffice not compile on Slack64(multilib or no multilib);SlackBuild afreitascs Slackware 4 06-14-2010 07:16 AM
[SOLVED] ORBit2 Slackbuild fails when building 32 bit package on current multilib damgar Slackware 4 04-10-2010 02:26 PM


All times are GMT -5. The time now is 11:57 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration