Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007030OCamlconfigure and build/installpublic2015-10-27 10:462017-02-16 15:14
ReporterPatrick Star 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Platformsun4uOSSolarisOS Version10
Product Version4.02.3 
Target Version4.03.0+dev / +beta1Fixed in Version4.03.0+dev / +beta1 
Summary0007030: libasmrun_shared.so fails to build
Descriptionlibasmrun_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 ReproduceAttempt 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 InformationSolution: 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
TagsNo tags attached.
Attached Filespatch file icon ocaml-4.02.3_configure_solaris_sparc.patch [^] (376 bytes) 2015-10-27 17:14 [Show Content]

- Relationships

-  Notes
(0014624)
xleroy (administrator)
2015-10-27 16:23

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.
(0014627)
Patrick Star (reporter)
2015-10-27 17:15

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.
(0014628)
xleroy (administrator)
2015-10-27 18:19

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.

(0014631)
johnwhitington (reporter)
2015-10-27 22:04

The people at polarhome.com can give you shell access for a lifetime payment of ten euros. I've built OCaml on their machines before.

- Issue History
Date Modified Username Field Change
2015-10-27 10:46 Patrick Star New Issue
2015-10-27 16:23 xleroy Note Added: 0014624
2015-10-27 16:23 xleroy Status new => acknowledged
2015-10-27 17:14 Patrick Star File Added: ocaml-4.02.3_configure_solaris_sparc.patch
2015-10-27 17:15 Patrick Star Note Added: 0014627
2015-10-27 18:19 xleroy Note Added: 0014628
2015-10-27 18:19 xleroy Status acknowledged => resolved
2015-10-27 18:19 xleroy Resolution open => fixed
2015-10-27 18:19 xleroy Fixed in Version => 4.03.0+dev / +beta1
2015-10-27 18:19 xleroy Target Version => 4.03.0+dev / +beta1
2015-10-27 22:04 johnwhitington Note Added: 0014631
2017-02-16 15:14 xleroy Status resolved => closed
2017-02-23 16:38 doligez Category OCaml internal build/install (Makefiles, configure) => configure and build/install


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker