Bug#928986: CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:

2019-05-23 Thread Juhani Numminen
Control: forwarded -1 https://github.com/CloudCompare/CloudCompare/pull/920
Control: tag -1 patch fixed-upstream

I submitted a pull request and it was accepted. For the patch, please see:

https://github.com/CloudCompare/CloudCompare/commit/a14028ca622e6832b85f5ef3a5b76ff7f7ab76bb.patch


Juhani



Bug#928986: CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:

2019-05-16 Thread Juhani Numminen
Hi everyone,

Thank you Bernhard for the problem analysis. For fixing the bug
upstream, I have a remark about the CMAKE_INSTALL_LIBDIR variable.

Bernhard Übelacker kirjoitti 16.5.2019 klo 0.43:

> I found this file in which CMAKE_INSTALL_RPATH gets set:
>   ./CMakeLists.txt:34:set(CMAKE_INSTALL_RPATH 
> "${CMAKE_INSTALL_LIBDIR}/cloudcompare")
> 
> As far as I see CMAKE_INSTALL_LIBDIR is given by dh_auto_configure
> and therefore may be meant to be a relative path.

Looking at the documentation for GNUInstallDirs, CMAKE_INSTALL_*DIR
variables can be "passed to the DESTINATION options of install()
commands."[1] In that case, either relative or absolute path is accepted.
"If a full path (with a leading slash or drive letter) is given it is
used directly. If a relative path is given it is interpreted relative
to the value of the CMAKE_INSTALL_PREFIX variable."[2]

Cloudcompare does not actually use GNUInstallDirs but it does share the
variable names and therefore user expectations.

This is why I think that in general, one can not assume that
CMAKE_INSTALL_LIBDIR is either absolute or relative. Original upstream
code does the former while the proposed patch does the latter.

> +++ cloudcompare-2.10.1/CMakeLists.txt
> - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}/cloudcompare")
> + set(CMAKE_INSTALL_RPATH 
> "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cloudcompare")

My solution is to use the module GNUInstallDirs. It conveniently provides
CMAKE_INSTALL_FULL_LIBDIR which is absolute and could be used for the rpath.
Pseudo diff of the suggested changes:

+include(GNUInstallDirs)

-   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}/cloudcompare")
+   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}/cloudcompare")

Adopting GNUInstallDirs may induce some other bugs so it is not necessarily
appropriate for the frozen Buster, but for the upstream project I think it
is worth it.  In any case, my pseudo patch is untested and one should
carefully examine the installation phase if it is applied.

Regards,
Juhani

[1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
[2] https://cmake.org/cmake/help/latest/command/install.html#introduction



Bug#928986: CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:

2019-05-15 Thread Bernhard Übelacker
Dear Maintainer,
I just tried to have a look and might found something.


As far as I see ldd searches the shared objects based on the RPATH in
the executable:

benutzer@debian:~$ ldd /usr/bin/CloudCompare | grep "not found"
libQCC_IO_LIB.so => not found
libQCC_DB_LIB.so => not found
libCC_CORE_LIB.so => not found

benutzer@debian:~$ chrpath /usr/bin/CloudCompare 
/usr/bin/CloudCompare: RUNPATH=lib/x86_64-linux-gnu/cloudcompare


I tried to find a similar situation in another binary and found paplay:

benutzer@debian:~$ chrpath -l /usr/bin/paplay
/usr/bin/paplay: RUNPATH=/usr/lib/x86_64-linux-gnu/pulseaudio


So I guess this relative path in CloudCompare seems to be the issue.
This seems to be set when installed to the packaging directory [1]:

-- Installing: /<>/debian/cloudcompare/usr/bin/CloudCompare
-- Set runtime path of 
"/<>/debian/cloudcompare/usr/bin/CloudCompare" to 
"lib/x86_64-linux-gnu/cloudcompare"
-- Installing: 
/<>/debian/cloudcompare/usr/share/cloudcompare/CHANGELOG.md


I found this file in which CMAKE_INSTALL_RPATH gets set:
./CMakeLists.txt:34:set(CMAKE_INSTALL_RPATH 
"${CMAKE_INSTALL_LIBDIR}/cloudcompare")

As far as I see CMAKE_INSTALL_LIBDIR is given by dh_auto_configure
and therefore may be meant to be a relative path.


Therefore I searched other examples of setting CMAKE_INSTALL_RPATH
and found that a package built with following change at least
shows no longer an error in ldd.

+++ cloudcompare-2.10.1/CMakeLists.txt
-   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}/cloudcompare")
+   set(CMAKE_INSTALL_RPATH 
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cloudcompare")


Kind regards,
Bernhard

[1] 
https://buildd.debian.org/status/fetch.php?pkg=cloudcompare=amd64=2.10.1-1=1547783795=0
Description: Modify CMAKE_INSTALL_RPATH to have an absolute path
Author: Bernhard Übelacker 
Bug: https://github.com/CloudCompare/CloudCompare/issues/861
Bug-Debian: https://bugs.debian.org/928986
Forwarded: no
Last-Update: 2019-05-15

--- cloudcompare-2.10.1.orig/CMakeLists.txt
+++ cloudcompare-2.10.1/CMakeLists.txt
@@ -31,7 +31,7 @@ if( UNIX AND NOT APPLE )
 	if( NOT CMAKE_INSTALL_LIBDIR )
 		set( CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib CACHE PATH "CloudCompare lib dir" )
 	endif( NOT CMAKE_INSTALL_LIBDIR )
-	set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}/cloudcompare")
+	set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cloudcompare")
 endif()
 
 # CCViewer


Bug#928986: CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:

2019-05-15 Thread Gürkan Myczko

Indeed, I had noticed so 2 months ago with 2.10.2
https://github.com/CloudCompare/CloudCompare/issues/861

And it was no problem with 2.10.1, back then. Trying to figure out what 
the problem is...

Help is welcome.



Bug#928986: CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:

2019-05-15 Thread Juhani Numminen
Control: found -1 2.10.2-1

Hi,

On Tue, 14 May 2019 19:25:25 +0200 Johannes 'josch' Schauer  
wrote:

> after installing the package, when attempting to start CloudCompare I
> get the following error message:
> 
> CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:
> cannot open shared object file: No such file or directory

I also get the same message, for both versions 2.10.1-1 (from buster) and
2.10.2-1 (from experimental).

> Indeed that file seems to be contain in no binary package in the
> archive?

Such a file is actually shipped in the cloudcompare package itself.

$ dpkg -L cloudcompare | grep libQCC_IO_LIB.so
/usr/lib/x86_64-linux-gnu/cloudcompare/libQCC_IO_LIB.so


Regards,
Juhani



Bug#928986: CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:

2019-05-14 Thread Johannes 'josch' Schauer
Package: cloudcompare
Version: 2.10.1-1
Severity: grave
Justification: renders package unusable

Hi,

after installing the package, when attempting to start CloudCompare I
get the following error message:

CloudCompare: error while loading shared libraries: libQCC_IO_LIB.so:
cannot open shared object file: No such file or directory

Indeed that file seems to be contain in no binary package in the
archive?

Thanks!

cheers, josch


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.19.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cloudcompare depends on:
ii  libboost-atomic1.67.0 1.67.0-11
ii  libboost-chrono1.67.0 1.67.0-11
ii  libboost-date-time1.67.0  1.67.0-11
ii  libboost-system1.67.0 1.67.0-10
ii  libboost-thread1.67.0 1.67.0-11
ii  libc6 2.28-2
ii  libcgal13 4.12-1
ii  libgcc1   1:8.2.0-9
ii  libgl11.1.0-1
ii  libglu1-mesa [libglu1]9.0.0-2.1
ii  libgmp10  2:6.1.2+dfsg-4
ii  libgmpxx4ldbl 2:6.1.2+dfsg-4
ii  libgomp1  8.2.0-9
ii  libmpfr6  4.0.1-1
ii  libpdal-base7 1.8.0+ds-1+b2
ii  libpdal-util7 1.8.0+ds-1+b2
ii  libqt5concurrent5 5.11.3+dfsg-2
ii  libqt5core5a  5.11.3+dfsg-2
ii  libqt5gui55.11.3+dfsg-2
ii  libqt5opengl5 5.11.3+dfsg-2
ii  libqt5printsupport5   5.11.3+dfsg-2
ii  libqt5widgets55.11.3+dfsg-2
ii  libstdc++68.2.0-9

cloudcompare recommends no packages.

cloudcompare suggests no packages.

-- debconf-show failed