From: Olaf Hering <olaf@aepfle.de>
To: caml-list@inria.fr
Subject: [Caml-list] pic version of libasmrun not used
Date: Wed, 31 May 2017 10:12:18 +0200 [thread overview]
Message-ID: <20170531081218.GH26792@aepfle.de> (raw)
[-- 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 --]
next reply other threads:[~2017-05-31 8:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 8:12 Olaf Hering [this message]
2017-05-31 11:24 ` Gabriel Scherer
2017-05-31 12:16 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170531081218.GH26792@aepfle.de \
--to=olaf@aepfle.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox