Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 03-03-2018, 12:31   #1
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 936
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, 17:18   #2
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 936
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:	25
Size:	61.1 KB
ID:	165517  
__________________

sailorF54 is offline   Reply With Quote
Old 05-03-2018, 02:10   #3
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 936
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, 06:08   #4
Registered User

Join Date: May 2012
Posts: 533
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, 09:30   #5
Registered User

Join Date: May 2012
Posts: 533
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, 14:07   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 12,046
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, 15:45   #7
Registered User

Join Date: May 2012
Posts: 533
Re: Failure to cmake photolayer plugin...

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

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

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 936
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, 14:20   #9
Registered User

Join Date: May 2012
Posts: 533
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, 21:50   #10
Senior Cruiser
 
sailorF54's Avatar

Cruisers Forum Supporter

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 936
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:	19
Size:	84.5 KB
ID:	165676  
__________________

sailorF54 is offline   Reply With Quote
Reply

Tags
photo, plug

Thread Tools Search this Thread
Search this Thread:

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



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 20:49.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.