* Editing the egcs spec file instead of e.g. /etc/ld.so.conf
[not found] <0FBY006302JECQ@mailbox.slac.stanford.edu>
@ 1999-05-18 16:09 ` Matthew D. Langston
1999-05-18 17:19 ` Alexandre Oliva
1999-05-31 21:36 ` Matthew D. Langston
0 siblings, 2 replies; 4+ messages in thread
From: Matthew D. Langston @ 1999-05-18 16:09 UTC (permalink / raw)
To: egcs
Hello all,
We have a single, central installation of egcs that is used by all of
the computers at our site. However, we install egcs in a "nonstandard"
directory such that the shared stdc++ library isn't in the dynamic
loader's search path. Consequently, when users link their C++ programs
to use the shared stdc++ library, their programs fail to run because the
dynamic loader can't find the shared stdc++ library.
It is too much for some of our users to pass --rpath flags to g++, or to
set environment variables (e.g. LD_LIBRARY_PATH) for the dynamic loader.
It is too much for us (the egcs maintainers at our site) to go around
and edit `/etc/ld.so.conf' (or the equivalent file) on every machine.
The solution that occurred to us was that perhaps we could edit the egcs
spec file so that the proper flags are passed to the linker.
If anyone has done this, might you send us the relevant portion of your
egcs spec file? Or, if this is a horrible abuse of the egcs spec file,
then could someone tell us the proper way to solve this problem?
Thank you.
--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Editing the egcs spec file instead of e.g. /etc/ld.so.conf
1999-05-18 16:09 ` Editing the egcs spec file instead of e.g. /etc/ld.so.conf Matthew D. Langston
@ 1999-05-18 17:19 ` Alexandre Oliva
1999-05-31 21:36 ` Alexandre Oliva
1999-05-31 21:36 ` Matthew D. Langston
1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Oliva @ 1999-05-18 17:19 UTC (permalink / raw)
To: Matthew D. Langston; +Cc: egcs
On May 18, 1999, "Matthew D. Langston" <langston@SLAC.Stanford.EDU> wrote:
> The solution that occurred to us was that perhaps we could edit the egcs
> spec file so that the proper flags are passed to the linker.
You can do that in either the *link or *lib spec, just add `-rpath
/the/appropriate/dir' and it will work. Note, however, that this
means the specified directory will be searched before LD_LIBRARY_PATH,
so there's (almost) no way to override it in case you change your
mind.
> if this is a horrible abuse of the egcs spec file, then could
> someone tell us the proper way to solve this problem?
The solution I have adopted is to hard-code the full pathname of the
library as its soname. You just have to change libstdc++/config/*.ml
and insert /path/to/lib/ before $(SHLIB). Although this won't let
LD_LIBRARY_PATH override the location of libstdc++.so, that directory
won't be searched at run-time for other libraries and LD_LIBRARY_PATH
will work as usually. The bad side-effect is that you must install
*before* make check, otherwise tests will fail.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
^ permalink raw reply [flat|nested] 4+ messages in thread
* Editing the egcs spec file instead of e.g. /etc/ld.so.conf
1999-05-18 16:09 ` Editing the egcs spec file instead of e.g. /etc/ld.so.conf Matthew D. Langston
1999-05-18 17:19 ` Alexandre Oliva
@ 1999-05-31 21:36 ` Matthew D. Langston
1 sibling, 0 replies; 4+ messages in thread
From: Matthew D. Langston @ 1999-05-31 21:36 UTC (permalink / raw)
To: egcs
Hello all,
We have a single, central installation of egcs that is used by all of
the computers at our site. However, we install egcs in a "nonstandard"
directory such that the shared stdc++ library isn't in the dynamic
loader's search path. Consequently, when users link their C++ programs
to use the shared stdc++ library, their programs fail to run because the
dynamic loader can't find the shared stdc++ library.
It is too much for some of our users to pass --rpath flags to g++, or to
set environment variables (e.g. LD_LIBRARY_PATH) for the dynamic loader.
It is too much for us (the egcs maintainers at our site) to go around
and edit `/etc/ld.so.conf' (or the equivalent file) on every machine.
The solution that occurred to us was that perhaps we could edit the egcs
spec file so that the proper flags are passed to the linker.
If anyone has done this, might you send us the relevant portion of your
egcs spec file? Or, if this is a horrible abuse of the egcs spec file,
then could someone tell us the proper way to solve this problem?
Thank you.
--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Editing the egcs spec file instead of e.g. /etc/ld.so.conf
1999-05-18 17:19 ` Alexandre Oliva
@ 1999-05-31 21:36 ` Alexandre Oliva
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Oliva @ 1999-05-31 21:36 UTC (permalink / raw)
To: Matthew D. Langston; +Cc: egcs
On May 18, 1999, "Matthew D. Langston" <langston@SLAC.Stanford.EDU> wrote:
> The solution that occurred to us was that perhaps we could edit the egcs
> spec file so that the proper flags are passed to the linker.
You can do that in either the *link or *lib spec, just add `-rpath
/the/appropriate/dir' and it will work. Note, however, that this
means the specified directory will be searched before LD_LIBRARY_PATH,
so there's (almost) no way to override it in case you change your
mind.
> if this is a horrible abuse of the egcs spec file, then could
> someone tell us the proper way to solve this problem?
The solution I have adopted is to hard-code the full pathname of the
library as its soname. You just have to change libstdc++/config/*.ml
and insert /path/to/lib/ before $(SHLIB). Although this won't let
LD_LIBRARY_PATH override the location of libstdc++.so, that directory
won't be searched at run-time for other libraries and LD_LIBRARY_PATH
will work as usually. The bad side-effect is that you must install
*before* make check, otherwise tests will fail.
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
{oliva,Alexandre.Oliva}@dcc.unicamp.br aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-05-31 21:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <0FBY006302JECQ@mailbox.slac.stanford.edu>
1999-05-18 16:09 ` Editing the egcs spec file instead of e.g. /etc/ld.so.conf Matthew D. Langston
1999-05-18 17:19 ` Alexandre Oliva
1999-05-31 21:36 ` Alexandre Oliva
1999-05-31 21:36 ` Matthew D. Langston
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).