LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems building cairo 1.12.16 from source (https://www.linuxquestions.org/questions/linux-software-2/problems-building-cairo-1-12-16-from-source-4175519012/)

Shaggy1 09-16-2014 07:51 AM

Problems building cairo 1.12.16 from source
 
Hi

I have been trying to build gtk+(3.12) from source on my rhel6 system.

Gtk requires pango which requires cairo and I am having problems building (or more accurately linking) cairo (1.12.16)
I get the following error:

/tools/oss/packages/x86_64-rhel6/binutils/default/bin/ld: /tools/oss/packages/x86_64-rhel6/gcc/4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/../../../../lib64/libiberty.a(cplus-dem.o): relocation R_X86_64_32S against `_sch_istable' can not be used when making a shared object; recompile with -fPIC
/tools/oss/packages/x86_64-rhel6/gcc/4.5.3/lib/gcc/x86_64-unknown-linux-gnu/4.5.3/../../../../lib64/libiberty.a: could not read symbols: Bad value

It seems cairo requires that libiberty.a to be built with Position independent code.

Does anyone know how I can get round this problem ?
Is there a way of building cairo without this requirement ?

I am not aware that it is possible to build libiberty.a as a separate entity. Would I need to re-build gcc, somehow specifying libiberty to be built using -FOIC, to do this ?
(and presumably after that half the world)


I am using redhat6:
uname -a
Linux lb-cbga-eq 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed May 15 10:48:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

ReaperX7 09-17-2014 03:56 AM

Do you have libmpc, libmpfr, and libgmp installed? You should probably install them and then rebuild gcc.

Shaggy1 09-17-2014 06:31 AM

Thank you for the reply.

I do have libmpc, libmpfr, and libgmp, but it is part of a tool chain that I cannot change, so will need to rebuild and install them locally.

I feared I would have to re-build gcc (somehow telling it to build its libraries using FPIC).

Not sure what the knock on effects of doing this will be, so I guess it may take a while.

ReaperX7 09-17-2014 02:20 PM

If you are on x86_64 you should be using fpic.


All times are GMT -5. The time now is 07:05 PM.