Jon LaBadie wrote:
That sounds like a shared library is seen at compile-time
but not at run-time. The "link error" you note (without the
--disable-shared option) is probably the run-time "dynamic
linker" not finding the library that the compiler did find.
There was no error at run time .. only a core dump. On my systeme there
was the ldd commande and when i use it on the executable it says it
found all the libs.
I have lauch gdb on the exe and in fact on the line 92 of the file
amandates.c it calls the function amroflock :
rc = amroflock(fileno(amdf), "amandates");
This function amroflock is in the file amflock.c between the line 319
and 314, or the call (trace with gdb) falls at the line 398, which is
the last line of the function amfunlock ...
I have try the operation whit gcc and with ibm compilator .. the two
give the same error.
Here is the result of an execution :
bash-2.04# pwd
/opt-net/amanda/AIX/libexec
bash-2.04# ldd sendsize
/opt-net/amanda/AIX/lib/libamclient.a(libamclient-2.4.4p1.so)
/usr/lib/libintl.a(shr.o)
/opt-net/amanda/AIX/lib/libamanda.a(libamanda-2.4.4p1.so)
/usr/lib/libc.a(pse.o)
/usr/lib/libtli.a(shr.o)
/usr/lib/libpthreads.a(shr.o)
/usr/lib/libpthreads_compat.a(shr.o)
/usr/lib/libnsl.a(shr.o)
/usr/lib/libpthreads.a(shr_xpg5.o)
/usr/lib/libpthreads.a(shr_comm.o)
sendsize
/usr/lib/libcrypt.a(shr.o)
/usr/lib/libc.a(shr.o)
bash-2.04# ./sendsize
Segmentation fault (core dumped)
bash-2.04# gdb ./sendsize
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-ibm-aix4.3.2.0"...
(gdb) run
Starting program: /opt-net/amanda/AIX/libexec/./sendsize
Program received signal SIGSEGV, Segmentation fault.
0xd0dee728 in amroflock () at
/projets/adminsys/src/amanda-2.4.4p1/common-src/amflock.c:398
398 }
(gdb) bt
#0 0xd0dee728 in amroflock () at
/projets/adminsys/src/amanda-2.4.4p1/common-src/amflock.c:398
#1 0xd0dece4c in start_amandates (open_readwrite=0)
at /projets/adminsys/src/amanda-2.4.4p1/client-src/amandates.c:92
#2 0x10003940 in main (argc=1, argv=0x2ff22ba8)
at /projets/adminsys/src/amanda-2.4.4p1/client-src/sendsize.c:159
#3 0x100001dc in __start ()
(gdb) quit
The program is running. Exit anyway? (y or n) y
bash-2.04#
[snip]
regards
Fabrice
|