(dsssl) Re: openjade and opensp on Solaris gcc 2.95.2

Subject: (dsssl) Re: openjade and opensp on Solaris gcc 2.95.2
From: Robert Braddock <robert@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Nov 2001 14:42:58 -0600
In case anyone is still interested... (no, I don't check this list very

On Sat, June 23, 2001 1:37 PM, Joel Young wote:
> > Does anyone have experience building versions of openjade
> > and opensp on solaris that don't segfault on startup?
> > I have tried openjade-1.3, 1.4devel, opensp 1.4, opensp 1.5pre5.

On Sat, Jun 23, 2001 at 04:44:38PM +0200, Pieter Rijken wrote:
> After I compiled openjade and opensp using ONLY static libraries
> everything went OK.
> It seems that the segfault has to do with the way the shared
> libraries are used on solaris.

Yes, the problem is with the shared library building. You don't have to give
up shared libraries though, because you can patch the build to make them
correctly. Basically, you have to use Solaris binutils(specifically, ld)
with gcc (which, as I understand it, is "how you should do it anyway" so the
only thing is to get the build to do it right). If you apply this (hastilly
thrown together) patch to ltconfig in the top directory, you should be able
to build correctly (although, I haven't tried OpenJade, just OpenSP):

--- ltconfig-old	Fri Sep 29 12:29:01 2000
+++ ltconfig	Fri Feb  9 05:51:18 2001
@@ -1455,11 +1455,16 @@
     no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
+    if test "$with_gcc" = yes; then
+       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols |sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+                   $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+    else
     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
+    fi
     case "$host_os" in

This should be fixed in the tools that generate ltconfig at some point,
although I don't have any idea when or how long it will take to filter into
OpenJade/SP (that is, I thought it would be by now, but it isn't).

Robert Braddock

 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread