LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-16-2014, 06:51 AM   #1
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Rep: Reputation: 3
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
 
Old 09-17-2014, 02:56 AM   #2
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Do you have libmpc, libmpfr, and libgmp installed? You should probably install them and then rebuild gcc.
 
Old 09-17-2014, 05:31 AM   #3
Shaggy1
Member
 
Registered: Oct 2010
Posts: 111

Original Poster
Rep: Reputation: 3
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.
 
Old 09-17-2014, 01:20 PM   #4
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
If you are on x86_64 you should be using fpic.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems building Mesa from source flyinggeorge Linux - Software 2 06-28-2014 11:14 PM
Error when building cairo on linux Bloehdian Linux - Software 5 01-11-2013 10:26 AM
[SOLVED] Problems building Firefox 13.0 from source under -current mats_b_tegner Slackware 12 01-10-2013 10:07 AM
Problems building pacemaker from source eantoranz Linux - Software 1 10-10-2012 02:43 AM
problems building fakenes from source frieza Linux - Software 2 08-28-2010 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration