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
 
Search this Thread
Old 07-01-2010, 01:52 PM   #1
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Rep: Reputation: 15
compiling openmotif on Slackware 13.1


Hi,

I'm running 13.1 64bit with alienbob's multilib extension and want to add openmotif.

I used Eric's Slackbuild from http://connie.slackware.com/~alien/s...enmotif/build/ applying it to openmotif-2.3.3 and succeeded in compiling the 64bit-version.

Next I tried to compile in 32bit-mode, following alienbob instructions:

move lib64 to lib in openmotif.Slackbuild
export ARCH=x86_64
. /etc/profile.d/32dev.sh
./openmotif.Slackbuild

linking stops with error-message
Quote:
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib/crt1.o: In function `_start':
/glibc-tmp-88b9835d8519e3638ef4d116a6932cb2/glibc-2.11.1/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status
Where is my mistake?
Specifically, where does /usr/lib64/gcc/ come from?

Thx in advance,
Markus
 
Old 07-01-2010, 08:49 PM   #2
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 235

Rep: Reputation: 55
On a side note, isn't compiling openmotif with libdir=/usr/lib{64} going to clobber the lesstif static libraries?
 
Old 07-02-2010, 02:59 AM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

Rep: Reputation: Disabled
Quote:
Originally Posted by fskmh View Post
On a side note, isn't compiling openmotif with libdir=/usr/lib{64} going to clobber the lesstif static libraries?
Yes. If you want to compile and install openmotif, then first de-install lesstif.

Eric
 
Old 07-02-2010, 07:58 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,169

Rep: Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645
Quote:
Specifically, where does /usr/lib64/gcc/ come from ?
→ → gcc-4.4.4-x86_64-1(.txz)

This command can be used (to which package do <files> belong)

grep "usr/lib64/gcc" /var/log/packages/*
.....
 
0 members found this post helpful.
Old 07-02-2010, 11:52 AM   #5
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks for all the answers.

First, the side node: I didn't install lesstif, but only libXm.so.2 (manually), since xdvi is linked to it.

Second, @knudfl: sorry for my verbalization: I know, where lib64/gcc is coming from. My question is: I expect "$. /etc/profile.d/32dev.sh" to choose the correct (32bit) linker. Did I forget something?
 
Old 07-03-2010, 07:39 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,169

Rep: Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645
Quote:
Specifically, where does /usr/lib64/gcc/ come from ?
.
May be from : "" export ARCH=x86_64 ""

Why do you write that, when you want an x86 result ?
..
 
0 members found this post helpful.
Old 07-03-2010, 07:57 AM   #7
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Original Poster
Rep: Reputation: 15
maybe, Eric can help?

http://connie.slackware.com/~alien/multilib/
Quote:
...
Compiling 32-bit programs
=========================
...
(1) You will have to define the ARCH variable as 'x86_64' even though you
are compiling a 32-bit program!
...
 
Old 07-03-2010, 11:33 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,169

Rep: Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645
Sorry, I didn't know that, I avoid multilib.


But somewhere openmotif gets the idea, that a
64 bits gcc and a 64 bits linker is to be used.
..
 
0 members found this post helpful.
Old 07-05-2010, 01:31 PM   #9
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Original Poster
Rep: Reputation: 15
Porblem still not solved.
Any suggestions from the group?
 
Old 07-09-2010, 05:16 PM   #10
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Original Poster
Rep: Reputation: 15
made another test and downgraded to 2.3.2:

openmotif now compiles the before mentioned code, but linker is connected to 64bit-path:

Quote:
gcc -shared .libs/XmStrDefs.o .libs/ArrowB.o .libs/ArrowBG.o (...) .libs/Png.o -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/usr/lib64 -L/usr/lib64 /usr/lib64/libXmu.so /usr/lib64/libXt.so /usr/lib64/libXext.so /usr/lib64/libXp.so -lz -L/usr/lib /usr/lib64/libXft.so /usr/lib64/libXrender.so /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so /usr/lib64/libX11.so /usr/lib64/libjpeg.so /usr/lib64/libpng14.so -Wl,-soname -Wl,libXm.so.4 -o .libs/libXm.so.4.0.2
/usr/lib64/libXmu.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
 
Old 07-10-2010, 06:29 AM   #11
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 242

Rep: Reputation: 86
Quote:
Originally Posted by zlin50 View Post
Porblem still not solved.
Any suggestions from the group?
I have a general solution, not just for your case but for all those cases where there are some problems in making a 32-bit build on a multilib system. Just build openmotif on a 32-bit system! For example, use chroot to run a 32-bit userspace under your 64-bit slackware just to build that package.

First, select a directory to install the 32-bit slackware, e.g. /home/yourname/slack32_13.1

Then put the 32-bit packages somewhere, for example /tmp/source (directories a, ap etc are in there)

Then, as root:
Code:
# make dir for new OS
mkdir /home/yourname/slack32_13.1
# install the basic packages from 'a'
installpkg --root /home/yourname/slack32_13.1 /tmp/source/a/*.t?z
# make the package tree visible also inside the new OS
mkdir /home/yourname/slack32_13.1/source
mount --bind /tmp/source /home/yourname/slack32_13.1/source
# go to the new basic 32-bit system
linux32 chroot /home/yourname/slack32_13.1 su - root
# now we are in the new OS. install "a" again, and all others
installpkg /source/{a,ap,d,e,kde,l,n,t,tcl,x,xap,y}/*.t?z
exit
# now we are back in the parent system. clean up
umount /home/yourname/slack32_13.1/source
rmdir /home/yourname/slack32_13.1/source
Now you can go to the 32-bit system and back. For example:

Code:
# in the 64-bit parent os
cp openmotif-2.3.2.tar.gz openmotif.SlackBuild slack-desc /home/yourname/slack32_13.1/tmp
su -c 'linux32 chroot /home/yourname/slack32_13.1 su - root'
# in the 32-bit OS now
removepkg lesstif
cd /tmp
sh openmotif.SlackBuild
exit
# now back in the 64-bit OS
cp /home/yourname/slack32_13.1/tmp/openmotif-2.3.2-i486-1alien.tgz .
# use convertpkg next if needed

Last edited by Petri Kaukasoina; 07-10-2010 at 11:52 AM. Reason: Added "removepkg lesstif", c.f. Alien Bob's message #3
 
1 members found this post helpful.
Old 07-10-2010, 07:04 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,169

Rep: Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645Reputation: 2645
I just got another thought ...
QUOTE :
Code:
/usr/lib64/libXmu.so /usr/lib64/libXt.so /usr/lib64/libXext.so /usr/lib64/libXp.so -lz -L/usr/lib /usr/lib64/libXft.so /usr/lib64/libXrender.so /usr/lib64/libfontconfig.so /usr/lib64/libfreetype.so /usr/lib64/libX11.so /usr/lib64/libjpeg.so /usr/lib64/libpng14.so
Obviously the Makefile is using /usr/lib64/lib***
How about changing the LD_LIBRARY_PATH
before you run 'configure' :
( I guess, the problem is, that you have /usr/lib64/ first in the path.)

export LD_LIBRARY_PATH=/lib32:/usr/lib32 etc. etc.
( I don't know actual names, multilib. "/usr/lib" ? ).

Or may be :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib32:/usr/lib32 ...
..

Last edited by knudfl; 07-10-2010 at 07:07 AM.
 
0 members found this post helpful.
Old 07-13-2010, 04:05 PM   #13
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Original Poster
Rep: Reputation: 15
@Petri Kaukasoina:

Hi Petri,

your post doesn't answer my question, but solves my problem!

Thanks a lot for your tutorial!

Just a hint for the archive: in the sequence above
Quote:
removepkg lesstif
should read
Quote:
removepkg lesstif-0.95.2-1
Won't mark as "solved", because an answer to the original question would be still interesting.
 
Old 07-14-2010, 01:10 AM   #14
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 242

Rep: Reputation: 86
"removepkg lesstif" should work. See "man removepkg".
 
Old 07-14-2010, 06:46 PM   #15
zlin50
LQ Newbie
 
Registered: Jan 2006
Distribution: slackware-10.2
Posts: 24

Original Poster
Rep: Reputation: 15
yes, you're right
 
  


Reply

Tags
multilib, openmotif


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
Help!!! have you worked with Openmotif PeterUK Linux - Software 3 06-30-2009 09:17 PM
Where did openmotif go? Gault LaRue Slackware 2 08-01-2007 03:24 PM
OPENMOTIF version ptreves Linux - Newbie 4 12-14-2004 09:45 PM
Openmotif installation svar Linux - General 0 08-06-2004 01:31 PM
problems compiling openmotif, was someone able to? schatoor Linux - Software 0 02-09-2004 08:11 AM


All times are GMT -5. The time now is 04:44 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