Bug#874901: [GLE-devel] Probable fix for qgle seg faults with latest ghostscript versions

Christian T. Steigies cts at debian.org
Mon Mar 9 19:48:05 GMT 2020


On Mon, Mar 02, 2020 at 08:18:21PM +0100, Moritz M?hlenhoff wrote:
> 
> I've now filed a removal bug for gle-graphics. It can be re-introduced when
> a stable Qt5 port is available, there's plenty of time until the next freeze.

Thanks, Moritz. I uploaded a version today which should fix everything, it
has to go trough NEW, so it will take a little longer.

The Qt5 part was already working fine, only the part loading the
ghostscript library had issues. The library is located in
/usr/lib/<triarch>, for example /usr/lib/x86_64-linux-gnu/ on amd64.
The triarch part can be determined with:
ARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

I tried to pass this directory with a define to the cpp code, where it would
be used to load the library. The define worked fine (some issues with
quotes) according to the logs, but during compilation this was changed to:
/usr/lib/x86_64-1-gnu (linux replace by 1), which I could not figure out how
to fix or even what happened there. 

So instead of using the define, I created a new header file during the
build, where a const with the correct path was defined.  The only change to
the upstream code is now to include this new header file and load the
library with the const as path.  That works fine (tested only on amd64, but
strace shows the correct path), and I expect it to work for all other arches
as well, as long as the dpkg-architecture call is correct.

This is the solution I have been looking for, even though it is debian
specific. But other distributions should be able to create the own fix based
on this. Now if I can get write access to the git repository on salsa, I
can push the new version there.

Christian



More information about the debian-science-maintainers mailing list