[petsc-users] relocation truncated to fit: R_X86_64_PC32 error

Miguel Méndez mendez8 at gmail.com
Mon Sep 17 11:00:22 CDT 2012


It was that!

Thank you Matthew. I though I had tested that one, it seems I hadn't.

Cheers,

Miguel

On Mon, Sep 17, 2012 at 2:23 PM, Matthew Knepley <knepley at gmail.com> wrote:

> On Mon, Sep 17, 2012 at 6:03 AM, Miguel Méndez <mendez8 at gmail.com> wrote:
>
>> Hi everybody,
>>
>> I'm getting the infamous "relocation truncated to fit: R_X86_64_PC32"
>> error when compiling a fortran program. I've tried many things, the last
>> one of them being to recompile Petsc and Slepc libraries. This has solved
>> all of the compile errors related to this relocation except for one:
>>
>>
>>
>>> /usr/local/software/slepc-3.0.0-p7-fpic/complex/build/lib/libslepc.a(cross.o):
>>> In function `ShellMatGetDiagonal_CROSS':
>>> cross.c:(.text+0x3ca): relocation truncated to fit: R_X86_64_PC32
>>> against symbol `MPIU_COMPLEX' defined in COMMON section in
>>> /usr/local/software/petsc-3.0.0-p12-fpic/complex/build/lib/libpetsc.a(init.o)
>>
>>
>> I don't even think I know where the error is, in Petsc or in Slepc? I've
>> been trough Intel forums and done as they recommend: recompile the
>> libraries with "--mcmodel=medium" and "shared-intel". I've tried too
>> combinations with "-fpic", but I always end having the same error.
>>
>> I've searched the logs for messages about "libpetsc.a" building, but
>> there's nothing about it. Who and when builds this exact library? Why it
>> seems that compile options I set are not applying in the building of this
>> file?
>>
>
> This comes from not building with -fPIC (or what ever the PIC flag is for
> your compiler). Find that source file, build
> it with PIC, and archive it to libslepc.a. Of course, upgrading would make
> this automatic.
>
>     Matt
>
>
>> Thanks,
>>
>> Miguel
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120917/00d2c48d/attachment-0001.html>


More information about the petsc-users mailing list