M
Martin Maciaszek
First I must say I was very surprised that Ruby has some configure
options that aid building fat binaries on NS/OS. And it really
works... at least for completely statically linked builds. Trying to
build a ruby with --enable-shared has some problems. Some of them I
could fix pretty easily others still leave me stranded.
1. In the Makefile that configure generates LDSHARED is not set which
leads to an error when trying to build a shared libruby. This one is
trivial. It obviously should be set to "libtool -dynamic". The NeXT
documentation states that the object files should be compiled with
-dynamic too. I'm not sure if this is really needed but I added
-dynamic to CFLAGS too.
2. DLDFLAGS contains "$(EXTLDFLAGS) -arch m68k -arch i386 -arch
sparc". libtool(1) doesn't accecpt any -arch parameters. These
obviously don't belong in here
3. LIBRUBY_SO and LIBRUBY_ALIASES assume that shared libraries are
called $SOMETHING.so. This is true on most Unices but not on NS/OS.
Shared libraries have the .dylib file extension on NS/OS.
4. When it comes to linking everything together into libruby I get a
line like this:
libtool -dynamic array.o [...] vsnprintf.o dmyext.o -o
libruby.1.8.1.dylib
This results in a lot of unresolved symbols which can be mostly fixed
by adding /lib/libsys_s.dylib after dmyext.o. I said mostly because it
still leaves me with 1 unresolved symbol: __environ. nm(1) confirms
that __environ is an unresolved symbol in /lib/libsys_s.dylib.
Maybe somebody with more experience with NS/OS than me (which I use
for about 1 month now) can point me to a solution. As for the other
problems I hope that somebody with some knowledge with GNU
autoconf/automake will find my descriptions useful to fix the
described problems.
Cheers
Martin
options that aid building fat binaries on NS/OS. And it really
works... at least for completely statically linked builds. Trying to
build a ruby with --enable-shared has some problems. Some of them I
could fix pretty easily others still leave me stranded.
1. In the Makefile that configure generates LDSHARED is not set which
leads to an error when trying to build a shared libruby. This one is
trivial. It obviously should be set to "libtool -dynamic". The NeXT
documentation states that the object files should be compiled with
-dynamic too. I'm not sure if this is really needed but I added
-dynamic to CFLAGS too.
2. DLDFLAGS contains "$(EXTLDFLAGS) -arch m68k -arch i386 -arch
sparc". libtool(1) doesn't accecpt any -arch parameters. These
obviously don't belong in here
3. LIBRUBY_SO and LIBRUBY_ALIASES assume that shared libraries are
called $SOMETHING.so. This is true on most Unices but not on NS/OS.
Shared libraries have the .dylib file extension on NS/OS.
4. When it comes to linking everything together into libruby I get a
line like this:
libtool -dynamic array.o [...] vsnprintf.o dmyext.o -o
libruby.1.8.1.dylib
This results in a lot of unresolved symbols which can be mostly fixed
by adding /lib/libsys_s.dylib after dmyext.o. I said mostly because it
still leaves me with 1 unresolved symbol: __environ. nm(1) confirms
that __environ is an unresolved symbol in /lib/libsys_s.dylib.
Maybe somebody with more experience with NS/OS than me (which I use
for about 1 month now) can point me to a solution. As for the other
problems I hope that somebody with some knowledge with GNU
autoconf/automake will find my descriptions useful to fix the
described problems.
Cheers
Martin