[Therion] loch segmentation fault at launch

Martin Budaj m.budaj at gmail.com
Thu Nov 28 17:56:04 CET 2024


After some clarifications with Wookey about the build system used:

The problem why sbuild works fine and debuild doesn't is that debuild
doesn't run in chroot so it's not isolated from the rest of the
system.

When cmake installs ini files, it first copies them into *.ini.new so
that no user-modified .ini files are overwritten, and then tests if
there is [x]therion.ini present and installs the files with original
names only if they were not there
(https://github.com/therion/therion/blob/487bc63ca3d03dbd6ca256c98a8a2642d7924da7/CMakeLists.txt#L178-L183).

As debuild sets CMAKE_INSTALL_SYSCONFDIR=/etc, cmake checks for the
presence of [x]therion.ini in your system /etc directory. If therion
happens to be installed on your system, the ini files are in /etc, so
cmake doesn't install them with *.ini names to
<<PKGBUILDDIR>>/debian/tmp/etc/, only with *.ini.new names.

But debuild doesn't look for them in system /etc, but in
<<PKGBUILDDIR>>/debian/tmp/etc/ and fails with a message about missing
files.

Sbuild works fine as cmake doesn't have access to system /etc, so no
ini files are detected and it copies ini files to
<<PKGBUILDDIR>>/debian/tmp/etc/ as expected.

@Afforix, maybe some modification in cmake files might help cope with
this better?

Martin

On Sun, Nov 24, 2024 at 2:30 AM Wookey <wookey at wookware.org> wrote:
>
> On 2024-11-21 15:35 +0000, Wookey wrote:
> > On 2024-11-20 16:10 -0600, Bill Gee wrote:
> > > I have heard nothing on this.  Therion 6.3.0 was released today.  I
> > > downloaded from github and compiled.  It compiled with no errors.  :-)
>
> Not on Debian stable it doesn't (so I was unable to test without
> working out what's wrong). It's fine in unstable on the buildds but forsome reason therion.ini and xtherion.ini are missingon stable builds. Not sure what's going on.
>
> Stable log:
> dh_auto_install
>         install -m0755 -d /home/wookey/packages/therion/therion-6.3.1/debian/tmp
>         cd build && DESTDIR=/home/wookey/packages/therion/therion-6.3.1/debian/tmp LC_ALL=C.UTF-8 ninja install
> [0/1] Install the project...
> -- Install configuration: "None"
> -- Installing: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/usr/bin/therion
> -- Installing: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/etc/therion.ini.new
> -- Installing: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/usr/bin/loch
> .....
> -- Installing: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/usr/share/doc/therion/thbook.pdf
> -- Installing: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/usr/bin/xtherion
> -- Installing: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/etc/xtherion.ini.new
> rm debian/tmp/etc/*.new
> dh_installexamples -ptherion --exclude=.tcl --exclude=Makefile --exclude=CMakeLists.txt --exclude=thTMPDIR samples therion.ini
>         install -m0755 -d debian/therion/usr/share/doc/therion/examples
>         cd 'samples/..' && find 'samples' -type f -and ! \( -regex .\*\\.tcl.\* -or -regex .\*Makefile.\* -or -regex .\*CMakeLists\\.txt.\* -or -regex .\*thTMPDIR.\* \) -print0 | LC_ALL=C sort -z | xargs -0 -I {} cp --reflink=auto --parents -dp {} /home/wookey/packages/therion/therion-6.3.1/debian/therion/usr/share/doc/therion/examples
>         cp --reflink=auto -a therion.ini debian/therion/usr/share/doc/therion/examples
> make[1]: Leaving directory '/home/wookey/packages/therion/therion-6.3.1'
>         rm -f debian/therion-viewer.debhelper.log debian/therion.debhelper.log
>    debian/rules override_dh_auto_install-indep
> make[1]: Entering directory '/home/wookey/packages/therion/therion-6.3.1'
> cmake --install build --prefix /home/wookey/packages/therion/therion-6.3.1/debian/tmp/usr --component th-docs
> -- Install configuration: "None"
> -- Up-to-date: /home/wookey/packages/therion/therion-6.3.1/debian/tmp/usr/share/doc/therion/thbook.pdf
> make[1]: Leaving directory '/home/wookey/packages/therion/therion-6.3.1'
>    dh_install -O--buildsystem=cmake\+ninja -O--builddirectory=build
> dh_install: warning: Cannot find (any matches for) "etc/*.ini" (tried in ., debian/tmp)
>
> dh_install: warning: therion missing files: etc/*.ini
>         install -m0755 -d debian/therion//usr/bin
>         cp --reflink=auto -a debian/tmp/usr/bin/therion debian/tmp/usr/bin/xtherion debian/therion//usr/bin/
> dh_install: error: missing files, aborting
> make: *** [debian/rules:9: binary] Error 25
> dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
>
>
> compare with the build-log for unstable at:
> https://buildd.debian.org/status/fetch.php?pkg=therion&arch=amd64&ver=6.3.1-1&stamp=1732310554&raw=0
>
> there are two .ini files there:
> -- Installing: /<<PKGBUILDDIR>>/debian/tmp/usr/bin/therion
> -- Installing: /<<PKGBUILDDIR>>/debian/tmp/etc/therion.ini.new
> -- Installing: /<<PKGBUILDDIR>>/debian/tmp/etc/therion.ini
>
> -- Installing: /<<PKGBUILDDIR>>/debian/tmp/usr/bin/xtherion
> -- Installing: /<<PKGBUILDDIR>>/debian/tmp/etc/xtherion.ini.new
> -- Installing: /<<PKGBUILDDIR>>/debian/tmp/etc/xtherion.ini
>
> I can't immediately see why it should build differently in this
> regard, but it may be to do with debhelper compat levels?
>
> I'm a bit busy to get to the bottom of this right now.
>
> Wookey
> --
> Principal hats:  Debian, Wookware
> http://wookware.org/
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion


More information about the Therion mailing list