libtool install problem (okay before install, seg faults after) 
Author Message
 libtool install problem (okay before install, seg faults after)

For some reason, when I create an executable with libtool, it runs
fine if it is not installed, but seg faults when it is installed.
Linking problem?

During make it does:

gcc -g -O2 -I.. -I../config -I/usr/X11R6/include -I../panacea
-I../scheme -I../ppc -I../pml -I../pdb -I../pgs -I../score -o .libs/sx
sxmain.o  -L/home/smethell/src/repository/src/sx
-L/home/smethell/src/repository/src/panacea
-L/home/smethell/src/repository/src/pgs -L/usr/X11R6/lib
-L/home/smethell/src/repository/src/scheme
-L/home/smethell/src/repository/src/ppc
-L/home/smethell/src/repository/src/pdb
-L/home/smethell/src/repository/src/pml
-L/home/smethell/src/repository/src/score
/home/smethell/src/repository/src/sx/.libs/libsx.so
/home/smethell/src/repository/src/panacea/.libs/libpanacea.so
/home/smethell/src/repository/src/pgs/.libs/libpgs.so -lX11
/usr/lib/libjpeg.so /home/smethell/src/repository/src/scheme/.libs/libscheme.so
/home/smethell/src/repository/src/ppc/.libs/libppc.so
/home/smethell/src/repository/src/pdb/.libs/libpdb.so
/home/smethell/src/repository/src/pml/.libs/libpml.so
/home/smethell/src/repository/src/score/.libs/libscore.so -lm -lc
-L/home/smethell/src/repository/src/sx/spokes/ascii
/home/smethell/src/repository/src/sx/spokes/ascii/.libs/libtrascii.so
-L/home/smethell/src/repository/src/sx/spokes/nacf
/home/smethell/src/repository/src/sx/spokes/nacf/.libs/libtrnacf.so
-L/home/smethell/src/repository/src/sx/spokes/hdf5
/home/smethell/src/repository/src/sx/spokes/hdf5/.libs/libtrhdf5.so
-Wl,--rpath -Wl,/home/smethell/tmp/linux/lib
creating sx

If I run ./sx (the shell script libtool leaves you with) it runs just
fine (it creates .libs/lt-sx and that executes as it should). However
when I make install and run it, sx will seg fault.

[prompt]$ ./sx $ARGS
<output>proper output here</output>
[prompt]$ make install
<snip>
 /bin/sh ../libtool  --mode=install /usr/bin/install -c  sx
/home/smethell/tmp/linux/bin/sx/usr/bin/install -c .libs/sx
/home/smethell/tmp/linux/bin/sx
[prompt]$ which sx
/home/smethell/tmp/linux/bin/sx
[prompt]$ /home/smethell/tmp/linux/bin/sx $ARGS
Segmentation fault
[prompt]$

Here's what ldd gives me for both

[prompt]$ ldd .libs/sx
        libsx.so.0 => /home/smethell/tmp/linux/lib/libsx.so.0
(0x40018000)
        libpanacea.so.0 =>
/home/smethell/tmp/linux/lib/libpanacea.so.0 (0x40066000)
        libpgs.so.0 => /home/smethell/tmp/linux/lib/libpgs.so.0
(0x4008c000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40230000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x4030e000)
        libscheme.so.0 => /home/smethell/tmp/linux/lib/libscheme.so.0
(0x4032d000)
        libppc.so.0 => /home/smethell/tmp/linux/lib/libppc.so.0
(0x403c1000)
        libpdb.so.0 => /home/smethell/tmp/linux/lib/libpdb.so.0
(0x403c8000)
        libpml.so.0 => /home/smethell/tmp/linux/lib/libpml.so.0
(0x403fb000)
        libscore.so.0 => /home/smethell/tmp/linux/lib/libscore.so.0
(0x40421000)
        libm.so.6 => /lib/i686/libm.so.6 (0x40454000)
        libc.so.6 => /lib/i686/libc.so.6 (0x40477000)
        libtrascii.so.0 =>
/home/smethell/tmp/linux/lib/libtrascii.so.0 (0x405b3000)
        libtrnacf.so.0 => /home/smethell/tmp/linux/lib/libtrnacf.so.0
(0x405b7000)
        libtrhdf5.so.0 => /home/smethell/tmp/linux/lib/libtrhdf5.so.0
(0x405bc000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[prompt]$ ldd .libs/lt-sx
        libsx.so.0 =>
/home/smethell/src/repository/src/sx/.libs/libsx.so.0 (0x40018000)
        libpanacea.so.0 =>
/home/smethell/src/repository/src/panacea/.libs/libpanacea.so.0
(0x40066000)
        libpgs.so.0 =>
/home/smethell/src/repository/src/pgs/.libs/libpgs.so.0 (0x4008c000)  
     libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401e6000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x402c4000)
        libscheme.so.0 =>
/home/smethell/src/repository/src/scheme/.libs/libscheme.so.0
(0x402e3000)
        libppc.so.0 =>
/home/smethell/src/repository/src/ppc/.libs/libppc.so.0 (0x4032c000)  
     libpdb.so.0 => /home/smethell/src/repository/src/pdb/.libs/libpdb.so.0
(0x40333000)        libpml.so.0 =>
/home/smethell/src/repository/src/pml/.libs/libpml.so.0 (0x40366000)  
     libscore.so.0 =>
/home/smethell/src/repository/src/score/.libs/libscore.so.0
(0x4038c000)
        libm.so.6 => /lib/i686/libm.so.6 (0x403c0000)
        libc.so.6 => /lib/i686/libc.so.6 (0x403e3000)
        libtrascii.so.0 =>
/home/smethell/src/repository/src/sx/spokes/ascii/.libs/libtrascii.so.0
(0x4051e000)
        libtrnacf.so.0 =>
/home/smethell/src/repository/src/sx/spokes/nacf/.libs/libtrnacf.so.0
(0x40522000)
        libtrhdf5.so.0 =>
/home/smethell/src/repository/src/sx/spokes/hdf5/.libs/libtrhdf5.so.0
(0x40527000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[prompt]$

Has anyone ever had this happen before? Is this too little info? What
might important to look at? Thanks for your time.

Greg



Tue, 22 Mar 2005 08:14:41 GMT  
 libtool install problem (okay before install, seg faults after)

Quote:

> For some reason, when I create an executable with libtool, it runs
> fine if it is not installed, but seg faults when it is installed.
> Linking problem?

[snip]

I have searched your long post for *any* relevance to the ISO standard C
  *language* -- having found none, please take your question to the
appropriate forum:


...and read the FAQ for this group before posting here again!

HTH,
--ag

--
Artie Gold -- Austin, Texas



Tue, 22 Mar 2005 09:26:45 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MSDEV caused an invalid page fault in Module SSSCC.DLL After Install SP2

2. Postgres and C seg fault problem

3. Install project, set registry value with install directory?

4. problem: seg fault due to very large array?

5. I have InterDev 6.0 installed and want to install my MSVC++ 5.0 too, is

6. How to install System Wide Hooks, Sample code included working for installing app

7. Exemple on how to Install an MFC app with Install Shield for Visual C++ 6.0

8. Install new font with Install Shield

9. priority queue causing seg fault

10. seg fault ;(

11. Stacktrace on seg fault

12. seg fault

 

 
Powered by phpBB® Forum Software