On Mon, 1 Feb 2021, Marcin Błażejowski wrote:
I've found quite unusual error which happens only when I call a
package which
uses MPI in my script: we get SIGSEGV in purebin_write_data() from
'purebin.c' since pointer to 'list' is NULL (and gretl crashes on nv =
list[0];).
Ah, good catch. That's now fixed in git.
BTW I'd like to ask two guestions regarding C level:
1. Which error type gretl should return in such a case, E_DATA?
Hard to say, since this was an internal error (not anything wrong
with user input). If it had been a user issue, I'd say E_INVARG
(invalid argument).
2. What is the most efficient compilation scheme (instead of make all
install) when I change something in, f.e., 'purebin.c'? I'm asking because
after 'make -B plugin lib cli' gdb claims that cli/.libs/gretlcli is still
older than a source file?
I use this little script, install_plugin, to be executed in the
"plugin" directory in your build tree:
#!/bin/sh
DEST=/usr/local/lib/gretl-gtk3 # edit as needed
PLUG=$1
if [ "x$PLUG" = "x" ] ; then
echo "Supply the name of a plugin to install"
exit 1;
fi
PLUG=${PLUG%.*}
make ${PLUG}.la
../libtool --mode=install install -c -m 755 ${PLUG}.la $DEST
Allin