This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building gcc 5.3 with gmp,mpfr,mpc,isl in tree results in error relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object


On 6 March 2016 at 14:09, Daniel Letai <dani@letai.org.il> wrote:
> Hi,
>
> I'm trying to build a gcc-5.3 package for rhel 6 x64 (based on gcc-5.3.1
> from koji) with the prerequisites in tree, as if after using the
> contrib/download_prerequisites but with newer versions of those libraries.
>
> The exact error:
>
> /opt/gnu/binutils/2.26/bin/ld:
> /home/rpmbuild/BUILD/gcc-5.3.1-20160212/obj-x86_64-redhat-linux/objlibgccjit/./isl/.libs/libisl.a(isl_val_gmp.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making
> a shared object; recompile with -fPIC
> /home/rpmbuild/BUILD/gcc-5.3.1-20160212/obj-x86_64-redhat-linux/objlibgccjit/./isl/.libs/libisl.a:
> error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[1]: *** [libgccjit.so.0.0.1] Error 1
> make[1]: *** Waiting for unfinished jobs....
> rm gcov-tool.pod gcov.pod cpp.pod gfdl.pod fsf-funding.pod gcc.pod
> make[1]: Leaving directory
> `/home/rpmbuild/BUILD/gcc-5.3.1-20160212/obj-x86_64-redhat-linux/objlibgccjit/gcc'
> make: *** [all-gcc] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.Qe5BHa (%build)
>
>
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.Qe5BHa (%build)
>
>
> Since gcc/configure doesn't accept -fPIC, I'm not sure how to proceed - How
> do I tell gcc configure to pass -fPIC to just the isl library, and only when
> building objlibgccjit?

You need to configure with --enable-host-shared for libgccjit.

You can also build without ISL, since it's only needed by an optional feature.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]