Peter Jeremy wrote:
On 2010-Feb-01 20:13:07 +0000, David Kirkby <[email protected]> wrote:
$ cc -flags

shows as options for the Sun compiler:


-R<dir[:dir]>                 Build runtime search path list into executable

Actually building a gcc which will search at a specified place seems
next to impossible on Solaris. The GCC developers will not add an
option which allows the location of the libraries to be hard-coded. It
is not a problem if you install in /usr/local,  That's a pain if you
don't have root access, or want to keep sepparate copies of gcc
around.

The generic way of specifying rpath (using gcc or Sun cc driver) with
the Sun linker is '-Wl,-R,dir:dir' Normally, the GNU linker (from
binutils) would use '-Wl,-rpath,dir:dir' but I'm not sure if the Sun
target changes this for Sun cc compatibility.

You should also be able to change the default specs file (what is
spat out by 'gcc -dumpspecs') to make gcc behave as desired.

Unfortunately, rpath is not a general solution for shared libraries
included in Sage because the paths would then be fixed at link time -
which wouldn't all the Sage package to be arbitrarily relocated.


No, but sage-env is run each time Sage is started. That prepends $SAGE_ROOT/local/lib to whatever the LD_LIBRARY_PATH is set to.

I do not consider using crle a viable option, though it would work.

drkir...@hawk:~$ crle

Default configuration file (/var/ld/ld.config) not found
  Platform:     32-bit LSB 80386
  Default Library Path (ELF):   /lib:/usr/lib  (system default)
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)
drkir...@hawk:~$ crle -64

Default configuration file (/var/ld/64/ld.config) not found
  Platform:     64-bit LSB AMD64
  Default Library Path (ELF):   /lib/64:/usr/lib/64  (system default)
  Trusted Directories (ELF):    /lib/secure/64:/usr/lib/secure/64  (system 
default)
drkir...@hawk:~$

Then nobody would be no need to set LD_LIBRAARY_PATH. But I consider that bad as it would force that directory to be searched, even if one did not wan them to be. At least LD_LIBRARY_PATH is under the control of the user.

I'll look at using the dumpspecs on 't2'. It's not clear to me where I would edit that though. The format of the file is not very obvious, and when I searched a few weeks ago for documentation on this file, there is very little.

dave

--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to