Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 14-05-2011, 12:00   #1
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Question Libgps19-devel for SuSe 11.4

Hi,

there are two guys of the German community who have difficulties to compile the latest beta (506) for SuSe 11.4 linux.

Mainly the libgps19-devel package seems to be missing and causing the trouble.

Here is the error report:
Code:
[ 1%] Building CXX object CMakeFiles/GARMINHOST.dir/src/garmin/jeeps/garmin_wrapper.cpp.o
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp: In function  ‘int Garmin_GPS_SendWaypoints(ComPortManager*, wxString&,  RoutePointList*)’:
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp:96:13: error: ‘wxRoutePointListNode’ was not declared in this scope
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp:96:35: error: ‘node’ was not declared in this scope
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp: In function  ‘GPS_SWay** Garmin_GPS_Create_A200_Route(Route*, int, int*)’:
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp:164:13: error: ‘wxRoutePointListNode’ was not declared in this scope
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp:164:35: error: ‘node’ was not declared in this scope
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp: In function  ‘GPS_SWay** Garmin_GPS_Create_A201_Route(Route*, int, int*)’:
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp:226:19: error: ‘wxRoutePointListNode’ was not declared in this scope
/home/andreas/opencpn/src/garmin/jeeps/garmin_wrapper.cpp:226:41: error: ‘node’ was not declared in this scope
make[2]: *** [CMakeFiles/GARMINHOST.dir/src/garmin/jeeps/garmin_wrapper.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/GARMINHOST.dir/all] Fehler 2
make: *** [all] Fehler 2
As I am a Windows-only user I am unable to help them.
Maybe one of you Linux guys here has an idea how to solve the problem(s)?

Many thanks in advance.

Gunther
__________________

__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 14-05-2011, 14:28   #2
Registered User

Join Date: Dec 2005
Location: WNA
Boat: Dufour 35
Posts: 3,247
Re: libgps19-devel for SuSe 11.4

Gunther

I have never tried Suse, so his may be a stab in the dark....
On Ubuntu the package is called libgps-dev ... nothing else.

Looking at the actual errors.... Do these guys have wx/list.h from the package wx2.8-headers installed. OK, the package name is probably different but they must have wx/list.h installed.

To find out
Quote:
locate wx/list.h
On my box I get
Quote:
/usr/include/wx-2.8/wx/list.h
Thomas
__________________

__________________
cagney is offline   Reply With Quote
Old 15-05-2011, 01:58   #3
Registered User

Join Date: Jan 2011
Location: France
Boat: Several boat rented for weeks
Posts: 9
Re: libgps19-devel for SuSe 11.4

Last version build right on my opensuse 11.4. So if I could help you in some way, make me know it.
__________________
cray is offline   Reply With Quote
Old 16-05-2011, 02:22   #4
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: libgps19-devel for SuSe 11.4

cray ...
Quote:
Originally Posted by cray View Post
Last version build right on my opensuse 11.4. So if I could help you in some way, make me know it.
What additional packages do they have to install (and where to get them)?
It seems that there are some additional packages needed which are not included in the original distro.

But as I am a Windows-only user I do not have any knowledge about the Linux stuff at all.

Many thanks for your help (and patience )

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 16-05-2011, 02:30   #5
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: libgps19-devel for SuSe 11.4

Thomas ...

Quote:
Originally Posted by cagney View Post
Looking at the actual errors.... Do these guys have wx/list.h from the package wx2.8-headers installed. OK, the package name is probably different but they must have wx/list.h installed.
Here is the (translated) answer from one of the guys:
Quote:
I also find the wx/list.h file in /usr/include/wx-2.8/wx/list.h!
It is contained in the 'wxWidgets-devel' package.

Also the 'libgps19' is installed on my system. In the description is written that it is for development purposes. So I had been wondering why there still is an extra libgps19-devel.
Any further idea?

Thanks
Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 16-05-2011, 02:48   #6
Registered User

Join Date: May 2011
Posts: 3
Re: Libgps19-devel for SuSe 11.4

Hi there,

opencpn seems to was written without STL support.
But OS11.4 WX comes with stl in default.
Install wxWidgets-ansi-devel instead of wxWidgets-devel.

The zypper command for OS11.4 should be:
zypper in wxWidgets-ansi-devel gpsd-devel libgweather-devel gtk2-devel gcc-c++ make cmake automake freeglut-devel
__________________
tantalus1983 is offline   Reply With Quote
Old 16-05-2011, 03:14   #7
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: Libgps19-devel for SuSe 11.4

tantalus1983 ...

Quote:
Originally Posted by tantalus1983 View Post
Install wxWidgets-ansi-devel instead of wxWidgets-devel.
Thanks for your reply.
Just one additional question (don't know if it is a point of interest anyway):
Is it correct to use the ANSI version or do they have to install the Unicode version (which is AFAIK also available) instead?

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 16-05-2011, 03:40   #8
Registered User

Join Date: May 2011
Posts: 3
Re: Libgps19-devel for SuSe 11.4

Hi,

are you sure?

i just get wxWidgets-ansi-devel, wxWidgets-devel, wxWidgets-wxcontainer-devel. Maybe wxcontainer will work, haven't tried...

Additionally, RPM building is broken.
I had to change in CMakeLists.txt from SET(ARCH "i386") to SET(ARCH "x86_64" (if you are on x64). And then still the dependencies are not right. You'll have to install with rpm --nodeps. I can send my .rpm i just built.
__________________
tantalus1983 is offline   Reply With Quote
Old 16-05-2011, 03:55   #9
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Libgps19-devel for SuSe 11.4

Isn't ANSI referring to ANSI C rather than the character encoding in this case?
For architecture, see OpenCPN Version 2.4 Beta Build 506
The arch autodetection is done in my github repo, hopefully included upstream one day.
Can you be more specific about the dependencies problem, probably shouldn't be hard to fix.

Pavel
__________________
nohal is offline   Reply With Quote
Old 16-05-2011, 04:12   #10
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Libgps19-devel for SuSe 11.4

Well, it's character encoding... openSUSE:Packaging wxWidgets - openSUSE
__________________
nohal is offline   Reply With Quote
Old 16-05-2011, 07:14   #11
Registered User

Join Date: May 2011
Posts: 3
Re: Libgps19-devel for SuSe 11.4

why don't you use 'uname -i'? should work on any rather new linux distro

as it turns out, it also builds with wx container (or: it build except with stl).

another problem still exists:
rpmbuild (or cmake?) also lists the needed .so files. but opensuse installs its libwx stuff in /usr/lib64/wx-2.8-wxcontainer/.
so when installing my rpm, i get a lot of wx failed dependencies. how configure the rpm to look for dependant libraries in that subdir?
__________________
tantalus1983 is offline   Reply With Quote
Old 16-05-2011, 07:27   #12
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Libgps19-devel for SuSe 11.4

uname does not work for example in 32 chroot environments on 64bit machines - a lot of discussion about that amongst cmake people... The detection is possible, no problem, the patch to do it is ready at https://github.com/nohal/OpenCPN/blo...CMakeLists.txt

Will have a look at the rest - even -wxcontainer libs are supposed to be deprecated on openSUSE:Packaging wxWidgets - openSUSE so we should probably do something "systematic" about it...

Pavel
__________________
nohal is offline   Reply With Quote
Old 16-05-2011, 11:42   #13
Registered User
 
Netsurfer's Avatar

Join Date: Jan 2010
Location: Cologne, Germany
Boat: Beneteau Oceanis 331
Posts: 557
Re: Libgps19-devel for SuSe 11.4

Hi,

just a short feedback:
Using the wxWidgets-container-devel package instead of the wxWidgets-devel one solved the problems.

Thanks to all for your help!

Gunther
__________________
Deutschsprachige Community- und Support-Website unter OpenCPN.de
Netsurfer is offline   Reply With Quote
Old 16-05-2011, 11:43   #14
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Libgps19-devel for SuSe 11.4

I'm in no way SuSE or RPM expert, but just had a look at fresh 11.4 virtual machine and the following did the trick...
Install the prerequisites:
Code:
sudo zypper in git cmake gcc-c++ wxWidgets-wxcontainer-devel libbz2-devel gpsd-devel
Replace CMakeLists.txt with https://github.com/nohal/OpenCPN/raw...CMakeLists.txt or patch with:
Code:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85805c2..d081a81 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,11 +73,31 @@ SET(PREFIX_INCLUDE include)
 SET(PREFIX_DATA share)
 SET(PREFIX_PKGDATA ${PREFIX_DATA}/${PACKAGE_NAME})
 IF (NOT ARCH)
-    SET(ARCH "i386")
+ INCLUDE(CheckTypeSize)
+ IF (NOT WIN32)
+  SET( AMD64STR "amd64" )
+  IF(EXISTS /etc/redhat-release)
+   SET( AMD64STR "x86_64" )
+  ENDIF(EXISTS /etc/redhat-release)
+  IF(EXISTS /etc/suse-release OR EXISTS /etc/SuSE-release)
+   SET( AMD64STR "x86_64" )
+  ENDIF(EXISTS /etc/suse-release OR EXISTS /etc/SuSE-release)
+  IF( CMAKE_SIZEOF_VOID_P MATCHES "8" )
+   SET( ARCH ${AMD64STR} )
+   MESSAGE("amd64 detected...")
+  ELSE( CMAKE_SIZEOF_VOID_P MATCHES "8" )
+   SET( ARCH "i386" )
+   MESSAGE("i386 detected")
+  ENDIF( CMAKE_SIZEOF_VOID_P MATCHES "8" )
+ ELSE (NOT WIN32)
+  #on WIN32 probably CMAKE_SIZEOF_VOID_P EQUAL 8, but we don't use it at all now...
+  SET (ARCH "i386")
+ ENDIF (NOT WIN32)
 ENDIF (NOT ARCH)
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
 
+
 # require proper c++
 #ADD_DEFINITIONS( "-Wall -ansi -pedantic -Wno-variadic-macros" )
 #TODO: Should we use  -fno-stack-protector
@@ -114,6 +134,13 @@ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
 
 FIND_PACKAGE(Gettext REQUIRED)
 
+IF(UNIX)
+FIND_PACKAGE(BZip2 REQUIRED)
+INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR})
+FIND_PACKAGE(ZLIB REQUIRED)
+INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
+ENDIF(UNIX)
+
 # For convenience we define the sources as a variable. You can add 
 # header files and cpp/c files and CMake will sort them out
 
@@ -503,6 +530,8 @@ IF(UNIX)
 TARGET_LINK_LIBRARIES(${PACKAGE_NAME}
       ${OPENGL_LIBRARIES}
       ${GETTEXT_LIBRARY}
+      ${BZIP2_LIBRARIES}
+      ${ZLIB_LIBRARY}
 )
 ENDIF(UNIX)
 
@@ -766,7 +795,12 @@ IF(UNIX)
     SET(CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous")
     SET(CPACK_RPM_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
     SET(CPACK_RPM_PACKAGE_ARCHITECTURE  ${ARCH})
-    SET(CPACK_RPM_PACKAGE_REQUIRES  "wxGTK mesa-libGLU mesa-libGL gettext zlib bzip2")
+    IF(EXISTS /etc/suse-release OR EXISTS /etc/SuSE-release) 
+     SET(CPACK_RPM_PACKAGE_REQUIRES  "gettext zlib bzip2")
+     SET(CPACK_RPM_SPEC_MORE_DEFINE "%if %suse_version >= 1140\n%define _use_internal_dependency_generator 0\n%define __find_requires %wx_requires\n%endif")
+    ELSE(EXISTS /etc/suse-release OR EXISTS /etc/SuSE-release)
+     SET(CPACK_RPM_PACKAGE_REQUIRES  "wxGTK mesa-libGLU mesa-libGL gettext zlib bzip2")
+    ENDIF(EXISTS /etc/suse-release OR EXISTS /etc/SuSE-release)
     SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An OpenSource Chart Plotter/Navigator")
     SET(CPACK_PACKAGE_DESCRIPTION "OpenCPN is a concise ChartPlotter/Navigator. The application supports: GPS/GPDS Position Input, BSB Raster Chart Display, S57 Vector ENChart Display, AIS Input Decoding, Waypoint Autopilot Navigation .")
     SET(CPACK_SET_DESTDIR ON)
diff --git a/plugins/grib_pi/CMakeLists.txt b/plugins/grib_pi/CMakeLists.txt
index 6b998c0..7754747 100644
--- a/plugins/grib_pi/CMakeLists.txt
+++ b/plugins/grib_pi/CMakeLists.txt
@@ -79,6 +79,9 @@ SET(SRC_GRIB
             src/GribRecord.cpp  

             src/zuFile.cpp 

             src/IsoLine.cpp 

+)

+IF(NOT UNIX)

+    SET(SRC_GRIB ${SRC_GRIB}

             src/bzip2/bzlib.c 

             src/bzip2/blocksort.c 

             src/bzip2/compress.c 

@@ -86,11 +89,15 @@ SET(SRC_GRIB
             src/bzip2/decompress.c 

             src/bzip2/huffman.c 

             src/bzip2/randtable.c

-    )

+)

+ENDIF(NOT UNIX)

+

 ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_GRIB})

 

-INCLUDE_DIRECTORIES(${PLUGIN_SOURCE_DIR}/src/zlib-1.2.3)

-INCLUDE_DIRECTORIES(${PLUGIN_SOURCE_DIR}/src/bzip2)

+IF(NOT UNIX)

+  INCLUDE_DIRECTORIES(${PLUGIN_SOURCE_DIR}/src/zlib-1.2.3)

+  INCLUDE_DIRECTORIES(${PLUGIN_SOURCE_DIR}/src/bzip2)

+ENDIF(NOT UNIX)

 

 IF(WIN32)

   SET(OPENCPN_IMPORT_LIB "../../${CMAKE_CFG_INTDIR}/${PARENT}")
Build as normal with
Code:
mkdir build && cd build && cmake .. && cmake --build . --target package
And install the product with
Code:
sudo zypper in opencpn_2.4.506-1_i386.rpm
64-bit build should be auto-detected if my patch works... I'm not sure what will it do dependency-wise on older suse versions, but this is how I understood the packaging docs posted earlier.

Pavel
__________________

__________________
nohal 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
OpenCPN on Suse 11.2 sy-Aldebaran OpenCPN 16 15-06-2011 10:54
Compiling Under PowerPC - Missed libgps19 adolfogal OpenCPN 5 14-10-2010 13:56



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 10:48.


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.