#9040: fatal relocation error installing R on OpenSolaris x64 with gcc (OK with
Sun Studio).
------------------------+---------------------------------------------------
Reporter: drkirkby | Owner: drkirkby
Type: defect | Status: new
Priority: major | Milestone: sage-4.7
Component: solaris | Keywords:
Author: | Upstream: None of the above - read trac for
reasoning.
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Comment(by drkirkby):
Replying to [comment:11 fbissey]:
> Oh dear, I stumbled on something quite similar while compiling my own
fortran code on amd64 for the first time last month. The key point that
sends my bells ringing is this
> {{{
> relocation error: R_AMD64_PC32
> }}}
> I think you should totally try the -mcmodel option in C{XX}FLAGS:
> {{{
> `-mcmodel=small'
> Generate code for the small code model: the program and its
> symbols must be linked in the lower 2 GB of the address space.
> Pointers are 64 bits. Programs can be statically or dynamically
> linked. This is the default code model.
>
> `-mcmodel=kernel'
> Generate code for the kernel code model. The kernel runs in the
> negative 2 GB of the address space. This model has to be used for
> Linux kernel code.
>
> `-mcmodel=medium'
> Generate code for the medium model: The program is linked in the
> lower 2 GB of the address space. Small symbols are also placed
> there. Symbols with sizes larger than `-mlarge-data-threshold'
> are put into large data or bss sections and can be located above
> 2GB. Programs can be statically or dynamically linked.
>
> `-mcmodel=large'
> Generate code for the large model: This model makes no assumptions
> about addresses and sizes of sections.
> }}}
> medium would probably work, if it doesn't try large.
This does not help. Medium causes no change in behavior, whereas 'large;'
causes an early exit with a message about longs were expected to be 4
bytes, not 8. (But since I'm building 64-bit, longs are 8 bytes). Whereas
normally without either of those options, 5 shared libraries get built in
R, this reduces to two if {{{-mcmodel=large}}}.
I think the key to this is
http://blogs.sun.com/rie/entry/my_relocations_don_t_fit
I posted a log with the suggested debugging option
({{{LD_OPTIONS=-Dreloc,detail}}}) to
http://boxen.math.washington.edu/home/kirkby/r-2.10.1.p4-with-debug-
info.log.bz2
I think you will see, its not easy to debug.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9040#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.