-   Slackware (
-   -   compiling openmotif on Slackware 13.1 (

zlin50 07-01-2010 12:52 PM

compiling openmotif on Slackware 13.1

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

I used Eric's Slackbuild from 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/

linking stops with error-message

/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,

fskmh 07-01-2010 07:49 PM

On a side note, isn't compiling openmotif with libdir=/usr/lib{64} going to clobber the lesstif static libraries?

Alien Bob 07-02-2010 01:59 AM


Originally Posted by fskmh (Post 4021152)
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.


knudfl 07-02-2010 06:58 AM


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/*

zlin50 07-02-2010 10:52 AM

Thanks for all the answers.

First, the side node: I didn't install lesstif, but only (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/" to choose the correct (32bit) linker. Did I forget something?

knudfl 07-03-2010 06:39 AM


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 ?

zlin50 07-03-2010 06:57 AM

maybe, Eric can help?

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!

knudfl 07-03-2010 10:33 AM

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.

zlin50 07-05-2010 12:31 PM

Porblem still not solved.
Any suggestions from the group?

zlin50 07-09-2010 04:16 PM

made another test and downgraded to 2.3.2:

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


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/ /usr/lib64/ /usr/lib64/ /usr/lib64/ -lz -L/usr/lib /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ -Wl,-soname -Wl, -o .libs/
/usr/lib64/ could not read symbols: File in wrong format
collect2: ld returned 1 exit status

Petri Kaukasoina 07-10-2010 05:29 AM


Originally Posted by zlin50 (Post 4024428)
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:

# 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
# 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:


# 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
# 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

knudfl 07-10-2010 06:04 AM

I just got another thought ...

/usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ -lz -L/usr/lib /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/ /usr/lib64/
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 ...

zlin50 07-13-2010 03:05 PM

@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

removepkg lesstif
should read

removepkg lesstif-0.95.2-1
Won't mark as "solved", because an answer to the original question would be still interesting.

Petri Kaukasoina 07-14-2010 12:10 AM

"removepkg lesstif" should work. See "man removepkg".

zlin50 07-14-2010 05:46 PM

yes, you're right

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