Submitted by DavidBBB on Thu, 02/21/2008 - 18:23.
Hi,
I tried to install openmotif-2.2.2 on a fedora 8. I downloaded the source tar and installed with make. Everything was fine execpt the demos but a guess that's because I used the configure and make instead of iMakefile.
I have a link to the libXm library (see below) but the code I compiled that uses this library cannot open it ...
the link to the library:
[david@localhost lib]$ pwd<br />
/usr/X11R6/lib<br />
[david@localhost lib]$ ls -la<br />
total 23276<br />
drwxr-xr-x 3 root root 4096 2008-02-21 18:18 .<br />
drwxr-xr-x 7 root root 4096 2008-02-21 17:15 ..<br />
-rw-r--r-- 1 root root 1052704 2008-02-21 18:18 libMrm.a<br />
-rwxr-xr-x 1 root root 762 2008-02-21 18:18 libMrm.la<br />
lrwxrwxrwx 1 root root 15 2008-02-21 18:18 libMrm.so -> libMrm.so.3.0.1<br />
lrwxrwxrwx 1 root root 15 2008-02-21 18:18 libMrm.so.3 -> libMrm.so.3.0.1<br />
-rwxr-xr-x 1 root root 679149 2008-02-21 18:18 libMrm.so.3.0.1<br />
-rw-r--r-- 1 root root 971770 2008-02-21 18:18 libUil.a<br />
-rwxr-xr-x 1 root root 787 2008-02-21 18:18 libUil.la<br />
lrwxrwxrwx 1 root root 15 2008-02-21 18:18 libUil.so -> libUil.so.3.0.1<br />
lrwxrwxrwx 1 root root 15 2008-02-21 18:18 libUil.so.3 -> libUil.so.3.0.1<br />
-rwxr-xr-x 1 root root 740884 2008-02-21 18:18 libUil.so.3.0.1<br />
-rw-r--r-- 1 root root 12068432 2008-02-21 18:18 libXm.a<br />
-rwxr-xr-x 1 root root 731 2008-02-21 18:18 libXm.la<br />
lrwxrwxrwx 1 root root 14 2008-02-21 18:18 libXm.so -> libXm.so.3.0.1<br />
lrwxrwxrwx 1 root root 14 2008-02-21 18:18 libXm.so.3 -> libXm.so.3.0.1<br />
-rwxr-xr-x 1 root root 8165930 2008-02-21 18:18 libXm.so.3.0.1<br />
drwxr-xr-x 3 root root 4096 2008-02-21 18:18 X11<br />
[david@localhost lib]$ </p>
<p>
the makefile for my code:
# Makefile for the xadeli program<br />
# DB 21-02-2008<br />
CC=gcc</p>
<p>CFLAGS= -g -I/usr/X11R6/include -I/usr/include<br />
CLIBS = -L/usr/X11R6/lib -lm -lXm -lX11 -lXt</p>
<p>OBJS= main.o Create_zone.o affi_zone.o generate_GMT.o \<br />
input_zone.o load_pfile.o param_axes.o param_time_steps.o \<br />
param_add_zone.o param_ploted_values.o param_highlight.o \<br />
paramGrille.o</p>
<p>xadeli: $(OBJS)<br />
$(CC) $(CFLAGS) $(CLIBS) -o ../bin/xadeli2d $(OBJS)</p>
<p>main.o: main.c xadeli.h<br />
$(CC) $(CFLAGS) -c main.c</p>
<p>Create_zone.o: Create_zone.c xadeli.h<br />
$(CC) $(CFLAGS) -c Create_zone.c</p>
<p>affi_zone.o: affi_zone.c xadeli.h<br />
$(CC) $(CFLAGS) -c affi_zone.c</p>
<p>generate_GMT.o: generate_GMT.c xadeli.h<br />
$(CC) $(CFLAGS) -c generate_GMT.c</p>
<p>input_zone.o: input_zone.c xadeli.h<br />
$(CC) $(CFLAGS) -c input_zone.c</p>
<p>load_pfile.o: load_pfile.c xadeli.h<br />
$(CC) $(CFLAGS) -c load_pfile.c</p>
<p>param_axes.o: param_axes.c xadeli.h<br />
$(CC) $(CFLAGS) -c param_axes.c</p>
<p>param_time_steps.o: param_time_steps.c xadeli.h<br />
$(CC) $(CFLAGS) -c param_time_steps.c</p>
<p>param_add_zone.o: param_add_zone.c xadeli.h<br />
$(CC) $(CFLAGS) -c param_add_zone.c</p>
<p>param_ploted_values.o: param_ploted_values.c xadeli.h<br />
$(CC) $(CFLAGS) -c param_ploted_values.c</p>
<p>param_highlight.o: param_highlight.c xadeli.h<br />
$(CC) $(CFLAGS) -c param_highlight.c</p>
<p>paramGrille.o: paramGrille.c xadeli.h<br />
$(CC) $(CFLAGS) -c paramGrille.c
The compilation works with some warnings but it works. However when I try to execute i have:
<br />
[david@localhost bin]$ pwd<br />
/home/david/ADELI/3p4/bin<br />
[david@localhost bin]$ ./xadeli2d<br />
./xadeli2d: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory<br />
[david@localhost bin]$
I don't understand this message since I have a link from libXm.so.3 to the libray libXm.so.3.0.1
Did I screw up in the makefile? I must say that I am new to making or modifying makefiles so this could be a stupid mistake.
Thanks,
david
It is OK that you use configure and make instead of imake, since imake isn't supported anymore. Did you run 'ldconfig' after 'make install'?
No I did not. As I said I am pretty much a newby. I do make and make install but if it does not work I am kinda lost....I will man ldconf. thanks for the tip.
ldconfig is only necessary if you compiled your application immediately after installing Motif. If you reboot your computer, your library cache will be recreated on loading, so you do not need ldconfig.
If you have problems with loading libraries, you can try
ldd your_application
it will tell you which libraries it uses, where it takes them from, and which it does not find.