You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 7030 Reporter: Patrick Star Status: closed (set by @xavierleroy on 2017-02-16T14:14:42Z) Resolution: fixed Priority: normal Severity: minor Platform: sun4u OS: Solaris OS Version: 10 Version: 4.02.3 Target version: 4.03.0+dev / +beta1 Fixed in version: 4.03.0+dev / +beta1 Category: configure and build/install Monitored by:@gasche
Bug description
libasmrun_shared.so fails to build on Solaris/SPARC with the standard Makefile:
[squidward]user:~/src/ocaml-4.02.3/asmrun$ make
gcc -shared -o libasmrun_shared.so startup.pic.o main.pic.o fail.pic.o roots.pic.o globroots.pic.o signals.pic.o signals_asm.pic.o misc.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o extern.pic.o intern.pic.o hash.pic.o sys.pic.o parsing.pic.o gc_ctrl.pic.o terminfo.pic.o md5.pic.o obj.pic.o lexing.pic.o printexc.pic.o callback.pic.o weak.pic.o compact.pic.o finalise.pic.o custom.pic.o unix.pic.o backtrace.pic.o natdynlink.pic.o debugger.pic.o meta.pic.o dynlink.pic.o sparc.pic.o -fPIC -lnsl -lsocket -lm
Text relocation remains referenced
against symbol offset in file
L109 0x4 sparc.pic.o
caml_call_gc 0x8 sparc.pic.o
ld: fatal: relocations remain against allocatable but non-writable sections
make: *** [libasmrun_shared.so] Error 1
Steps to reproduce
Attempt to build ocaml on Solaris/SPARC, specifically
[squidward]user:~/src/ocaml-4.02.3/asmrun$ uname -a
SunOS squidward 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Blade-2500 Solaris
Additional information
Solution: Use ld -G, which is the proper way of producing shared objects on Solaris:
[squidward]user:/src/ocaml-4.02.3/asmrun$ ld -G -o libasmrun_shared.so startup.pic.o main.pic.o fail.pic.o roots.pic.o globroots.pic.o signals.pic.o signals_asm.pic.o misc.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o extern.pic.o intern.pic.o hash.pic.o sys.pic.o parsing.pic.o gc_ctrl.pic.o terminfo.pic.o md5.pic.o obj.pic.o lexing.pic.o printexc.pic.o callback.pic.o weak.pic.o compact.pic.o finalise.pic.o custom.pic.o unix.pic.o backtrace.pic.o natdynlink.pic.o debugger.pic.o meta.pic.o dynlink.pic.o sparc.pic.o -fPIC -lnsl -lsocket -lm
[squidward]user:/src/ocaml-4.02.3/asmrun$ file libasmrun_shared.so
libasmrun_shared.so: ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped, no debugging information available
Thanks for your feedback. The SPARC port of OCaml hasn't been maintained for several years, because we don't have access to a SPARC/Solaris machine, so it is no surprise that something is not right.
If you could prepare, test and submit a patch to the "configure" script that implements the workaround you describe, we'll very gladly accept it.
Patch (diff -u) uploaded. Just had to build a fresh source tree to make sure I hadn't changed anything else. Not much builds out of the box on Solaris/SPARC nowadays :P.
Thanks a lot for the patch, it's applied in commit [trunk 4bd9adb] and will be in the next OCaml release.
Pretty soon we'll have to decide whether to deprecate the SPARC/Solaris port or invest time (and probably some money too) securing access to a test machine.
Original bug ID: 7030
Reporter: Patrick Star
Status: closed (set by @xavierleroy on 2017-02-16T14:14:42Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: sun4u
OS: Solaris
OS Version: 10
Version: 4.02.3
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: configure and build/install
Monitored by: @gasche
Bug description
libasmrun_shared.so fails to build on Solaris/SPARC with the standard Makefile:
[squidward]user:~/src/ocaml-4.02.3/asmrun$ make
gcc -shared -o libasmrun_shared.so startup.pic.o main.pic.o fail.pic.o roots.pic.o globroots.pic.o signals.pic.o signals_asm.pic.o misc.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o extern.pic.o intern.pic.o hash.pic.o sys.pic.o parsing.pic.o gc_ctrl.pic.o terminfo.pic.o md5.pic.o obj.pic.o lexing.pic.o printexc.pic.o callback.pic.o weak.pic.o compact.pic.o finalise.pic.o custom.pic.o unix.pic.o backtrace.pic.o natdynlink.pic.o debugger.pic.o meta.pic.o dynlink.pic.o sparc.pic.o -fPIC -lnsl -lsocket -lm
Text relocation remains referenced
against symbol offset in file
L109 0x4 sparc.pic.o
caml_call_gc 0x8 sparc.pic.o
ld: fatal: relocations remain against allocatable but non-writable sections
make: *** [libasmrun_shared.so] Error 1
Steps to reproduce
Attempt to build ocaml on Solaris/SPARC, specifically
[squidward]user:~/src/ocaml-4.02.3/asmrun$ uname -a
SunOS squidward 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Blade-2500 Solaris
Additional information
Solution: Use ld -G, which is the proper way of producing shared objects on Solaris:
[squidward]user:
/src/ocaml-4.02.3/asmrun$ ld -G -o libasmrun_shared.so startup.pic.o main.pic.o fail.pic.o roots.pic.o globroots.pic.o signals.pic.o signals_asm.pic.o misc.pic.o freelist.pic.o major_gc.pic.o minor_gc.pic.o memory.pic.o alloc.pic.o compare.pic.o ints.pic.o floats.pic.o str.pic.o array.pic.o io.pic.o extern.pic.o intern.pic.o hash.pic.o sys.pic.o parsing.pic.o gc_ctrl.pic.o terminfo.pic.o md5.pic.o obj.pic.o lexing.pic.o printexc.pic.o callback.pic.o weak.pic.o compact.pic.o finalise.pic.o custom.pic.o unix.pic.o backtrace.pic.o natdynlink.pic.o debugger.pic.o meta.pic.o dynlink.pic.o sparc.pic.o -fPIC -lnsl -lsocket -lm/src/ocaml-4.02.3/asmrun$ file libasmrun_shared.so[squidward]user:
libasmrun_shared.so: ELF 32-bit MSB dynamic lib SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped, no debugging information available
File attachments
The text was updated successfully, but these errors were encountered: