In trying to "make so" the linking fails. I changed the link line for the last step and got it to work: diff soobj/ldt.tr soobj/foo.tr 1c1 < gcc -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.71 ./obj/../soobj/gsromfs1.o ./obj/../soobj/gs.o ./obj/../soobj/gp_getnv.o \ --- > gld -shared -soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.71 ./obj/../soobj/gsromfs1.o ./obj/../soobj/gs.o ./obj/../soobj/gp_getnv.o \ -KB
(In reply to comment #0) > In trying to "make so" the linking fails. > > I changed the link line for the last step and got it to work: > > diff soobj/ldt.tr soobj/foo.tr > 1c1 > < gcc -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.71 > ./obj/../soobj/gsromfs1.o ./obj/../soobj/gs.o ./obj/../soobj/gp_getnv.o \ > --- > > gld -shared -soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.71 ./obj/../soobj/gsromfs1.o ./obj/../soobj/gs.o ./obj/../soobj/gp_getnv.o \ Those two are equivalent if your gcc is built to use GNU ld. I suspect that your gcc was built against the Sun linker, rather than GNU ld, so I would like the output of your "gcc -v". Note that you have to do "./configure --enable-dynamic" for "make so" to work at all. (this was an oversight in the documentation and has been corrected recently.)
hero@thmaster:~$ gcc -v Using built-in specs. Target: i386-pc-solaris2.11 Configured with: ./configure --prefix=/usr/sfw2 --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-shared Thread model: posix gcc version 4.3.4 (GCC)
When I ./configure with ./configure --enable-dynamic I get the same results.
Your gcc is not using GNU ld (from the -v), so your gld thing was using a different linker than gcc uses. Can you give the middle part of this patch ( bug 686865) http://bugs.ghostscript.com/attachment.cgi?id=469 a try? Just the middle part - the other parts won't apply any more and irrelevant. i.e. change in base/unix-dll.mak -shared -Wl,-soname= to -Bdynamic -Wl,-so ? we have some unreviewed/unincoporated patch from a knowledgeable SUN engineer (bug 689490) - do you also want to give that a try and maybe update them if the above doesn't work?
With the change below, 'make so' builds sobin/libgs.so.8.71 hero@thmaster:~/ghostscript-8.71$ diff ./base/unix-dll.mak base/unix-dll.mak~ 52c52 < LDFLAGS_SO=-Bdynamic -Wl,-so$(GS_SONAME_MAJOR) --- > LDFLAGS_SO=-shared -Wl,-soname=$(GS_SONAME_MAJOR)
I believe this now works correctly. If not, please reopen.