You are not logged in.

#1 2020-09-14 00:29:08

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Opencpn and Opencpn-git errors (may be related to wxWidgets)

Every effort to install opencpn or opencpn-git has failed, for a month at least. 

On the aur comment sections are various suggestions that are claimed to have worked.

Is there something simple about this package before I post something more extensive?

Alan Davis

Offline

#2 2020-09-14 02:32:28

loqs
Member
Registered: 2014-03-06
Posts: 12,091

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

Do you literally mean the issue is in installing the built package?  Or the issue is building the package? Or something else?

Offline

#3 2020-09-15 07:27:10

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

I have not tried to build from source.  Neither of the two PKGBUILDs build for me, neither opencpn nor opencpn-git .   I had a similar experience on Manjaro, one of the reasons I installed Arch.  Something crazy is going on with wxWidgets---which is not a package itself, rather there are some others like wxgtk3 or wxgtk2.   Comments on the AUR pages include one claiming that if wxwidgets is built from upstream, then opencpn installs.  I'm not sure which one. 

IIRC both opencpn and opencpn-git packages download from git.

Thank you for responding,

Alan

Offline

#4 2020-09-15 07:28:03

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

To clarify, I am using yay to install AUR pkgs.   pacaur will not install these either. 

A

Offline

#5 2020-09-15 13:54:35

a821
Member
Registered: 2012-10-31
Posts: 202

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

lngndvs wrote:

Is there something simple about this package before I post something more extensive?

Could you do that?

Did you try building with `makepkg`? Maybe try building in a clean chroot. `opencpn` builds fine in a clean chroot at least for me.

Offline

#6 2020-09-18 02:13:02

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

I am working on building in the chroot method you linked to.

I suspect the biggest issue is wxWidgets.  One comment in AUR suggested that available wxWidgets are compiled with another version of  GCC( gcc-10, I think).   WxWidgets seems to be called by other names, such as wxgtk3 or wxgtk3-dev.  I have tried reinstalling all of them.  When reading through the instructions to do a chroot build, there is a suggestion to install dependencies in the Chroot as well.   I am not sure this is correct, and if it is, not sure how to make sure the version installed there is the correct one (compiled with the correct version of GCC, for example) required by the PKGBUILD or the upstream source.   

I think I can get this done with a little guidance.  As of now, I am trying to blunder my way through the process, by installing wxgtk3-dev, which is compiled on this system when installed. 

Thanks by the way for your suggestion.

Alan

Offline

#7 2020-09-18 02:17:19

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

In face, I have run the commend to build the package opencpn-git in $CHROOT.   The same error is encountered:

CMake Error at CMakeLists.txt:813 (message):
  Cannot run wxWidgets version test (!)


-- Configuring incomplete, errors occurred!
See also "/build/opencpn-git/src/opencpn-git/build/CMakeFiles/CMakeOutput.log".
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /home/mork/chroot/mork/build

Offline

#8 2020-09-18 10:36:20

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,587

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

Like a821 I build opencpn , NOT opencpn-git  in a clean chroot without problems.

Don't add specific dependencies to the chroot, let it use webkit2gtk & wxgtk3 from repos.


Try building opencpn the same way. If it fails post the logs.


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#9 2020-09-18 12:13:45

loqs
Member
Registered: 2014-03-06
Posts: 12,091

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

It is an issue with opencpn-git only looking for wx-config instead of wx-config-gtk3

git diff
diff --git a/PKGBUILD b/PKGBUILD
index b327052..3b522f2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 # ---------------------------------------------------------------
 
 pkgname=opencpn-git
-pkgver=5.2.0.r42.g14628ba0e
+pkgver=5.2.0.r94.g69c30afcf
 pkgrel=1
 pkgdesc="Open Source Chart Plotting / Marine Navigation - Git version"
 arch=('x86_64' 'aarch64')
@@ -25,7 +25,9 @@ pkgver() {
 }
 
 prepare() {
-  cd $pkgname
+  export PATH="$PWD/bin:$PATH"
+  mkdir bin
+  ln -s /usr/bin/wx-config-gtk3 bin/wx-config
 }
 
 build() {

Offline

#10 2020-09-19 03:58:32

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

Thank you Lone_Wolf and loqs.

I was able to install opencpn via the chroot method.  It was not difficult.  I would love to understand why this works. though probably this will have to wait.

It ran via the command line.  But the following messages spewed forth:

###############################
$ opencpn
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
connect(2) call to /dev/shm/jack-1004/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
20:46:26: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1013,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1014,wx containers,compatible with 2.8).
#####################################

Perhaps this is unrelated.  I cannot understand why alsa is needed by Opencpn.

Loqs:   Does this mean I could download the PKGBUILD, edit, then install in the same chroot method?   Seems doable.   

I would like to have to latest version of Opencpn.  5.2 is good, but just in case, the git pkg may have some changes.  My interest is in the tides interface using xtide. 

Nice to have it installed.

Offline

#11 2020-09-19 05:50:04

loqs
Member
Registered: 2014-03-06
Posts: 12,091

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

Ingndvs yes,  or apply the diff:

git clone https://aur.archlinux.org/opencpn-git.git
cd opencpn-git/
git apply -v PKGBUILD.diff
Checking patch PKGBUILD...
Applied patch PKGBUILD cleanly.

Offline

#12 2020-09-21 19:25:41

lngndvs
Member
Registered: 2012-08-28
Posts: 14

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

I have been able to build opencpn-git and opencpn both using this method.  The patched opencpn-git built.  I installed it with "yay -U ./<filename>.  But it did not run.  The following errors were thrown:

#########################
~/opencpn-git$ opencpn
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
connect(2) call to /dev/shm/jack-1004/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
12:12:46: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1013,wx containers,compatible with 2.8),_user_manual_3Agetting_started_3Aop
and your program used 3.0 (wchar_t,compiler with C++ ABI 1014,wx containers,compatible with 2.8).kg/opencpn-git/usr/share/opencpn/do
c/opencpn/manual
(opencpn:284573): Gdk-ERROR **: 12:12:46.305: The program 'opencpn' received an X Window System error..2e157a_w.19.jpg
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 326 error_code 2 request_code 151 (GLX) minor_code 24)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)
########################

First of all, I am surprised that ALSA lib is required. 

I was able to run opencpn successfully, though there may have been some issues with alsa.  For now, for my purposes. I am satisfied; but would like to be able to run the development version.

Thank you for all the help.  Should this be marked SOLVED?

Alan

Offline

#13 2020-09-21 20:59:38

loqs
Member
Registered: 2014-03-06
Posts: 12,091

Re: Opencpn and Opencpn-git errors (may be related to wxWidgets)

Without the backtrace from the core dump preferably with debug symbols I have no idea on the cause of the error.
Please use code tags for commands and their outputs.

Offline

Board footer

Powered by FluxBB