Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 17-06-2016, 03:49   #1
Registered User

Join Date: Oct 2009
Location: Aboard my boat, SE Asia 2014
Boat: Passport 45 Ketch
Posts: 29
CMakeLists.txt does not find OpenGL or OpenGLES

Compiling 4.4.0 openGL is not found by the CMake internal function and there is no find_package for finding openGLESv1 or openGLESv2.
I am compiling on Ububntu 15.04 64bit on Acer i7 laptop and armbian 5.14 Jessie 8 on Orange Pi PC.
On Jessie, I can force the top level CMakeLists.txt by adding: ( as per deltasig's posthttp://www.cruisersforum.com/forums/f134/opencpn-runs-on-embedded-arm-74082-56.html#post2095151 ) change:
# find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
SET(OPENGLESv1_INCLUDE_DIR "/usr/include/GLES" )
This finds the include files, but then fails to find the libraries in /usr/lib/mali/libEGL.so
So I linked them into /usr/include.

On the Ubuntu laptop, the libraries are in
/usr/lib/nvidia-352/ or
/usr/lib/x86_64-linux-gnu/mesa-egl/ or
/usr/lib32/nvidia-352/

Work-arounds are 'OK' sometimes, but isn't it time to fix CMakeLists.txt? I have tried for a few hours, but am having trouble following the logic there. It seems very convoluted.

With a little guidance I will try to come up with a patch for multiple arch's.
__________________

__________________
--
Larry & Trinda
1981 Passport 45 Ketch, The Katie Lee
svkatielee is offline   Reply With Quote
Old 17-06-2016, 05:26   #2
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: CMakeLists.txt does not find OpenGL or OpenGLES

what is the cmake output and log from a clean build directory? What exact change did you make to fix it?
__________________

__________________
boat_alexandra is offline   Reply With Quote
Old 17-06-2016, 06:45   #3
Registered User

Join Date: Oct 2009
Location: Aboard my boat, SE Asia 2014
Boat: Passport 45 Ketch
Posts: 29
Re: CMakeLists.txt does not find OpenGL or OpenGLES

For the Orange Pi, armbian 5.14 and Debian Jessie I changed the top CMakeLists.txt:
.... To that end I changed the CMakeLists.txt as follows in order for the Mali-400 to get in: about line 299
# find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
SET(OPENGLESv1_INCLUDE_DIR "/usr/include/GLES" )

then so it could find the lib to link I did this:
sudo ln -s /usr/lib/mali/libEGL.so /usr/lib/

Here is the cmake:
Code:
cmake -DBUNDLE_DOCS=ON -DBUNDLE_TCDATA=ON -DBUNDLE_GSHHS=CRUDE -DCFLAGS="-O2 -march=native" ../

-- *** Build Architecture is armhf
-- *** Staging to build opencpn 4.4.0 ***
-- *** Package will include documentation ***
-- *** Package will include GSHHS basechart level: CRUDE ***
-- *** Package will include tide and current data ***
-- Found OpenGLESv1 
-- Found OPENGL_LIBRARIES GL_staticGLU_staticEGLX11drmdri2
-- Found wxWidgets...
--  wxWidgets Libraries: -L/usr/lib/arm-linux-gnueabihf;-pthread;;;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-lwx_gtk2u_gl-3.0
--  Revised wxWidgets Libraries: -L/usr/lib/arm-linux-gnueabihf;-pthread;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-lwx_gtk2u_gl-3.0
-- 
-- *** Staging to build opencpn  ***
-- Build type: Release
-- *** Will install to /usr/local  ***
-- Crash reporting enabled
-- Using Linux crash reporting
-- Found Portaudio: /usr/lib/arm-linux-gnueabihf/libportaudio.so
-- Portaudio Found
-- wxCurl configured...
-- SVG support enabled...
-- Cairo Extra Libraries: /usr/lib/arm-linux-gnueabihf/libpangocairo-1.0.so/usr/lib/arm-linux-gnueabihf/libpangoft2-1.0.so/usr/lib/arm-linux-gnueabihf/libpangoxft-1.0.so/usr/lib/arm-linux-gnueabihf/libgdk_pixbuf-2.0.so
-- Building against GTK2...
-- Building with tinyxml includes
-- S57 ENC support: enabled
-- Garmin Host Mode support: enabled
-- 
-- *** Staging to build PlugIns ***
-- *** Staging to build chartdldr_pi ***
-- Found OpenGL...
--     Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
--     Include: /usr/include
-- Chartdldr_pi building with system tinyxml
-- *** Staging to build wmm_pi ***
-- Found OpenGL...
--     Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
--     Include: /usr/include
-- Found OpenGL...
--     Lib: /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
--     Include: /usr/include
-- 
-- *** Staging to build dashboard_pi ***
-- *** Staging to build grib_pi ***
-- Writing spec file...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/larryl/OpenCPN/build
For the Ubuntu 15.04 laptop Acer i7 64bit, I did not finish. I started searching the cmake files and doc for why it didn't find the openGL, but here it is whit no change to the files:
Code:
nav3$ cmake ../
-- *** Build Architecture is amd64
-- *** Staging to build opencpn 4.2.0 ***
-- *** Package will include documentation ***
-- *** Package will include GSHHS basechart level: CRUDE ***
-- *** Package will include tide and current data ***
-- Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) 
-- OpenGL not found...
-- Found wxWidgets...
--  wxWidgets Libraries: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_html-3.0;-lwx_baseu_adv-3.0;-lwx_baseu_aui-3.0;-lwx_baseu_core-3.0;-lwx_baseu-3.0
--  Revised wxWidgets Libraries: -L/usr/lib/x86_64-linux-gnu;-pthread;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_html-3.0;-lwx_baseu_adv-3.0;-lwx_baseu_aui-3.0;-lwx_baseu_core-3.0;-lwx_baseu-3.0
-- 
-- *** Staging to build opencpn  ***
-- Build type: Release
-- *** Will install to /usr/local  ***
-- Crash reporting enabled
-- Using Linux crash reporting
-- Portaudio Not Found...
-- wxCurl configured...
-- SVG support enabled...
-- Could NOT find CAIRO (missing:  CAIRO_INCLUDE_DIR CAIRO_LIBRARY) 
CMake Error at CMakeLists.txt:627 (message):
  Cairo component required, but not found!


-- Configuring incomplete, errors occurred!
See also "/home/larryl/OpenCPN/build/CMakeFiles/CMakeOutput.log".
but the libs are at :
Code:
nav3$ locate libEGL.so
/usr/lib/nvidia-352/libEGL.so
/usr/lib/nvidia-352/libEGL.so.1
/usr/lib/nvidia-352/libEGL.so.352.63
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1.0.0
/usr/lib32/nvidia-352/libEGL.so
/usr/lib32/nvidia-352/libEGL.so.1
/usr/lib32/nvidia-352/libEGL.so.352.63
cmake has a built-in function: /usr/share/cmake-3.2/Modules/FindOpenGL.cmake

but it has no FindOpenGLES.cmake and opencpn has not written one yet either.
__________________
--
Larry & Trinda
1981 Passport 45 Ketch, The Katie Lee
svkatielee is offline   Reply With Quote
Old 17-06-2016, 09:11   #4
Registered User

Join Date: Oct 2009
Location: Aboard my boat, SE Asia 2014
Boat: Passport 45 Ketch
Posts: 29
Re: CMakeLists.txt does not find OpenGL or OpenGLES

OOPs... I seem to be missing a lot of software packages on the laptop,
After finding one missing package at a time I finally went back and read the linux install instructions again. I missed the first step every time I that I had read that page...

I looks like it configures OK. It chose the mesa version of libGL instead of the nvidia version. Is that right?

I'll start the compile before bedtime and see in the morning.

Thanks Sean
__________________
svkatielee is offline   Reply With Quote
Old 17-06-2016, 12:39   #5
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
Re: CMakeLists.txt does not find OpenGL or OpenGLES

Quote:
Originally Posted by svkatielee View Post
For the Orange Pi, armbian 5.14 and Debian Jessie I changed the top CMakeLists.txt:
.... To that end I changed the CMakeLists.txt as follows in order for the Mali-400 to get in: about line 299
# find_path(OPENGLESv1_INCLUDE_DIR GLES/gl.h )
SET(OPENGLESv1_INCLUDE_DIR "/usr/include/GLES" )
Why can it not find /usr/include/GLES/gl.h? Any more hints by cmake?
Quote:
then so it could find the lib to link I did this:
sudo ln -s /usr/lib/mali/libEGL.so /usr/lib/
/usr/lib/mali is non-standard if you wanted you could add it to the list opencpn looks for or do what you did.
Quote:
Here is the cmake:
Code:
cmake -DBUNDLE_DOCS=ON -DBUNDLE_TCDATA=ON -DBUNDLE_GSHHS=CRUDE -DCFLAGS="-O2 -march=native" ../

-- *** Build Architecture is armhf
-- *** Staging to build opencpn 4.4.0 ***
-- *** Package will include documentation ***
-- *** Package will include GSHHS basechart level: CRUDE ***
-- *** Package will include tide and current data ***
-- Found OpenGLESv1 
-- Found OPENGL_LIBRARIES GL_staticGLU_staticEGLX11drmdri2
-- Found wxWidgets...
--  wxWidgets Libraries:  -L/usr/lib/arm-linux-gnueabihf;-pthread;;;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-lwx_gtk2u_gl-3.0
--  Revised wxWidgets Libraries:  -L/usr/lib/arm-linux-gnueabihf;-pthread;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-lwx_gtk2u_gl-3.0
-- 
-- *** Staging to build opencpn  ***
-- Build type: Release
-- *** Will install to /usr/local  ***
-- Crash reporting enabled
-- Using Linux crash reporting
-- Found Portaudio: /usr/lib/arm-linux-gnueabihf/libportaudio.so
-- Portaudio Found
-- wxCurl configured...
-- SVG support enabled...
-- Cairo Extra Libraries:  /usr/lib/arm-linux-gnueabihf/libpangocairo-1.0.so/usr/lib/arm-linux-gnueabihf/libpangoft2-1.0.so/usr/lib/arm-linux-gnueabihf/libpangoxft-1.0.so/usr/lib/arm-linux-gnueabihf/libgdk_pixbuf-2.0.so
-- Building against GTK2...
-- Building with tinyxml includes
-- S57 ENC support: enabled
-- Garmin Host Mode support: enabled
-- 
-- *** Staging to build PlugIns ***
-- *** Staging to build chartdldr_pi ***
-- Found OpenGL...
--     Lib:  /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
--     Include: /usr/include
-- Chartdldr_pi building with system tinyxml
-- *** Staging to build wmm_pi ***
-- Found OpenGL...
--     Lib:  /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
--     Include: /usr/include
-- Found OpenGL...
--     Lib:  /usr/lib/arm-linux-gnueabihf/libGLU.so/usr/lib/arm-linux-gnueabihf/libGL.so/usr/lib/arm-linux-gnueabihf/libSM.so/usr/lib/arm-linux-gnueabihf/libICE.so/usr/lib/arm-linux-gnueabihf/libX11.so/usr/lib/arm-linux-gnueabihf/libXext.so
--     Include: /usr/include
-- 
-- *** Staging to build dashboard_pi ***
-- *** Staging to build grib_pi ***
-- Writing spec file...
-- Configuring done
-- Generating done
-- Build files have been written to: /home/larryl/OpenCPN/build
Code:
Does opencpn work?  It sure looks like it found the  wrong opengl, but perhaps it doesn't matter so long as it uses the mali  version when opencpn actually runs...
Quote:
Quote:
For the Ubuntu 15.04 laptop Acer i7 64bit, I did not finish. I started searching the cmake files and doc for why it didn't find the openGL, but here it is whit no change to the files:
Code:
nav3$ cmake ../
-- *** Build Architecture is amd64
-- *** Staging to build opencpn 4.2.0 ***
-- *** Package will include documentation ***
-- *** Package will include GSHHS basechart level: CRUDE ***
-- *** Package will include tide and current data ***
-- Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) 
-- OpenGL not found...
-- Found wxWidgets...
--  wxWidgets Libraries:  -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_html-3.0;-lwx_baseu_adv-3.0;-lwx_baseu_aui-3.0;-lwx_baseu_core-3.0;-lwx_baseu-3.0
--  Revised wxWidgets Libraries:  -L/usr/lib/x86_64-linux-gnu;-pthread;-lwx_baseu_net-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_html-3.0;-lwx_baseu_adv-3.0;-lwx_baseu_aui-3.0;-lwx_baseu_core-3.0;-lwx_baseu-3.0
-- 
-- *** Staging to build opencpn  ***
-- Build type: Release
-- *** Will install to /usr/local  ***
-- Crash reporting enabled
-- Using Linux crash reporting
-- Portaudio Not Found...
-- wxCurl configured...
-- SVG support enabled...
-- Could NOT find CAIRO (missing:  CAIRO_INCLUDE_DIR CAIRO_LIBRARY) 
CMake Error at CMakeLists.txt:627 (message):
  Cairo component required, but not found!


-- Configuring incomplete, errors occurred!
See also "/home/larryl/OpenCPN/build/CMakeFiles/CMakeOutput.log".
but the libs are at :
Code:
nav3$ locate libEGL.so
/usr/lib/nvidia-352/libEGL.so
/usr/lib/nvidia-352/libEGL.so.1
/usr/lib/nvidia-352/libEGL.so.352.63
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1.0.0
/usr/lib32/nvidia-352/libEGL.so
/usr/lib32/nvidia-352/libEGL.so.1
/usr/lib32/nvidia-352/libEGL.so.352.63
cmake has a built-in function: /usr/share/cmake-3.2/Modules/FindOpenGL.cmake

but it has no FindOpenGLES.cmake and opencpn has not written one yet either.
You could write FindOpenGLES.cmake I didn't think it exists.
__________________
boat_alexandra is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DeLorme Inreach SE won't txt an iridium Satphone? n8kraft Marine Electronics 0 04-11-2014 13:44
OCPN 3 & OpenGL RobbieW OpenCPN 3 11-06-2012 05:59
OpenGL for OpenCPN bdbcat OpenCPN 72 15-11-2011 01:17
opengl Support boat_alexandra OpenCPN 2 17-07-2011 22:17
Wanted For Free: OpenCPN + WIN CE/OpenGL-ES CaptGreg Classifieds Archive 1 06-09-2010 20:46



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 00:45.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.