Bug 689759 - Compiling gsc and gsx (compiling as a Shared Object)
Summary: Compiling gsc and gsx (compiling as a Shared Object)
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 8.62
Hardware: PC Solaris
: P4 enhancement
Assignee: Chris Liddell (chrisl)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-20 05:25 UTC by Jonathan Adams
Modified: 2013-11-07 01:38 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Adams 2008-03-20 05:25:56 UTC
Is it possible to have the default build for unix-dll.mak include in some way
-R$(libdir) for compiling gsx and gsc when compiling ghostscript as a shared
object, so that i don't have to modify the make file/teach users to use
LD_LIBRARY_PATH

also it'd be great during install to have all the scripts in the bin directory
so that the GS_EXECUTABLE=gsc ... :)
Comment 1 Ralph Giles 2008-03-26 10:16:43 UTC
In theory yes. GNU ld even accepts -R, but it's probably safer to make it
conditional. But I'd like to understand the motivation better. On linux, the
default libdir is /usr/local/lib, and it's normal to configure the runtime
linker to look there. Why don't you prefer this on Solaris?

Or do you mean -R$(SOBINDIR) for running uninstalled?
Comment 2 Jonathan Adams 2008-03-27 07:16:58 UTC
I never install anything in /usr/local ... if you look around you'll find a lot
of docs that point out that all 'optional' software is expected to be installed
in /opt, and that is the standard for solaris ... it also makes it a lot easier to
to work out what comes with the system as precompiled and what the operator user
has placed there.

in the case of ghostscript i install in /opt/gs<ver> and cd to /opt and 'ln -s
gs<ver> ghostscript' this allows me to have multiple installs of different
versions easier to test to see if the new version works whilst all users access
whichever version is currently linked to /opt/ghostscript.

Not sure that many people compile GS as a shared object on Solaris (in fact
since noone else seems to have noticed that the 8.6* version don't compile i'd
say that it's pretty few) but not having the full run path to the shared object
in the gsx and gsc makes the job quite a bit harder :)

I only suggested the inclusion of the '-R' path because i type it in myself
every time i come to compile gs so. I only suggested the '-R' rather than the
long '-W,--runpath=' or whatever because i generally only ever use -R, cos it
works :)

I may be wrong but since /usr/local/lib doesn't exist by default on solaris
boxes it may not be in the automatic search path, but having the runpath coded
in seems better for completeness.
Comment 3 Hin-Tak Leung 2010-05-02 03:12:41 UTC
Grabbing a Ralph's bugs.
Comment 4 Shailesh Mistry 2011-08-02 20:21:21 UTC
Enhancement still missing in Ghostscript 9.03
Comment 5 Jonathan Adams 2011-08-08 10:13:32 UTC
> Enhancement still missing in Ghostscript 9.03

This works on OpenSolaris ... but that might just be down to a newer version of GCC(In reply to comment #4)
Comment 6 Chris Liddell (chrisl) 2013-11-07 01:38:52 UTC
Generally, I recommend using LD_PRELOAD or equivalent.

Alternatively, XLDFLAGS on the make command line can be used to add custom linker arguments.