[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: debugging guile test failure and segfault.
From: |
Greg Troxel |
Subject: |
Re: debugging guile test failure and segfault. |
Date: |
Sun, 10 Jun 2007 13:46:42 -0400 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/21.4 (berkeley-unix) |
address@hidden (Ludovic Courtès) writes:
>> --- guile-config/guile-config.in.orig 2006-09-20 00:19:02.000000000 +0000
>> +++ guile-config/guile-config.in
>> @@ -155,7 +155,7 @@
>> (if (or (string=? libdir "/usr/lib")
>> (string=? libdir "/usr/lib/"))
>> ""
>> - (string-append "-L" (get-build-info 'libdir)))
>> + (string-append "-Wl,-R" (get-build-info 'libdir) "
>> -L" (get-build-info 'libdir)))
>> (string-join other-flags)
>>
>> )))
>
> Can you explain why this is needed? `guile-config' is only used by
> applications that link against Guile. Did you have troubles compiling
> such applications?
Sorry if this is stuff everyone knows, but..
There are several ways that programs find shared libraries at runtime.
Some of my info is old, so sorry if I am incorrect:
debian way: -rpath is evil. all libs are in /usr/lib, or use ld.so.conf
or ldconfig of some kind
netbsd way: by default, /usr and /usr/lib are searched. ldconfig is
messy and LD_LIBRARY_PATH is a gross hack for other than debugging.
Programs should be compiled with -R for directories that are to be
searched at runtime. In particular, /usr/local/lib and /usr/pkg/lib are
not in the default library search path.
darwin way: absolute path is resolved at link time, and stored, so you
get the same library you linked with (not quite sure on this).
> Besides, `-Wl,-R' can probably not be considered portable.
Probably you are right. But not having a way to include some sort of
rpath when needed isn't portable either.
My view is that the right answer from a portability viewpoint is to be
aware of the rpath issue and to detect at configure time what the local
rules are and then follow them.
So probably --enable-rpath at configure should subsistute #t for
@WANT_RPATH@ (instead of #f without) and the code above could be
conditional.
I've had to do similar things on various bits of guile over the years.
- Re: debugging guile test failure and segfault., (continued)
- Re: debugging guile test failure and segfault., Dan McMahill, 2007/06/09
- Re: debugging guile test failure and segfault., Ludovic Courtès, 2007/06/10
- Re: debugging guile test failure and segfault., Dan McMahill, 2007/06/10
- Re: debugging guile test failure and segfault., Ludovic Courtès, 2007/06/11
- Re: debugging guile test failure and segfault., Greg Troxel, 2007/06/12
- Re: debugging guile test failure and segfault., Ludovic Courtès, 2007/06/12
- Re: debugging guile test failure and segfault., Greg Troxel, 2007/06/13
- Re: debugging guile test failure and segfault., Greg Troxel, 2007/06/13
- Re: debugging guile test failure and segfault., Ludovic Courtès, 2007/06/13
- Re: debugging guile test failure and segfault.,
Greg Troxel <=
- Re: debugging guile test failure and segfault., Andy Wingo, 2007/06/13
Re: debugging guile test failure and segfault., dsmich, 2007/06/13