LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 10-30-2010, 05:04 AM   #1
harsha1987
LQ Newbie
 
Registered: Oct 2010
Distribution: Ubuntu, Fedora
Posts: 11

Rep: Reputation: 0
Xorg Cross Compiling


Hi,

I am tyring to cross compile Xorg for arm-cortexA8 cpu with arm7-a architecture. I am following the instructions given in the following websites,
http://wiki.x.org/wiki/JhBuildInstructions
http://wiki.x.org/wiki/CrossCompilingXorgJhbuild ,
tool chain used is arm-none-linux-gnueabi version 4.4.1 from code sourcery.

While cross compiling libGL, I am getting error message at linking stage,

"mklib: Making Linux shared library: r300_dri.so.tmp"

"/usr/local/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: r300_dri.so.test: hidden symbol `__sync_sub_and_fetch_4' in /usr/local/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc.a(linux-atomic.o) is referenced by DSO
/usr/local/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: final link failed: Nonrepresentable section on output"

Tool chain location in /usr/local/

Mklib creates a shared library with name r300_dri.so.tmp but while linking r300_dri_so.test is linked which I couldnt find in my build directory.

Cross tool chain gcc version 4.4.1 supports for atomic instructions but they are part of GLOBAL HIDDEN (obtained when I ran readelf for the libgcc.a), and armv7a architecture also supports atomic instructions, I tried with -march=armv7-a settings in the CFLAGS but got the same error

Can anyone assist me on this issue??

Thanks in advance.

With Best Regards,
C. N. Harsha Sukeerthi
 
Old 11-01-2010, 01:37 PM   #2
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
what's your CLAGS and CXXFLAGS?
 
Old 11-02-2010, 12:52 AM   #3
harsha1987
LQ Newbie
 
Registered: Oct 2010
Distribution: Ubuntu, Fedora
Posts: 11

Original Poster
Rep: Reputation: 0
CFLAGS: -march=armv7-a -I<Include Dir> -Wall -Wmissing-prototypes -std=c99 -ffast-math -fvisibility=hidden -fno-strict-aliasing -fPIC
CXXFLAGS: -g -02 -Wall -fvisibility=hidden -fno-strict-aliasing -fPIC
 
Old 11-02-2010, 04:59 AM   #4
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
It's not a gcc related problem, It's ld related. LD tries to link shared and static object then it fails. At least that's what I understand from the input. I'd say invoke the linker via compiler but it's not your code; fill a bug report there.

Before that; post your jhbuildrc, I'm curious about it.
 
Old 11-02-2010, 09:54 AM   #5
harsha1987
LQ Newbie
 
Registered: Oct 2010
Distribution: Ubuntu, Fedora
Posts: 11

Original Poster
Rep: Reputation: 0
jhbuildrc can be obtained from the following website,

http://wiki.x.org/wiki/CrossCompilingXorgJhbuild
 
Old 11-02-2010, 10:45 AM   #6
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
Quote:
Originally Posted by harsha1987 View Post
jhbuildrc can be obtained from the following website,

http://wiki.x.org/wiki/CrossCompilingXorgJhbuild
Did you use the exact same one?
 
Old 11-02-2010, 12:15 PM   #7
harsha1987
LQ Newbie
 
Registered: Oct 2010
Distribution: Ubuntu, Fedora
Posts: 11

Original Poster
Rep: Reputation: 0
Initially yes, then for the libGL part I added --disable-gallium, after which I did not get the above error because now gallium 3D drivers are excluded from building and some changes for fontconfig, why is there a problem with the script?
 
Old 11-02-2010, 12:55 PM   #8
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

Rep: Reputation: 94
Quote:
Originally Posted by harsha1987 View Post
Initially yes, then for the libGL part I added --disable-gallium, after which I did not get the above error because now gallium 3D drivers are excluded from building and some changes for fontconfig, why is there a problem with the script?
Not exectly, but I'm guessing MakeFiles did. Fill a bug report to the X.Org
 
Old 11-08-2010, 04:10 AM   #9
l2y3n2
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Rep: Reputation: 0
have you tried OpenEmbedded or Ptxdist?

It's really a pain to cross-compile xorg and all its dependencies manually
 
Old 11-17-2010, 02:27 AM   #10
harsha1987
LQ Newbie
 
Registered: Oct 2010
Distribution: Ubuntu, Fedora
Posts: 11

Original Poster
Rep: Reputation: 0
No, I did not try them, I planned on using T2 for building Xorg but dropped it, except for cross compiling gallium drivers in mesa I did not face any other major problems cross compiling Xorg with jhbuild
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cross Compiling jayadhanesh Linux - Newbie 2 05-26-2009 12:48 AM
Cross-compiling v/s cross-building kushalkoolwal Programming 3 05-13-2009 06:49 AM
Cross compiling Mike Davies Linux - Kernel 4 04-04-2007 11:59 AM
cross compiling cerin Linux - Software 1 02-11-2006 11:47 PM
cross-compiling? jon_k Programming 3 12-09-2004 10:36 AM


All times are GMT -5. The time now is 11:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration