LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 10-18-2011, 04:51 AM   #1
divya s
Member
 
Registered: Mar 2011
Posts: 40

Rep: Reputation: 0
steps to cross compile opengl libraries for arm


Hello,
I am trying this from quite some time but i am not able to succeed.
I want to cross compile opengl libraries header files for arm, but do know how it has to be done if you can tell the steps in doing this it wl be very grateful.






thank you
 
Old 10-18-2011, 07:24 AM   #2
sunnydrake
Member
 
Registered: Jul 2009
Location: Kiev,Ukraine
Distribution: Ubuntu,Slax,RedHat
Posts: 288
Blog Entries: 1

Rep: Reputation: 41
dunno about mesa opengl but for kernel you need a) arm compiler (usually specific one) b) CROSSCOMPILE option for make
but for mesa it can be generic arm_compiler -options sources . And one note source code must not have assembler code and binaries as they will not translate correctly to arm code!
you can test program on x86 using qemu-arm package.
 
1 members found this post helpful.
Old 10-18-2011, 08:41 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,941

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Cross compiling :
Use the recommended 'tool chain' = crosstool-ng http://crosstool-ng.org/


Mesa is tricky to compile, may be this will do :
A ready to use binary "arm package" = libgl1-mesa-glx
http://packages.debian.org/lenny/libgl1-mesa-glx
File list : http://packages.debian.org/lenny/arm...a-glx/filelist
Package http://ftp.de.debian.org/debian/pool....0.3-7_arm.deb
>> libgl1-mesa-glx_7.0.3-7_arm.deb
( libgl1-mesa-dev http://packages.debian.org/lenny/libgl1-mesa-dev ).

( Easy to unpack with 'ar -x', and easy to convert to other
package formats e.g. libgl1-mesa-glx_7.0.3-7_arm.tgz.)

..
 
1 members found this post helpful.
Old 10-19-2011, 03:01 AM   #4
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
thank you

Quote:
Originally Posted by sunnydrake View Post
dunno about mesa opengl but for kernel you need a) arm compiler (usually specific one) b) CROSSCOMPILE option for make
but for mesa it can be generic arm_compiler -options sources . And one note source code must not have assembler code and binaries as they will not translate correctly to arm code!
you can test program on x86 using qemu-arm package.
Thank you so much for replying those informations were useful.
 
Old 10-19-2011, 03:10 AM   #5
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
thank you

Quote:
Originally Posted by knudfl View Post
Cross compiling :
Use the recommended 'tool chain' = crosstool-ng http://crosstool-ng.org/


Mesa is tricky to compile, may be this will do :
A ready to use binary "arm package" = libgl1-mesa-glx
http://packages.debian.org/lenny/libgl1-mesa-glx
File list : http://packages.debian.org/lenny/arm...a-glx/filelist
Package http://ftp.de.debian.org/debian/pool....0.3-7_arm.deb
>> libgl1-mesa-glx_7.0.3-7_arm.deb
( libgl1-mesa-dev http://packages.debian.org/lenny/libgl1-mesa-dev ).

( Easy to unpack with 'ar -x', and easy to convert to other
package formats e.g. libgl1-mesa-glx_7.0.3-7_arm.tgz.)

..

thank you so much.........i downloaded the package and found the libraries within it. I need still more libraries and header files cross compiled for arm. I am new to this so can u please guide me through this it will be greatful. I downloaded glut-3.7 and untarred it, i found mkmkfiles.imake and i just run that command in order to generate makefile it generated a makefile also now how to proceed with cross compiling glut for arm. I made few changes in the makefile and ten gave make after some time ended up with errors.

../../lib/glut/libglut.a(glut_vidresize.o): In function `glutVideoPan':
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:221: undefined reference to `glXChannelRectSyncSGIX'
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:224: undefined reference to `glXChannelRectSGIX'
../../lib/glut/libglut.a(glut_vidresize.o): In function `glutVideoResize':
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:199: undefined reference to `glXChannelRectSyncSGIX'
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:202: undefined reference to `glXChannelRectSGIX'
../../lib/glut/libglut.a(glut_vidresize.o): In function `glutVideoResizeGet':
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:141: undefined reference to `glXQueryChannelRectSGIX'
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:97: undefined reference to `glXQueryChannelDeltasSGIX'
../../lib/glut/libglut.a(glut_vidresize.o): In function `glutStopVideoResizing':
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:181: undefined reference to `glXBindChannelToWindowSGIX'
../../lib/glut/libglut.a(glut_vidresize.o): In function `glutSetupVideoResizing':
/home/divya/OpenGl/glut-3.7/lib/glut/glut_vidresize.c:167: undefined reference to `glXBindChannelToWindowSGIX'
collect2: ld returned 1 exit status
make[2]: *** [test21] Error 1
make[2]: Leaving directory `/home/divya/OpenGl/glut-3.7/test/glut'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/divya/OpenGl/glut-3.7/test'
make: *** [all] Error 2

please help how to cross compile opengl libraries so that i can place those libraries in the filesystem that arm board uses and would be able to execute opengl programs on arm board.
 
Old 10-19-2011, 04:16 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,941

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Glut-3.7: Please have a look at the files, you are trying to compile.
The time stamp is 1998 : Nobody use these 13 year old files.

It's a good idea to check, what's used for a Linux OS. (And for arm).
To avoid too old or too new versions.
Glut is included in Mesa. Most OS use "freeglut", I guess.
Arm package http://packages.debian.org/lenny/freeglut3
http://packages.debian.org/lenny/arm/freeglut3/filelist

And : You can of course not compile glut until you have some
libGL.so (mesa) for arm to link to.
I.e. all dependencies must be cross compiled beforehand for arm.

Armedslack, the OS for arm ( besides Debian ), packages for arm
ftp://ftp.slackware.org.uk/armedslack/ : mesa and freeglut.

..
 
Old 10-19-2011, 05:26 AM   #7
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
thank you

Quote:
Originally Posted by knudfl View Post
Glut-3.7: Please have a look at the files, you are trying to compile.
The time stamp is 1998 : Nobody use these 13 year old files.

It's a good idea to check, what's used for a Linux OS. (And for arm).
To avoid too old or too new versions.
Glut is included in Mesa. Most OS use "freeglut", I guess.
Arm package http://packages.debian.org/lenny/freeglut3
http://packages.debian.org/lenny/arm/freeglut3/filelist

And : You can of course not compile glut until you have some
libGL.so (mesa) for arm to link to.
I.e. all dependencies must be cross compiled beforehand for arm.

Armedslack, the OS for arm ( besides Debian ), packages for arm
ftp://ftp.slackware.org.uk/armedslack/ : mesa and freeglut.

..

Thank you for replying. I have installed mesa-7.10.3 on my system but it is a desktop version it is not cross compiled for arm. Your rite i first need all the dependencies to be cross compiled for arm i have opengl header files installed at /usr/include/GL and /usr/local/include/GL and lib at /usr/lib and /usr/local/lib but none of tese header files or libraries are cross compiles for arm they all are for linux arch so i am not getting how to first get my dependencies cross compiled for arm before i go to further steps. Pleas can u help me out as i am doing this for so long and not clear in what i am doing.
 
Old 10-19-2011, 06:26 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,941

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
1) The "Report" button can be used to ask for this thread
to be moved to the "Embedded Forum", where experts in
cross compiling may help you out.


2) Assume you have your "arm tool chain" in a hideaway
location like /opt/arm/ .
You could try out the Debian packages, see post # 2,
and put the libraries in e.g. /opt/arm/lib/,
and the headers in /opt/arm/include/ , etc.
 
Old 10-19-2011, 11:37 PM   #9
divya s
Member
 
Registered: Mar 2011
Posts: 40

Original Poster
Rep: Reputation: 0
thank you

Quote:
Originally Posted by knudfl View Post
1) The "Report" button can be used to ask for this thread
to be moved to the "Embedded Forum", where experts in
cross compiling may help you out.


2) Assume you have your "arm tool chain" in a hideaway
location like /opt/arm/ .
You could try out the Debian packages, see post # 2,
and put the libraries in e.g. /opt/arm/lib/,
and the headers in /opt/arm/include/ , etc.

Thank you for replying now i have got some idea on doing will try it and contact u if i had any problems.
 
  


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 Compile GLib for ARM striker07 Programming 4 04-27-2011 07:49 AM
Help to cross compile vlc to arm 4monkeys Linux - Embedded & Single-board computer 3 03-14-2011 05:33 AM
cannot compile cross-gcc for arm ecco_the_dolphin Linux - Software 1 05-24-2010 05:02 PM
Trying to cross-compile mono for ARM hal_2001 Programming 2 05-11-2010 03:18 PM
how to cross compile tslib for arm ? sunr2007 Linux - Embedded & Single-board computer 3 06-29-2009 12:41 AM


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

Main Menu
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