Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-03-2018, 11:31   #1
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Failure to cmake photolayer plugin...

I've been building a dozen of my favorite plugins to use on my arm64 (Rock64) board
Everything is fine, but I've hit the following problem trying to cmake the photolayer plugin
https://github.com/Rasbats/photolayer_pi
(I'm rather fond of that plugin !)


Code:
...
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.8.1") 
-- Could NOT find GEOTIFF (missing:  GEOTIFF_INCLUDE_DIR) 
-- Found TinyXML: /usr/include  
-- Building with system tinyxml
-- libGeoTIFF not found, either disable the support for it or fail ro use an embedded version of it
-- Found BZip2: /usr/lib/aarch64-linux-gnu/libbz2.so (found version "1.0.6") 
...
I've installed the following packages from the Debian repo, but to no avail...
geotiff-bin
libgeotiff-dev
libgeotiff2

Help welcome (as I find it difficult to decipher the Cmake file )
sailorF54 is offline   Reply With Quote
Old 04-03-2018, 16:18   #2
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: Failure to cmake photolayer plugin...

Considering the number of answers there is, I had to manage by myself.
1 - modified CMakeLists.txt by adding a PATH description at the relevant position
2 - silenced the make errors by brute force, i.e. including all header files from the geotiff file into the src folder (there must be a more elegant way !)
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2018-03-05 01-03-23.png
Views:	98
Size:	61.1 KB
ID:	165517  
sailorF54 is offline   Reply With Quote
Old 05-03-2018, 01:10   #3
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: Failure to cmake photolayer plugin...

Quote:
Originally Posted by sailorF54 View Post
...
1 - modified CMakeLists.txt by adding a PATH description at the relevant position
...
... modified FindGeoTIFF.cmake....
sailorF54 is offline   Reply With Quote
Old 05-03-2018, 05:08   #4
Registered User

Join Date: May 2012
Posts: 1,205
Re: Failure to cmake photolayer plugin...

sailorF54 ...

Found your issue with the GitHub code. I will post an update later.

Mike
Rasbats is offline   Reply With Quote
Old 05-03-2018, 08:30   #5
Registered User

Join Date: May 2012
Posts: 1,205
Re: Failure to cmake photolayer plugin...

I had forgotten the struggle to make PhotoLayer compile on Linux.

At one point I followed the instructions here:

scigeo.org/articles/howto-install-latest-geospatial-software-on-linux.html

libgeotiff came from here:

GeoTIFF - Libgeotiff 1.4.0 Released

I used a similar workflow as the one for Windows:

dominoc925: How to build 64-bit versions of libgeotiff for Windows

If you have the GeoTiff library installed you may only need the includes from libgeotiff and can avoid all the compiling.

My 'CMakeCache.txt' is attached. You can check that you have everything that is needed. Perhaps use this and edit for your own setup.

Mike
Rasbats is offline   Reply With Quote
Old 05-03-2018, 13:07   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,632
Images: 2
Re: Failure to cmake photolayer plugin...

Mike you got the wrong link in there, it is

SciGeo.org: HOW TO: Install latest geospatial & scientific software on Linux
rgleason is offline   Reply With Quote
Old 05-03-2018, 14:45   #7
Registered User

Join Date: May 2012
Posts: 1,205
Re: Failure to cmake photolayer plugin...

Thanks. Also 'CMakeCache.txt' was missing!!!

Mike
Attached Files
File Type: pdf CMakeCache.txt.pdf (36.8 KB, 42 views)
Rasbats is offline   Reply With Quote
Old 05-03-2018, 22:56   #8
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: Failure to cmake photolayer plugin...

Hello mike

1 - installing
geotiff-bin
libgeotiff-dev
libgeotiff2
seems to provide the required files

2 - Using ubuntu 17.10 aardvark, I could ignore cmake telling
"Could NOT find GEOTIFF (missing: GEOTIFF_INCLUDE_DIR) "
and build after copying the content of /usr/include/geotiff (.h and .inc files) into the
src folder of photolayer_pi

3 - However opencpn now complains
Code:
07:19:06 CET: PlugInManager: Loading PlugIn: /usr/local/lib/opencpn/libPhotoLayer_pi.so
07:19:06 CET: Erreur : /usr/local/lib/opencpn/libPhotoLayer_pi.so: undefined symbol: XTIFFOpen
07:19:06 CET:    PlugInManager: Cannot load library: /usr/local/lib/opencpn/libPhotoLayer_pi.so
which did not occur when building on my arm64 board.

This is getting in over my head
sailorF54 is offline   Reply With Quote
Old 07-03-2018, 13:20   #9
Registered User

Join Date: May 2012
Posts: 1,205
Re: Failure to cmake photolayer plugin...

XTIFFOpen was a frequent error until I compiled my own GeoTiff.

XTIFFOpen comes from 'xtiff.c' in the libxtiff folder of libgeotiff-1.4.0 on my machine. When I compiled GeoTiff this would have been included.

SciGeo.org: HOW TO: Install latest geospatial & scientific software on Linux

Mike
Rasbats is offline   Reply With Quote
Old 07-03-2018, 20:50   #10
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Re: Failure to cmake photolayer plugin...

Thanks Mike

I had libgeotiff on my machine

The trick is to modify FindGeoTIFF.cmake to point to the folder containing geotiff.h (i.e. adding PATH /usr/include/geotiff)
I am not familiar enough with cmake to know why the original FIND_PATH cannot do it
thus

Code:
ELSEIF(UNIX)

    FIND_PATH(GEOTIFF_INCLUDE_DIR geotiff.h PATH_PREFIXES geotiff PATH /usr/include/geotiff)

    FIND_LIBRARY(GEOTIFF_LIBRARY NAMES ${GEOTIFF_NAMES})
Attached Thumbnails
Click image for larger version

Name:	Capture du 2018-03-08 05-38-11.png
Views:	83
Size:	84.5 KB
ID:	165676  
sailorF54 is offline   Reply With Quote
Reply

Tags
photo, plug


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
PhotoLayer plugin - Satellite GeoTiffs with transparency Rasbats OpenCPN 109 20-10-2023 00:27
opencpn windows cmake error ailton OpenCPN 1 09-08-2012 11:08
cmake -DCFLAGS="-O2 -march=native" ../ : WORKING ?? manuprenlair OpenCPN 2 11-06-2012 08:54
2.5.0: cmake error with language file: need help please manuprenlair OpenCPN 2 04-06-2012 08:41
CMake and Other Cross-Platform Issues bdbcat OpenCPN 22 10-06-2010 22:24

Advertise Here


All times are GMT -7. The time now is 09:36.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.