Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007595OCamlruntime system and C interfacepublic2017-07-21 20:342017-07-21 22:14
Assigned To 
PlatformLinuxOSTumbleweedOS Versionrolling
Product Version4.03.0 
Target VersionFixed in Version 
Summary0007595: pic version of libasmrun not used
DescriptionAs a followup to a discussion on the on 2017-05-31 I was asked to enter this feature request:

openSUSE Tumbleweed switched to gcc7, with the result that most ocaml related packages fail to build. The reason is that libasmrun.a instead of libasmrun_pic.a is used during linking:

ocamlfind ocamlopt unix.cmxa -I /usr/lib64/ocaml/ocamlbuild /usr/lib64/ocaml/ocamlbuild/ocamlbuildlib.cmxa -linkpkg /usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/ocaml/libasmrun.a(startup_aux.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC

Per the discussion there is apparently a knob 'runtime_variant(_pic)' for ocamlbuild. To my understanding this would need to be done for each package.

The workaround is to replace %{_libdir}/ocaml/libasmrun.a with libasmrun_pic.a to have this system-wide fixed.

It would be nice if there is a configure option to automatically select the "_pic" variant, unless otherwise specified by the project/package.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2017-07-21 20:34 olh New Issue

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker