Cruisers Forum
 


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 24-02-2017, 08:41   #1
Registered User

Join Date: Feb 2017
Posts: 4
openCPN compile error

Hi,
I get the following compile error when trying to build openCPN:
/usr/bin/c++ -DLINUX_CRASHRPT -DOCPN_HAVE_X11 -DOCPN_USE_PORTAUDIO -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 -DwxDEBUG_LEVEL=0 -isystem /usr/lib64/wx/include/gtk2-unicode-3.0 -isystem /usr/include/wx-3.0 -I/git/OpenCPN/include -I/git/OpenCPN/src -I/git/OpenCPN/src/wxcurl -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/git/OpenCPN/src/wxsvg/include/wxSVG -I/git/OpenCPN/src/wxsvg/include/wxSVGXML -I/git/OpenCPN/src/wxsvg/include -I/git/OpenCPN/src/wxsvg/src -I/git/OpenCPN/src/nmea0183 -I/git/OpenCPN/src/mygdal -I/git/OpenCPN/src/garmin/jeeps -I/git/OpenCPN/src/texcmp/lz4 -I/git/OpenCPN/src/texcmp/squish -I/git/OpenCPN/build/CMakeFiles/include -pthread -O3 -DNDEBUG -Wall -Wno-unused -fexceptions -rdynamic -g -fno-strict-aliasing -DPREFIX=\"/usr/local\" -o CMakeFiles/NMEA0183.dir/src/nmea0183/nmea0183.cpp.o -c /git/OpenCPN/src/nmea0183/nmea0183.cpp
/git/OpenCPN/src/nmea0183/nmea0183.cpp: In member function ‘virtual bool NMEA0183::Parse()’:
/git/OpenCPN/src/nmea0183/nmea0183.cpp:302:8: error: ‘wxMRLNode’ was not declared in this scope
wxMRLNode *node = response_table.GetFirst();
^~~~~~~~~
/git/OpenCPN/src/nmea0183/nmea0183.cpp:302:19: error: ‘node’ was not declared in this scope
wxMRLNode *node = response_table.GetFirst();
^~~~
/git/OpenCPN/src/nmea0183/nmea0183.cpp: In member function ‘wxArrayString NMEA0183::GetRecognizedArray()’:
/git/OpenCPN/src/nmea0183/nmea0183.cpp:352:5: error: ‘wxMRLNode’ was not declared in this scope
wxMRLNode *node = response_table.GetFirst();
^~~~~~~~~
/git/OpenCPN/src/nmea0183/nmea0183.cpp:352:16: error: ‘node’ was not declared in this scope
wxMRLNode *node = response_table.GetFirst();
^~~~
make[2]: *** [CMakeFiles/NMEA0183.dir/build.make:114: CMakeFiles/NMEA0183.dir/src/nmea0183/nmea0183.cpp.o] Error 1


I use openSUSE Linux, have cloned the repository from github, added the neccesary extra packages with
$ zypper install git cmake gcc-c++ libstdc++-devel gtk2-devel wxWidgets-wxcontainer-devel gettext-runtime gettext-tools libbz2-devel gpsd-devel portaudio-devel tinyxml-devel libcurl-devel freeglut-devel rpm-build
(many were already installed),
ran cmake and started make with the mentioned error as result.

I checked for wxWidgets, I have wxWidgets-3_0-devel installed, with the header files in /usr/include/wx-3.0/wx, but grep did not produce any wxMRLNode in the files there.

Any suggestion on how to get rid of this error and complete the build?
Dnk1287 is offline   Reply With Quote
Old 24-02-2017, 09:14   #2
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: openCPN compile error

Your IDE cannot find the header file? Or something wrong with your wxWidgets?
I'm not a Linux guy nor a Suse guy.
wxMRLNode is declared in /src/nmea0183/nmea0183.hpp in line 146 here:
WX_DECLARE_LIST(RESPONSE, MRL);

Gerhard
CarCode is offline   Reply With Quote
Old 25-02-2017, 04:50   #3
Registered User

Join Date: Feb 2017
Posts: 4
Re: openCPN compile error

I don't use an IDE, but call make from a terminal.
The path to the header file (/usr/include/wx-3.0) is passed to the compiler; no compiler error about not finding the header file.

I don't see how wxMRLNode is declared in macro WX_DECLARE_LIST without a name like wxMRLNode (but me not seeing why is not the point).
Your reference to line 146 in src/nmea0183/nmea0183.hpp does not fit my nmea0183.hpp where it is in line 129. But that could be alright if you're version is not the same (I pulled from git yesterday).

I compile/build a lot on Linux (openSUSE) machines, but I have never before used wxWidgets. The package (wxWidgets3-3_0-devel) is of version 3.0.2-10.1 and I have libgtk-3-0 of version 3.22.8-1.1.
Dnk1287 is offline   Reply With Quote
Old 25-02-2017, 07:42   #4
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,207
Re: openCPN compile error

I would suspect a mess with wxWidgets-wxcontainer-devel vs. wxWidgets3-3_0-devel vs. whatever else you have pulled into your system - SuSE's wxWidget packages were always weird with their two flavours.
Anyway, the correct dependencies should be those defined as BuildRequires in the "official" OpenSuSE package spec file at https://build.opensuse.org/package/v....spec?expand=1

Pavel
nohal is offline   Reply With Quote
Old 25-02-2017, 09:58   #5
Registered User

Join Date: Feb 2017
Posts: 4
Re: openCPN compile error

OK, I'll check the complete spec (the build requirements are OK, the rest I haven't checked yet).
Dnk1287 is offline   Reply With Quote
Old 28-02-2017, 08:02   #6
Registered User

Join Date: Feb 2017
Posts: 4
Re: openCPN compile error

My reply from yesterday went wrong, so here is the second attempt:
I checked al the requirements listed in the openSUSE package spec.
Some packages I do not have installed:
OpenCPN-TC-Data - this package is not in the openSUSE repository;
libwx_gtk2u_media-suse1, libwx_gtk2u_propgrid-suse1, libwx_gtk2u_ribbon-suse1, libwx_gtk2u_richtext-suse1, libwx_gtk2u_stc-suse1, libwx_gtk2u_webview-suse1 - these packages are not in the openSUSE repository, but all libwx_...-suse3 are installed.

I also looked at the wxWidgets code; listimpl.cpp in particular. The macro WX_DEFINE_LIST for wxUSE_STD_CONTAINERS is applied, not the one for !wxUSE_STD_CONTAINERS and I can't find any creation of type wxMRLNode.
Dnk1287 is offline   Reply With Quote
Reply

Tags
enc, opencpn


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
OpenCPN compile error hyun3388 OpenCPN 14 21-10-2017 07:44
OpenCPN compile error hyun3388 OpenCPN 2 01-02-2017 12:47
Compile on VS 2010 with one error? Glen96 OpenCPN 3 07-12-2014 16:15
Fedora Compile Link Error oystercatcher OpenCPN 4 16-12-2010 15:37

Advertise Here


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


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.