caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] pic version of libasmrun not used
@ 2017-05-31  8:12 Olaf Hering
  2017-05-31 11:24 ` Gabriel Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: Olaf Hering @ 2017-05-31  8:12 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

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:


[   44s] + ocamlfind ocamlopt unix.cmxa -I /usr/lib64/ocaml/ocamlbuild /usr/lib64/ocaml/ocamlbuild/ocamlbuildlib.cmxa -linkpkg myocamlbuild.ml /usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
...
[   44s] /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
...
[   44s] E: Failure("Command ''/usr/bin/ocamlbuild' src/oasis/oasis.cma src/oasis/oasis.cmxa src/oasis/oasis.a src/oasis/oasis.cmxs src/base/base.cma src/base/base.cmxa src/base/base.a src/base/base.cmxs src/builtin-plugins.cma src/builtin-plugins.cmxa src/builtin-plugins.a src/builtin-plugins.cmxs src/dynrun/dynrun.cma src/dynrun/dynrun.cmxa src/dynrun/dynrun.a src/dynrun/dynrun.cmxs src/ext/plugin-loader/src/plugin-loader.cma src/ext/plugin-loader/src/plugin-loader.cmxa src/ext/plugin-loader/src/plugin-loader.a src/ext/plugin-loader/src/plugin-loader.cmxs src/cli/cli.cma src/cli/Main.byte src/ext/userconf/src/userconf.cma src/ext/userconf/src/userconf.cmxa src/ext/userconf/src/userconf.a src/ext/userconf/src/userconf.cmxs -use-ocamlfind -tag debug' terminated with error code 10")

The workaround is to overwrite libasmrun.a in ocaml like this:
cp -av --remove-destination \
        %{buildroot}%{_libdir}/ocaml/libasmrun_pic.a \
        %{buildroot}%{_libdir}/ocaml/libasmrun.a

Is there a secret knob to let ocamlbuild select the pic version of libasmrun?


Olaf

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-31 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31  8:12 [Caml-list] pic version of libasmrun not used Olaf Hering
2017-05-31 11:24 ` Gabriel Scherer
2017-05-31 12:16   ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).