[MacPorts] #68452: kdelibs4 @4.14.3_110 +debug+docs+osxkeychain: onto2vocabularyclass segfaults during build
MacPorts
noreply at macports.org
Tue Apr 16 02:23:23 UTC 2024
#68452: kdelibs4 @4.14.3_110 +debug+docs+osxkeychain: onto2vocabularyclass
segfaults during build
---------------------------------------+--------------------
Reporter: cooljeanius | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords:
Port: kdelibs4 soprano raptor2 |
---------------------------------------+--------------------
Comment (by kencu):
the failing command is this one:
{{{
/opt/local/bin/onto2vocabularyclass --name TMO --encoding trig --namespace
Nepomuk::Vocabulary --export-module nepomuk
/opt/local/share/ontology/pimo/tmo.trig
}}}
to run that, go into the build first:
{{{
cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_kdelibs4/kdelibs4/work/build
}}}
and then run the command, to watch it segfault.
Now you want to run that under the debugger. So go into the folder again:
{{{
cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_kdelibs4/kdelibs4/work/build
}}}
and this time, run it under lldb, like this:
{{{
lldb /opt/local/bin/onto2vocabularyclass
}}}
and after lldb opens, type this into the lldb prompt (basically - "run"
and then the arguments):
{{{
run --name TMO --encoding trig --namespace Nepomuk::Vocabulary --export-
module nepomuk /opt/local/share/ontology/pimo/tmo.trig
}}}
then it will crash again, but inside the debugger. Then you can press "bt"
to generate the proper backtrace.
However, you can't see as much as you would like to see, because some of
the software involved has been installed with debugging symbols stripped
out and heavy optimization turned on. In particular, raptor2 is such a
beast.
So we will rebuild raptor2 with debugging symbols left in and with
optimizations turned off. I looked over raptor2, and the easiest way to do
that is to use the debug 1.0 PortGroup.
To do that, first uninstall raptor2:
{{{
sudo port -f uninstall raptor2
}}}
and then edit the raptor2 Portfile to add {{{PortGroup debug 1.0}}} near
the top.
Now reinstall raptor2, but leave the source code behind after the
installation to allow you to trace it. You do that like this:
{{{
sudo port -v -s -k install raptor2
}}}
OK, now we have raptor2 installed with everything as we want it.
Now, we go back to our lldb line:
{{{
cd
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_kdelibs4/kdelibs4/work/build
lldb /opt/local/bin/onto2vocabularyclass
}}}
and then:
{{{
run --name TMO --encoding trig --namespace Nepomuk::Vocabulary --export-
module nepomuk /opt/local/share/ontology/pimo/tmo.trig
}}}
and you can now see a WHOLE lot more of what was going on when
onto2vocabularyclass crashed.
To really get a good look around, put lldb into GUI mode by typing:
{{{
gui
}}}
you can trace up and down the source code of raptor2, you can go into the
various frames, and see what the variables were set to when the
subroutines were called.
You might spot the issue doing that pretty quickly, or you might find out
that the error is not in raptor2 itself, but in another piece of code,
like perhaps soprano. Perhaps soprano will need to be reinstalled with the
raptor2 treatment to see everything that is going on with soprano.
presumably, there is a NULL variable being sent to a routine that is not
expecting it to be NULL, it would seem.
--
Ticket URL: <https://trac.macports.org/ticket/68452#comment:27>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list