Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 15-06-2011, 02:51   #1
Registered User

Join Date: Jun 2010
Location: Västerås, Sweden
Boat: Albin 85 Cumulus
Posts: 7
OpenCPN@OpenSUSE 11.4/64

Hi,

As a user of OpenSUSE since a long time, I'd love to have a working installation of OpenCPN running. Only, I'm not used to compile from source so I will need some help from you guru's out there.
The goal will be to create a a working 1-2-3 step manual with necessary explanations for such newbies like me. I hope the outcome will generate a installable rpm for OpenSUSE 11.4/64 that can be downloaded from Download OpenCPN | Official OpenCPN Homepage as well as add necessary information at Compiling - Linux | Official OpenCPN Homepage for those who want's to try out this of different reasons.
I've started a similar task for OpenSUSE 11.2. Lack of time broke my goal to succeed but Jan from Germany did the work for OpenSUSE 11.3 as you can read here: OpenCPN on Suse 11.2

Many thanks for supporting these efforts, /Joakim
__________________

__________________
jbrosten is offline   Reply With Quote
Old 15-06-2011, 14:22   #2
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: OpenCPN@OpenSUSE 11.4/64

Hi,

I just succeeded building OpenCPN for openSUSE 11.4 x86_64

1. Install required packages (as root)
Code:
zypper install git cmake gcc-c++ libstdc++-devel gtk2-devel wxWidgets-wxcontainer-devel MesaGLw-devel gettext-runtime libbz2-devel
2. Then follow linux build process described here: Compiling - Linux | Official OpenCPN Homepage
Code:
git clone git://opencpn.git.sourceforge.net/gitroot/opencpn/opencpn
cd opencpn
mkdir build
cd build
cmake ../ -Dprefix=/usr -DARCH=x86_64
make package
__________________

__________________
SethDart is offline   Reply With Quote
Old 16-06-2011, 02:16   #3
Registered User

Join Date: Jun 2010
Location: Västerås, Sweden
Boat: Albin 85 Cumulus
Posts: 7
Re: OpenCPN@OpenSUSE 11.4/64

Magic !!
Compiling works just fine following SethDart's description above, super!!

Trying to install the rpm error message showes:
error: Failed dependencies:
wxGTK is needed by opencpn-2.3.1-1.x86_64
mesa-libGLU is needed by opencpn-2.3.1-1.x86_64
mesa-libGL is needed by opencpn-2.3.1-1.x86_64


1- wxGTK package can be installed via openSUSE 11.3 oss distribution but it reports:
Problem: libwx_baseu-2_8-0-wxcontainer-2.8.11-3.11.1.x86_64 obsoletes wxGTK <= 2.8.11.0 provided by wxGTK-2.8.10.1-11.2.x86_64
2- It seems like some Mesa-packages are already installed:
rpm -qa | grep Mesa
MesaGLw-7.8.2-2.1.x86_64
MesaGLw-devel-7.8.2-2.1.x86_64
Mesa-devel-7.10.2-7.3.1.x86_64
DirectFB-Mesa-1.4.5-14.2.x86_64
Mesa-7.10.2-7.3.1.x86_64
Mesa-32bit-7.10.2-7.3.1.x86_64

Now, is this a problem that needs to be solved or can I just force the installation of my created openCPN rpm-package?

In humble respect for the great knowledge in this by other sailors... ;-) /Joakim
__________________
jbrosten is offline   Reply With Quote
Old 16-06-2011, 02:37   #4
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: OpenCPN@OpenSUSE 11.4/64

RPM dependencies are defined in CMakeLists.txt
Unfortunately they are different between Fedora and openSuSE
We'll have to figure a way to define appropriate deps for the current distrib.

The line that need to be changed is:
Code:
CPACK_RPM_PACKAGE_REQUIRES
This should be enough:
Code:
CPACK_RPM_PACKAGE_REQUIRES "wxWidgets-wxcontainer MesaGLw libbz2"
__________________
SethDart is offline   Reply With Quote
Old 16-06-2011, 04:52   #5
Registered User

Join Date: Jun 2010
Location: Västerås, Sweden
Boat: Albin 85 Cumulus
Posts: 7
Re: OpenCPN@OpenSUSE 11.4/64

Quick answer SethDart, thanks,

But...

I've installed the packages for wxWidgets-wxcontainer and libbz2 as you stated in the beginning:
# rpm -qa | egrep "wxWidgets-wxcontainer|libbz2"
libbz2-1-1.0.6-6.11.x86_64
libbz2-devel-1.0.6-6.11.x86_64
wxWidgets-wxcontainer-devel-2.8.11-3.11.1.x86_64

It still complains that required packages are missing:
# rpm -ivh ./opencpn_2.3.1-1_x86_64.rpm
error: Failed dependencies:
wxWidgets-wxcontainer is needed by opencpn-2.3.1-1.x86_64
libbz2 is needed by opencpn-2.3.1-1.x86_64

Just trying to install these fails because they doesn't seem to be included in openSUSE 11.3/4 oss distr.:
# zypper in libbz2 wxWidgets-wxcontainer
Loading repository data...
Reading installed packages...
'libbz2' not found in package names. Trying capabilities.
No provider of 'libbz2' found.
'wxWidgets-wxcontainer' not found in package names. Trying capabilities.
No provider of 'wxWidgets-wxcontainer' found.

Nothing to do.

These are my repositories:
# zypper lr
# | Alias | Name | Enabled | Refresh
---+----------------------------------+----------------------------------+---------+--------
1 | 11.4 - VideoLan | 11.4 - VideoLan | No | No
2 | DraftSight | DraftSight | Yes | Yes
3 | KDE:Release:46 | KDE:Release:46 | Yes | Yes
4 | OpenCPN-2.3.1 | OpenCPN-2.3.1 | Yes | Yes
5 | Packman Repository | Packman Repository | Yes | Yes
6 | Updates-for-openSUSE-11.4-11.4-0 | Updates for openSUSE 11.4 11.4-0 | Yes | Yes
7 | openSUSE-11.3 | openSUSE-11.3 | Yes | No
8 | openSUSE-11.4-11.4-0 | openSUSE-11.4-11.4-0 | Yes | Yes
9 | repo-debug | openSUSE-11.4-Debug | No | Yes
10 | repo-debug-update | openSUSE-11.4-Update-Debug | No | Yes
11 | repo-non-oss | openSUSE-11.4-Non-Oss | Yes | Yes
12 | repo-source | openSUSE-11.4-Source | No | Yes

Shouldn't necessary files be included in the dev-packeges? I'm not following here...

/Joakim
__________________
jbrosten is offline   Reply With Quote
Old 16-06-2011, 06:41   #6
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: OpenCPN@OpenSUSE 11.4/64

I'm sorry, my reply was probably not clear enough :-(

When the rpm is built, it contains a header to describe dependency: a list of packages/features required for this software to run.

Unfortunately these dependencies are different between Fedora and openSuse.

Right now, Fedora's dependencies are included in rpm header, not openSuSE's even if it's build on openSuSE.

So, either you change the appropriate line in opencpn/CmakeLists.txt and rebuild the rpm with the appropriate depandency for openSuSE ; or you can install OpenCPN directly:
(as root)
Code:
cd $pathto/opencpn/build/
make install
__________________
SethDart is offline   Reply With Quote
Old 16-06-2011, 07:31   #7
Registered User

Join Date: Jun 2010
Location: Västerås, Sweden
Boat: Albin 85 Cumulus
Posts: 7
Re: OpenCPN@OpenSUSE 11.4/64

No worries,
I'm the one lacking competence in this area. Source files, header files, it's really not clear for me though I've starting to see some structure buts it's a long sail to safe harbor yet...

I did run "make install" and it gets installed and working, many thanks for this. Time to add some charts and connect GPS and AIS. Looking forward to that.

If you find strength to enlighten me a little bit further in this matter; Compiling a rpm in a openSUSE system will not include the necessary dependencies, only telling the system witch ones they are right? Then it's up to the systems sw installation application to also include the dependents?
__________________
jbrosten is offline   Reply With Quote
Old 17-06-2011, 02:14   #8
Registered User

Join Date: Mar 2010
Location: Normandy, France
Boat: Flush Poker, 8.25m (Point Barre)
Posts: 335
Re: OpenCPN@OpenSUSE 11.4/64

Well a rpm is (sort of) an archive with more informations embedded to describe for example packages required for this one to run.
The name on these dependencies is different between Fedora and openSuSE
These informations are defined in opencpn/CMakeLists.txt and not auto-magically adjusted for the distro we are building on.
That means the rpm is built on openSuSE, compiled with the appropriate requirments (the ones you installed with "zypper" above) but when creating the rpm, the informations embedded for dependencies are wrong. You should be able to install the rpm: there must be an option to zypper to force install without resolving dependencies, and it'll run fine but if you remove one of these dependencies, the system will not know OpenCPN depends on it and it'll be broken.

I'll try to figure a way to get it right and send a patch
__________________
SethDart is offline   Reply With Quote
Old 17-06-2011, 02:22   #9
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,020
Re: OpenCPN@OpenSUSE 11.4/64

Seth...
a while ago, after looking at the way to make wx work on SuSE, I came up with
Code:
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)
Could probably be made better, but perhaps you can use some of it...

Cheers

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 2.3.0 dlymn OpenCPN 3 29-06-2011 02:44
Need OpenCPN Help piedamer OpenCPN 6 14-05-2011 12:23
Help with OpenCPN moggie OpenCPN 4 15-02-2011 17:18
Help with OpenCPN moggie Marine Electronics 1 10-02-2011 07:26
OpenCPN bdbcat OpenCPN 1343 19-09-2009 16:59



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 02:30.


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.