SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
1. Install src2pkg
2. Install gpsd tinyxml libmspack portaudio and wxGTK from slackbuilds.org
3. Use src2pkg on opencpn source code to make a package and install it.
The link they give for information about src2pkg (http://www.src2pkg.net/) seems to have disappeared which makes me a bit nervous about proceeding. The link they give for the downloads (http://distro.ibiblio.org/amigolinux/download/src2pkg/)
is there but without more information I am not sure exactly what to download and how to proceed after downloading.
All of those dependencies are available over at www.slackbuilds.org. The easiest way to install packages from there is to use sbopkg. Here is a decent youtube video that shows you how to use sbopkg.
Once you get the hang of using sbopkg you can easily install all of those dependencies you listed very quickly. Once you have the dependencies installed, you can move to the next step of installing src2pkg, below is the link
install it as root using "installpkg src2pkg-3.0-noarch-2.txz" once its installed you will have to do one last step, run the setup utility like this "src2pkg --setup" Once that is complete src2pkg is ready to use.
change to the directory where you saved OpenCPN and build the package using this command "src2pkg -VV OpenCPN-4.4.0.tar.gz" let the process finish, it you get no errors you should be able to install the package using "installpkg /tmp/opencpn-4.4.0-x86_64-1.txz"
Thanks for your advice. I have been through the steps but there seems to be a problem. It may be an OpenCPN not a Slackware problem as the program starts by presenting a welcome window where you are asked to agree not to use the system for safety of life or property or you can click on cancel. If I click on OK the window disappears and nothing more happens. I have pasted the session below:
bash-4.3# opencpn
*** opencpn (wxWidgets 2.8.12) crashed ***, see backtrace!
0x839c039 in wxCrashPrint::Report() at ??:?
0xb70a2a15 in wxFatalSignalHandler at ??:0
0xb7773b94 in __kernel_sigreturn at ??:0
0xb72605bb in wxWindow::SetBackgroundStyle(wxBackgroundStyle) at ??:0
0x839f24a in glChartCanvas::glChartCanvas(wxWindow*) at ??:?
0x81b7138 in ChartCanvas::ChartCanvas(wxFrame*) at ??:?
0x8157f0a in MyApp::OnInit() at ??:?
0xb703ca73 in wxEntry(int&, wchar_t**) at ??:0
0xb703cb46 in wxEntry(int&, char**) at ??:0
0x81187db in main at ??:?
Aborted
bash-4.3#
All of the text after the command (bash-4.3# opencpn) only appears after I click OK. If I click on cancel it just takes me back to the bash-4.3# prompt without any other text.
It looks like it was a crash related to wxGTK. You may try to post your problem over at the OpenCPN forums if they have one. Or you could uninstall wxGTX and try wxGTK3 or wxPython instead. Both of those will work. I actually made a slackbuild of OpenCPN and submitted it to www.slackbuilds.org. It will be in the next release cycle. I also found that there are a couple of useful features you can add in at compile time so when it is released I would recommend building and installing it instead of just using src2pkg. But for now try uninstalling wxGTK and install either wxGTK3 or wxPython (not both!) and rebuild and install OpenCPN and see if that fixes the problem.
Thanks Daedra. I might well end up using your version when it gets into Slackbuilds. I installed the dependencies one at a time from Slackbuilds rather than using sbopkg and I forgot to edit the SlackBuild script for wxGTK as they suggest (add --enable-graphics_ctx
under .configure). So then I used the pkgtool Remove option to uninstall wxGTK. Then I edited the script and reninstalled it. It did occur to me that I may have failed to do that properly and might still have the unedited version installed. If that had happened I dont know if it would explain the crash that happens when I try and run opencpn.
Do you recommend the pkgtool Remove option for unsinstalling wxGTK?
Installing slackware and then various bits of software on it from slackbuilds has been a big boost for my linux skills but I am still quite unsure about a lot of what is happening. Now I seem to have files all over the place and am in a bit of a mess. I may reinstall slackware at some point and the various bits of software to try and make a neater job of it. Also if I did that I might aim for a better partition arrangement on the hard disk than the one I choose last time.
You can use pkgtool or you can just simply "removepkg wxGTK". If you used pkgtool to remove wxGTK before you rebuilt and reinstalled wxGTK with the --enable-graphics_ctx option you should be fine, there should not be any remains of the old package, is opencpn still crashing on you? Also you may want to remove the .opencpn folder in your home directory too. And the only real difference with the package I submitted to SBo is that I added a basic default map, documentation is built in, and tide & current data info. You can always check if a package is installed through pkgtool or from the command line by using "ls /var/log/packages | grep <packagename>".
One thing you made me realize is that I forgot to put the --enable-graphics_ctx requirement for wxGTK in my README for opencpn, I will make the changes and resubmit my slackbuild to SBo.
I can also say that I am using wxPython and OpenCPN does open Ok on my computer. I am trying to recreate the error you're having. Does it crash upon open for you?
From what you say I think I did uninstall wxGTK and reninstall it OK. I have just uninstalled it again and installed wxPython. This has not helped. I still get exactly the same crash. The was I described it before was
"...
the program starts by presenting a welcome window where you are asked to agree not to use the system for safety of life or property or you can click on cancel. If I click on OK the window disappears and nothing more happens. I have pasted the session below:
bash-4.3# opencpn
*** opencpn (wxWidgets 2.8.12) crashed ***, see backtrace!
0x839c039 in wxCrashPrint::Report() at ??:?
0xb70a2a15 in wxFatalSignalHandler at ??:0
0xb7773b94 in __kernel_sigreturn at ??:0
0xb72605bb in wxWindow::SetBackgroundStyle(wxBackgroundStyle) at ??:0
0x839f24a in glChartCanvas::glChartCanvas(wxWindow*) at ??:?
0x81b7138 in ChartCanvas::ChartCanvas(wxFrame*) at ??:?
0x8157f0a in MyApp::OnInit() at ??:?
0xb703ca73 in wxEntry(int&, wchar_t**) at ??:0
0xb703cb46 in wxEntry(int&, char**) at ??:0
0x81187db in main at ??:?
Aborted
bash-4.3#
All of the text after the command (bash-4.3# opencpn) only appears after I click OK.
"
For building and installing wxPython I used su -l. For all the other dependencies and the opencpn program itself I overlooked this and just used su. The SlackBuilds HOWTO sais "Note that for many builds, you will need to have a true login shell in order to have a correctly populated environment. Among other things, /usr/share/texmf/bin will not be in your PATH if you simply do "su" -- therefore, you will need to either use "su -l" when switching to root, or source the /etc/profile script after doing "su", or perhaps modifying /root/.bashrc to include necessary PATH elements."
I do not know what is meant by 'source the /etc/profile script'.
As far as I can tell you seem to be doing everything correctly, I am not sure why you are getting that crash. I've tried recreating your crash but it is working fine here. I would try posting your error over at the opencpn forums and see what they say.
I think I may have worked out the problem. Anyway I have finally got OpenCPN working. When I originally installed Slackware I did get an error message but I (probably stupidly) decided to ignore it. It was when install CD disk 2 was in the drive: I got the message "There was a fatal error attempting to install /var/log/mount/slackware/d/llvm-3.8.0-i586-2.txz".
I have just reinstalled Slackware but I downloaded disk 2 aganin and used a new disk. This time I got no error messages on installing. I then went through the install procedure for OpenCPN (using sbopkg this time) but otherwise the same as before. Now the opencpn command brings up the little window asking me to OK it and when I click OK instead of crashing it opens up the OpenCPN program. I now have to work out how to use OpenCPN but it looks as if the program is running properly which is great.
Thanks for your help. My next step would have been to contact the OpenCPN forum as you suggested.
Good to hear. And I've had similar errors when installing Slackware before. I've had corrupted packages that didn't install becasue of a bad ISO download, but it sounds like you got it going 100% now. BTW I changed the README for opencpn over at SBo to reflect that the wxGTK package provided at SBo does not include the --graphics_ctx option. So if you built opencpn against wxGTK you may run into a problem, I honestly don't know since I haven't really noticed any problems. However if you build it against wxGTK3 or wxPython the --enable-grahics_ctx option is included in those slackbuilds so that is what I am recommending people do.
When I started using opencpn I realized it had no background map. So I used Sbopkg to install the version that you put on Slackbuilds.org. I used wxGTK3. It took two attempts because (I think this is the reason) the first time I put opencpn at the top of the queue. When I put it at the bottom of the queue it finally installed ok. I guess the dependencies have to be installed first and then opencpn. I have been playing around with opencpn using the charts of the USA coastline. I now need to see if I can find some charts for the UK. Installing was a bit of a slog but I am not too bothered as it has sorted some things about using linux out in my mind.
For future reference, you can use sbopkg's sqg (slackbuild queue generator) script to generate a proper queue in the right order to build things. You can either do sqg -a, which will go through and generate all the queues for packages that have dependencies, but this can take a bit of time. If you're in a rush, you can just use sqg -p opencpn to generate the queue, then run sbopkg -i opencpn and select the queue option (rather than package), and let sbopkg do its thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.