LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   steps to cross compile opengl libraries for arm (https://www.linuxquestions.org/questions/linux-software-2/steps-to-cross-compile-opengl-libraries-for-arm-908738/)

divya s 10-18-2011 04:51 AM

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

sunnydrake 10-18-2011 07:24 AM

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.

knudfl 10-18-2011 08:41 AM

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.)

..

divya s 10-19-2011 03:01 AM

thank you
 
Quote:

Originally Posted by sunnydrake (Post 4501414)
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.

divya s 10-19-2011 03:10 AM

thank you
 
Quote:

Originally Posted by knudfl (Post 4501475)
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.

knudfl 10-19-2011 04:16 AM

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.

..

divya s 10-19-2011 05:26 AM

thank you
 
Quote:

Originally Posted by knudfl (Post 4502231)
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.

knudfl 10-19-2011 06:26 AM

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.

divya s 10-19-2011 11:37 PM

thank you
 
Quote:

Originally Posted by knudfl (Post 4502396)
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.

ananthavidhya 01-27-2022 03:27 AM

Hi

I am very new to this forum, This is very first post i am posting. I am posting here as a continuation since i am also facing some issue in cross-compiling the opengl source code.
If never mind can you please mention me the detailed steps you followed in achieving this?

1)Well coming to my case i am using TI's sdk 04.02 & AM4378 based SBC.
2)Main purpose is to cross-compile navit application.
3)For that i am using ARM TOOL_CHAIN which is already present under the TI's sdk 04.02.
4)But when i did cmake it showing me as
-- Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
-- Could NOT find GLUT (missing: GLUT_glut_LIBRARY)
5)So i am trying build OPENGL,GLUT using bit bake building method which is mentioned in TI's site only
6)But i couldn't achieve this since these libraries are under skipped list so i couldn't able to build them.
7)So i am searching for another way to cross-compile opengl,glut libraries and copy the builded files to arm file system.
8)Thus how i saw this post and glad to identify this post is more similar to my doubt,but i didn't get detailed steps of how you people cross-compiled.
9)Thankful if someone let me know this in detail.

Thanks & Regards
A.N.V.Lavanya


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