[Mono-devel-list] Mono on Solaris x86

Jonathan Pryor jonpryor at vt.edu
Wed Mar 9 07:07:44 EST 2005

On Tue, 2005-03-08 at 07:00 -0600, Jonel Rienton wrote:
> Hi guys, I was doing another build of Mono 1.1.4 on a Solaris x86 box 
> when i got the following message:
> gcc -shared -Wl,-h -Wl,libMonoPosixHelper.so.0 -o 
> .libs/libMonoPosixHelper.so.0.1.0  .libs/map.o .libs/signal.o 
> .libs/stdio.o .libs/stdlib.o .libs/dirent.o .libs/errno.o .libs/fcntl.o 
> .libs/fstab.o .libs/grp.o .libs/macros.o .libs/old-map.o .libs/pwd.o 
> .libs/serial.o .libs/sys-mman.o .libs/sys-sendfile.o .libs/sys-stat.o 
> .libs/sys-statvfs.o .libs/sys-time.o .libs/sys-wait.o .libs/time.o 
> .libs/unistd.o .libs/utime.o .libs/x-struct-str.o .libs/zlib_macros.o  
> -R/opt/csw/lib -R/opt/csw/lib -L/opt/csw/lib 
> /opt/csw/lib/libgthread-2.0.so /opt/csw/lib/libglib-2.0.so 
> /opt/csw/lib/libintl.so /opt/csw/lib/libiconv.so -lz -lsocket -lnsl 
> -lxnet -lpthread -lm -lrt -lsunmath -lc
> Text relocation remains                         referenced
>      against symbol                  offset      in file
> _mph_copy_structure_strings         0x39        .libs/fstab.o
> _mph_copy_structure_strings         0x2c        .libs/pwd.o
> ld: fatal: relocations remain against allocatable but non-writable 
> sections
> collect2: ld returned 1 exit status
> gmake[2]: *** [libMonoPosixHelper.la] Error 1

That's my code, but I have *no* idea what that error message means.
_mph_copy_structure_strings() is defined in x-struct-str.c, and you're
linking in .libs/x-struct-str.o, so the function should be present.

The one possibility that comes to mind is that Solaris/x86+GCC doesn't
like __attribute__((visibility("hidden"))), which is applied to
_mph_copy_structure_strings so that external programs can't link against
it.  You might try editing support/mph.h and #defining MPH_INTERNAL to
nothing and rebuilding.

(Though that possibility would be weird because libMonoPosixHelper.so
compiles and links just fine under Solaris/sparc+GCC...)

 - Jon

More information about the Mono-devel-list mailing list