Bug 1195025

Summary: Ocaml libasmrun.a needs to be compiled with -fPIC
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: ocamlAssignee: Richard W.M. Jones <rjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: c.david86, rdieter, rjones
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:56:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1196088    

Description Jerry James 2015-02-22 04:27:17 UTC
Description of problem:
See my latest attempt to build why3:

http://koji.fedoraproject.org/koji/buildinfo?buildID=613997

Version-Release number of selected component (if applicable):
ocaml-4.02.1-1.fc23.x86_64

How reproducible:
Only tried once.

Steps to Reproduce:
1. Attempt to build why3 in Rawhide
2.
3.

Actual results:
Linking  bin/why3.opt
/usr/bin/ld: /usr/lib64/ocaml/libasmrun.a(startup.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/ocaml/libasmrun.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
Makefile:451: recipe for target 'bin/why3.opt' failed
make: *** [bin/why3.opt] Error 2

Expected results:
Successful link.

Additional info:

Comment 1 Rex Dieter 2015-02-25 17:27:21 UTC
Similar (but not exactly the same), getting kalzium FTBFS due to:

[ 50%] Generating modwrap.o
cd src && /usr/bin/ocamlopt -I /usr/lib64/ocaml/facile -c /builddir/build/BUILD/kalzium-14.12.2/src/solver/modwrap.c -o /builddir/build/BUILD/kalzium-14.12.2/x86_64-redhat-linux-gnu/src/modwrap.o

and subsequently trying to link it into an executable:

/bin/ld: modwrap.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
modwrap.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Comment 2 Richard W.M. Jones 2015-02-25 17:37:58 UTC
See also:
http://caml.inria.fr/mantis/view.php?id=6693

Comment 3 Richard W.M. Jones 2015-06-16 12:56:59 UTC
This will be fixed in OCaml 4.02.2+rc1 which I'm going to
upload shortly-ish to Rawhide.