QMapShack not longer working, Proj4 library incompatible after 20190314 update

I did update my Tumbleweed system this morning and after a reboot I tried to start QMapShack, but it refuses to start saying “QMapShack detected a badly installed Proj4 library”:

http://pix.toile-libre.org/upload/original/1552747056.png

Tried to search for the proj4 package (sudo zypper se proj4) but could not find it, only a perl-Geo-Proj4 package.

Installed that and executed a small test program:

#!/usr/bin/perl

use Geo::Proj4;
 
my $proj = Geo::Proj4->new(proj => "merc",
   ellps => "clrk66", lon_0 => -96)
     or die "parameter error: ".Geo::Proj4->error. "
";

my ($lat, $lon) = $proj->inverse(401717.80, 130013.88);

That runs fine, so it looks like the proj4 library is installed, only QMapShack is missing something that was available before the update.

Had a look in the QMapShack code:


    projPJ pjsrc = pj_init_plus("+init=epsg:32661");
    if(pjsrc == nullptr)
    {
        QMessageBox::critical(this, tr("Fatal...")
                              ,tr("QMapShack detected a badly installed Proj4 library. The translation tables for EPSG projections usually stored in /usr/share/proj are missing. Please contact the package maintainer of your distribution to fix it.")
                              ,QMessageBox::Close);

Tried


my $proj = Geo::Proj4->new(init => "epsg:32661") or die "parameter error: ".Geo::Proj4->error. "
";

But that gives me "parameter error: no arguments in initialization list’

So had a look at the https://proj4.org and saw that version 6.0.0 has been released and “projinfo” reveals I am running that. I read “PROJ 6 has undergone extensive changes” and that is not yet supported by QMapShack:

https://bitbucket.org/maproom/qmapshack/issues/438/support-for-proj-600

Is there any way to downgrade proj4?
Checking the YaST Software Management I see proj has no non-6.0.0 versions, but I have libproj13 installed than gives 5.2.0-31.6

how did you update?

Remind that

zypper dup

is the only supported way to update in Tumbleweed.

I did (and only do) update using “zypper dup”.

Looking at the YaST “Software Management” module I see:

https://pix.toile-libre.org/upload/original/1552810364.png

So three package for Proj4.0, looking at the File List, proj gives only executables and libproj[13/15] the library. libproj13 gives version 5 of the library an I think that should work.
Checked what qmapshack is using:


> ldd /usr/bin/qmapshack | grep libproj
        libproj.so.13 => /usr/lib64/libproj.so.13 (0x00007f9cedf70000)
        libproj.so.15 => /usr/lib64/libproj.so.15 (0x00007f9ce093c000)

That surprises me, two version of the same library required by qmapshack. Tried grepping for five different libraries (libk5crypto, libvorbisfile, libswresample, libsnappy, libnuma) and I see they only list one version.

Could this be the problem? I think you can edit the list of shared libraries, will check and if possible give that a try, only keeping libproj.so.13

On the ldd output:

The man page of ldd says:

A safer alternative when dealing with untrusted executables is:

       $ objdump -p /path/to/program | grep NEEDED
   Note, however, that this alternative shows only the direct dependencies of the executable, while ldd shows the entire dependency tree of the executable

So tried that:


> objdump -p /usr/bin/qmapshack | grep NEEDED
  NEEDED               libQt5Xml.so.5
  NEEDED               libQt5Sql.so.5
  NEEDED               libQt5WebEngineWidgets.so.5
  NEEDED               libQt5DBus.so.5
  NEEDED               libgdal.so.20
  NEEDED               libproj.so.13
  NEEDED               libroutino.so.0
  NEEDED               libquazip5.so.1
  NEEDED               libQt5PrintSupport.so.5
  NEEDED               libQt5Widgets.so.5
  NEEDED               libQt5Qml.so.5
  NEEDED               libQt5Network.so.5
  NEEDED               libQt5Gui.so.5
  NEEDED               libQt5Core.so.5
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6

That looks good only libproj.so.13, so not sure where that libproj.so.15 in the ldd output comes from

Other question: Would it be appropriate to open a bug on Show Application:Geo / qmapshack - openSUSE Build Service ?

Step further, found there is a lddtree command after “sudo zypper in pax-utils”.

That show the libproj.so.15 comes because libgdal.so.20 as linked by qmapshack does require libgeotiff.so.2 which requires libproj.so.15

Because of this I am not longer sure what is the exact problem, qmapshack requires libproj.so.13 which is Proj4 version 5.2.0-31.6 which should be fine I think.

Problem solved/worked-around by getting the latest QMapShack sources, compiling them and running the generated executable.
See also https://bitbucket.org/maproom/qmapshack/issues/438/support-for-proj-600

Installed proj5 despite file conflicts and got a working QMapShack.

Trying that I see:


> sudo zypper in proj5
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  proj5

1 new package to install.
Overall download size: 4.9 MiB. Already cached: 0 B. After the operation, additional 9.3 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Retrieving package proj5-5.2.0-1.1.x86_64                                                                                     (1/1),   4.9 MiB (  9.3 MiB unpacked)
Retrieving: proj5-5.2.0-1.1.x86_64.rpm ..........................................................................................................[done (1.7 MiB/s)]
Checking for file conflicts: ...............................................................................................................................[error]
Detected 11 file conflicts:

File /usr/bin/cct
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/bin/cs2cs
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/bin/geod
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/bin/gie
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/bin/proj
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/share/man/man1/cct.1.gz
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/share/man/man1/cs2cs.1.gz
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/share/man/man1/geod.1.gz
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/share/man/man1/gie.1.gz
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/share/man/man1/proj.1.gz
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File /usr/share/proj/ITRF2000
  from install of
     proj5-5.2.0-1.1.x86_64 (Application:Geo)
  conflicts with file from package
     proj-6.0.0-37.1.x86_64 (@System)

File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
Continue? [yes/no] (no): 

For now I said no and I am running QMapShack using a local compiled version with a recent git checkout.

Having the same problem with QMapShack on Tumbleweed (snapshot 20190426), I’m trying to compile QMapShack 1.13 (Log in with Atlassian account), although I’m not really familiar with compiling from sources…
I’m stuck at the point when configuration asks for PROJ4Config.cmake which I don’t know where to find.
Do I need to get a later QMapShack version in order to avoid the dependency on PROJ4?

I did not try building QMapShack myself anymore, the official release is working for me.


> sudo zypper info qmapshack
Information for package qmapshack:
----------------------------------
Repository     : Application:Geo                           
Name           : qmapshack                                 
Version        : 1.13.0-1.2                                
Arch           : x86_64                                    
Vendor         : obs://build.opensuse.org/Application:Geo  
Installed Size : 17.0 MiB                                  
Installed      : Yes                                       
Status         : out-of-date (version 1.13.0-1.1 installed)
Source package : qmapshack-1.13.0-1.2.src                  
Summary        : GPS data display                          
Description    :                                           
    QMapShack is a consumer grade software to work with data
    aquired by GPS devices. The data can be displayed on a
    variety of maps and stored in a database. Additionally
    new data can be created to plan your next trip.

So no need to build.

Thanks for the hint! I was not aware that QMapShack is available for Tumbleweed from Application:Geo. Since I’m using snapshots, I am a little hestitant to add non-snapshot repositories as this had caused some conflicts in the past. Anyway, with the limited amount of dependencies for QMapShack, I’ll give this a try.