Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 22-06-2018, 02:08   #1
Registered User

Join Date: Jun 2018
Posts: 4
Errors with compile on RPi with Tiny Core Linux

Hi there!
I'm trying to compile OpenCPN on a Raspberry Pi running Tiny Core Linux. But I'm running into an error and I don't know the solution (yet).

Grabbed the OpenCPN 4.8.4 tar sources from github
Using PiCore (Tiny core) 9.0.3 ( Linux - 4.9.22-piCore-v7 - armv7l )

Running cmake is succesful after adding a symbolic link to make the wx header files findable.

A little while into make -j3 I get the following errors. Any help would be much appreciated!

(red color my emphasis: )
Code:
make[2]: Entering directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
[ 10%] Building CXX object CMakeFiles/S57ENC.dir/src/s52plib.cpp.o
make[2]: Leaving directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
make -f CMakeFiles/WXCURL.dir/build.make CMakeFiles/WXCURL.dir/build
/usr/local/bin/c++  -DLINUX_CRASHRPT -DTIXML_USE_STL -DUSE_GARMINHOST -DUSE_LZMA -DUSE_RENDER_CAIRO -DUSE_S57 -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__OCPN_USE_CURL__ -D__WXGTK__ -DocpnUSE_GL -DocpnUSE_SVG -DwxsvgUSE_EXIF -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/mygdal -I/usr/local/include -isystem /usr/local/lib/wx/include/gtk2-unicode-3.1 -isystem /usr/local/include/wx-3.1 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxcurl -I/usr/local/include/cairo -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVG -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVGXML -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/src -I/usr/local/include/freetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/nmea0183 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/garmin/jeeps -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/lz4 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/squish -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build/CMakeFiles/include  -Os -pipe -pthread -O3 -DNDEBUG   -Wall -Wno-unused -fexceptions -rdynamic  -g -fno-strict-aliasing  -DPREFIX=\"/usr/local\" -o CMakeFiles/S57ENC.dir/src/s52plib.cpp.o -c /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/s52plib.cpp
cc: error: unrecognized command line option '-msse2'
make[2]: *** [CMakeFiles/TEXCMP.dir/build.make:66: CMakeFiles/TEXCMP.dir/src/texcmp/lz4/lz4.c.o] Error 1
make[2]: Leaving directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
make[1]: *** [CMakeFiles/Makefile2:334: CMakeFiles/TEXCMP.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 10%] Building CXX object CMakeFiles/S57ENC.dir/src/s57chart.cpp.o
/usr/local/bin/c++  -DLINUX_CRASHRPT -DTIXML_USE_STL -DUSE_GARMINHOST -DUSE_LZMA -DUSE_RENDER_CAIRO -DUSE_S57 -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__OCPN_USE_CURL__ -D__WXGTK__ -DocpnUSE_GL -DocpnUSE_SVG -DwxsvgUSE_EXIF -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/mygdal -I/usr/local/include -isystem /usr/local/lib/wx/include/gtk2-unicode-3.1 -isystem /usr/local/include/wx-3.1 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxcurl -I/usr/local/include/cairo -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVG -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVGXML -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/src -I/usr/local/include/freetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/nmea0183 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/garmin/jeeps -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/lz4 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/squish -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build/CMakeFiles/include  -Os -pipe -pthread -O3 -DNDEBUG   -Wall -Wno-unused -fexceptions -rdynamic  -g -fno-strict-aliasing  -DPREFIX=\"/usr/local\" -o CMakeFiles/S57ENC.dir/src/s57chart.cpp.o -c /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/s57chart.cpp
make[2]: Entering directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
make[2]: Nothing to be done for 'CMakeFiles/WXCURL.dir/build'.
make[2]: Leaving directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
[ 12%] Built target WXCURL
[ 14%] Building CXX object CMakeFiles/S57ENC.dir/src/cm93.cpp.o
/usr/local/bin/c++  -DLINUX_CRASHRPT -DTIXML_USE_STL -DUSE_GARMINHOST -DUSE_LZMA -DUSE_RENDER_CAIRO -DUSE_S57 -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__OCPN_USE_CURL__ -D__WXGTK__ -DocpnUSE_GL -DocpnUSE_SVG -DwxsvgUSE_EXIF -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/mygdal -I/usr/local/include -isystem /usr/local/lib/wx/include/gtk2-unicode-3.1 -isystem /usr/local/include/wx-3.1 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxcurl -I/usr/local/include/cairo -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVG -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVGXML -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/src -I/usr/local/include/freetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/nmea0183 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/garmin/jeeps -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/lz4 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/squish -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build/CMakeFiles/include  -Os -pipe -pthread -O3 -DNDEBUG   -Wall -Wno-unused -fexceptions -rdynamic  -g -fno-strict-aliasing  -DPREFIX=\"/usr/local\" -o CMakeFiles/S57ENC.dir/src/cm93.cpp.o -c /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/cm93.cpp
In file included from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/s52plib.cpp:63:0:
/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/glChartCanvas.h:66:30: error: invalid use of incomplete type 'class wxGLCanvas'
 class glChartCanvas : public wxGLCanvas
                              ^~~~~~~~~~
In file included from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/s57chart.h:49:0,
                 from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/s52plib.cpp:41:
/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/ocpndc.h:54:7: note: forward declaration of 'class wxGLCanvas'
 class wxGLCanvas;
       ^~~~~~~~~~
make[2]: *** [CMakeFiles/S57ENC.dir/build.make:114: CMakeFiles/S57ENC.dir/src/s52plib.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/s57chart.cpp:73:0:
/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/glChartCanvas.h:66:30: error: invalid use of incomplete type 'class wxGLCanvas'
 class glChartCanvas : public wxGLCanvas
                              ^~~~~~~~~~
In file included from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/s57chart.h:49:0,
                 from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/s57chart.cpp:43:
/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/ocpndc.h:54:7: note: forward declaration of 'class wxGLCanvas'
 class wxGLCanvas;
       ^~~~~~~~~~
In file included from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/cm93.cpp:58:0:
/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/glChartCanvas.h:66:30: error: invalid use of incomplete type 'class wxGLCanvas'
 class glChartCanvas : public wxGLCanvas
                              ^~~~~~~~~~
In file included from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/s57chart.h:49:0,
                 from /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/cm93.cpp:41:
/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include/ocpndc.h:54:7: note: forward declaration of 'class wxGLCanvas'
 class wxGLCanvas;
       ^~~~~~~~~~
make[2]: *** [CMakeFiles/S57ENC.dir/build.make:186: CMakeFiles/S57ENC.dir/src/cm93.cpp.o] Error 1
make[2]: *** [CMakeFiles/S57ENC.dir/build.make:162: CMakeFiles/S57ENC.dir/src/s57chart.cpp.o] Error 1
make[2]: Leaving directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
make[1]: *** [CMakeFiles/Makefile2:186: CMakeFiles/S57ENC.dir/all] Error 2
make[1]: Leaving directory '/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build'
make: *** [Makefile:155: all] Error 2
tc@box:/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build$
__________________

Twist is offline   Reply With Quote
Old 22-06-2018, 02:34   #2
Registered User

Join Date: Jun 2018
Posts: 4
Re: Errors with compile on RPi with Tiny Core Linux

I can mannually run the offending cc line when I remove the -msse2 option.
But when I invoke make -j3 again, it will still redo the cc of lz4 with the -msse2 option. Do I need that option? And where/how do I switch it off?

Code:
/usr/local/bin/cc -DLINUX_CRASHRPT -DTIXML_USE_STL -DUSE_GARMINHOST -DUSE_LZMA -DUSE_RENDER_CAIRO -DUSE_S57 -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__OCPN_USE_CURL__ -D__WXGTK__ -DocpnUSE_GL -DocpnUSE_SVG -DwxsvgUSE_EXIF -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/mygdal -I/usr/local/include -isystem /usr/local/lib/wx/include/gtk2-unicode-3.1 -isystem /usr/local/include/wx-3.1 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxcurl -I/usr/local/include/cairo -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVG -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include/wxSVGXML -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/wxsvg/src -I/usr/local/include/freetype2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/nmea0183 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/garmin/jeeps -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/lz4 -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/squish -I/mnt/mmcblk0p3/prep/OpenCPN-4.8.4/build/CMakeFiles/include  -Os -pipe -O3 -DNDEBUG   -Wall -Wno-unused -fexceptions -rdynamic  -g -fno-strict-aliasing  -DPREFIX=\"/usr/local\" -O3 -msse2 -DSQUISH_USE_SSE=2 -fPIC -o CMakeFiles/TEXCMP.dir/src/texcmp/lz4/lz4.c.o   -c /mnt/mmcblk0p3/prep/OpenCPN-4.8.4/src/texcmp/lz4/lz4.c
__________________

Twist is offline   Reply With Quote
Old 22-06-2018, 03:00   #3
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 4,170
Re: Errors with compile on RPi with Tiny Core Linux

Most people must run Openplotter on a Pi these days?

Sailing with free hardware | Sailoog

Runs on stretch now, extremely powerful and well supported.
conachair is offline   Reply With Quote
Old 22-06-2018, 03:05   #4
Registered User

Join Date: Jun 2018
Posts: 4
Re: Errors with compile on RPi with Tiny Core Linux

I'm aware of OpenPlotter, but like the tiny footprint and other features of tiny core linux. Hence my attempt to compile from sources.
I just found this thread as well where 'tiny pilot' (sd image of just 60MB!) is mentioned.
Twist is offline   Reply With Quote
Old 22-06-2018, 03:33   #5
Registered User

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 4,170
Re: Errors with compile on RPi with Tiny Core Linux

Quote:
Originally Posted by Twist View Post
I'm aware of OpenPlotter, but like the tiny footprint and other features of tiny core linux. Hence my attempt to compile from sources.
I just found this thread as well where 'tiny pilot' (sd image of just 60MB!) is mentioned.
OK, though don't really see the point apart from some fun getting it working, if you have a Pi 3, it can easily handle openplotter with Opencpn and signalk plus all the other useful stuff it does. Mine stays on 24/7

conachair is offline   Reply With Quote
Old 22-06-2018, 08:00   #6
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,280
Re: Errors with compile on RPi with Tiny Core Linux

Twist....

The -msse2 option should only be invoked on x86 systems. So somehow the CMake recipe is incorrectly identifying your system architecture.

Let's see the output of a cmake invocation from scratch. Looking for:

Code:
"*** Build Architecture is ${ARCH}")
Dave
bdbcat is offline   Reply With Quote
Old 22-06-2018, 08:17   #7
Registered User

Join Date: Jun 2018
Posts: 4
Re: Errors with compile on RPi with Tiny Core Linux

thnaks bdbcat, you're absolutely correct, as I found out...
I'm learning as I go along. cmake checks for a couple of known linux distributions (not tiny core) and choses i386 otherwise.
I forced it arch to arm64 (or should that be armhf???)

The next problem then is wxWidgets as supplied by tiny core is compiled without OpenGL suppurt.

I may postpone my attempts until tiny core 10.x is released (currently in beta) so I can swicth to using a RPi3B+
Looks like I will have to compile wxWidgets, which I understand may take a while...

Just for the sake of it I've now set OpenGL to OFF in de cmake config and am trying to make opencpn without GL support.
Twist is offline   Reply With Quote
Old 22-06-2018, 12:13   #8
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 5,280
Re: Errors with compile on RPi with Tiny Core Linux

Twist...

I would select "armhf" as your arch target.

Don't fear compiling wxWidgets. Takes a couple of hours, but usually no problems with the correct config setup.

Keep us posted, and we can correct the CMake recipe for your distro.

Dave
__________________

bdbcat is offline   Reply With Quote
Reply

Tags
core, linux

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
compile error Linux Fedora Rawhide Lucodealethea OpenCPN 5 09-05-2016 18:00
OpenCPN Linux compile problems rvsjimbo OpenCPN 1 07-12-2013 16:31
Server Errors on the Server Errors thread Tom Stormcrowe Forum Tech Support & Site Help 11 24-08-2012 07:51
To balsa core or not to balsa core? fbchristo Multihull Sailboats 135 04-02-2009 15:13



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 21:12.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.