headache on build repeatibility: octave vs BLODA ?

Marco Atzeri marco.atzeri@gmail.com
Sat Jan 25 16:55:00 GMT 2020


Hi All,
I have recently released Octave 5.1.0

https://cygwin.com/ml/cygwin-announce/2020-01/msg00010.html
https://cygwin.com/ml/cygwin-announce/2020-01/msg00011.html

that I built and packaged around 28 of December without
any compilation and test issue.

Than I passed to build the next version and started to see
unexpected segfault during the package test.
Trying to investigate I rebuilt the 5.1.0 and now I see also
there the same thing:

   libinterp/corefcn/file-io.cc-tst 
...............................fatal: caught signal Segmentation fault 
-- stopping myself...
/bin/sh: line 1:  3771 Segmentation fault      (core dumped) /bin/sh 
../run-octave --norc --silent --no-history -p 
/cygdrive/d/cyg_pub/devel/octave/prova_311_510/octave-5.1.0-2.x86_64/build/test/mex 
/cygdrive/d/cyg_pub/devel/octave/prova_311_510/octave-5.1.0-2.x86_64/src/octave-5.1.0/test/fntests.m 
/cygdrive/d/cyg_pub/devel/octave/prova_311_510/octave-5.1.0-2.x86_64/src/octave-5.1.0/test
make[3]: *** [Makefile:31176: check-local] Error 139


I do not see any new cygwin package released in the last month that I
installed that could cause the simple file tests to fail

%!test
%! f = tempname ();
%! fid = fopen (f, "w+");
%! fprintf (fid, "1\n2\n3\n4\n5\n6");
%! fseek (fid, 0, "bof");
%! c = textscan (fid, "%f %f", 2);   <- here comes the segfault

I also tried the cygwin release 3.1.1 and 2020-01-14 snapshot
in addition to the 3.1.2 to see if something different was
coming with no difference in the outcome.

Now I am seriously thinking about BLODA, but I have not
noted any difference from the two AVs I was using
Antivir and MS Defender, so I am wandering if last
update for W10 Home x64 is the culprit.

Can anyone try to rebuild the Octave package and let me know
if the segfault during test is present or not in your system ?

Be aware that build time is very long (~ 4 hours) and requires
a ton of mathematical libraries.

Any suggestion will be appreciated
Marco




-------------- next part --------------
NAME="octave"
VERSION="5.1.0"
RELEASE=2

CATEGORY="Math"
DESCRIPTION="GNU Octave is a high-level language for numerical computations"
HOMEPAGE="http://www.gnu.org/software/octave/"

OR="${PV}"
SRC_URI="https://ftp.gnu.org/gnu/octave/${PN}-${PV}.tar.lz
https://ftp.gnu.org/gnu/octave/${PN}-${PV}.tar.lz.sig"
SRC_DIR="${PN}-${PV}"

PATCH_URI="
octave-postinstall.patch"

PKG_NAMES="octave octave-devel octave-doc"

octave_SUMMARY="GNU Octave language for numerical computations"
octave_devel_SUMMARY="GNU Octave (development)"
octave_doc_SUMMARY="GNU Octave additional docs in html and pdf"

octave_CONTENTS='etc var usr/bin/cyg* usr/bin/oct* usr/lib/octave/'${OR}'/[eos]* usr/lib/octave/[as]*  usr/share/[aimos]* usr/share/doc/octave/[ABCINPRTe]*'

octave_devel_CONTENTS=' usr/bin/mk* usr/include/ usr/lib/octave/'${OR}'/lib* usr/lib/pkgconfig'

octave_doc_CONTENTS='usr/share/doc/octave/[hp]*'

DIFF_EXCLUDES="*octave.info* config.in.h version.texi stamp-vti 
  version-octave.texi stamp-1 version-liboctave.texi"

src_compile() {
	cd ${S}
    	cygautoreconf
	cd ${B}
	cygconf --libexecdir=/usr/lib \
		--enable-shared \
		--enable-float-truncate \
                --disable-java \
		--enable-link-all-dependencies \
		LIBS="-lsuitesparseconfig"

# workaround to avoid rebuilding of all interpreter documentation
	touch AUTHORS BUGS INSTALL.OCTAVE

	cygmake LIBS="-lsuitesparseconfig"
}

src_test() {
	cd ${B}
	make check	
}

src_install() {
	cd ${B}
	ARC=$(./libtool --features | grep "host:" |sed -e "s/host: //")

	keepdir /usr/lib/octave/${OR}/site/exec/${ARC}
	keepdir /usr/lib/octave/${OR}/site/oct/${ARC}
	keepdir /usr/lib/octave/api-v53/site/exec/${ARC}
 	keepdir /usr/lib/octave/site/oct/api-v53/${ARC} 
        keepdir /usr/lib/octave/${OR}/site/exec
        keepdir /usr/lib/octave/${OR}/site/oct
        keepdir /usr/lib/octave/api-v53/site/exec
        keepdir /usr/lib/octave/site/exec/${ARC}
        keepdir /usr/lib/octave/site/oct/api-v53
        keepdir /usr/lib/octave/site/oct/${ARC}
        keepdir /usr/share/octave/${OR}/site/m
        keepdir /usr/share/octave/site/api-v53/m
        keepdir /usr/lib/octave/${OR}/site
        keepdir /usr/lib/octave/api-v53/site
        keepdir /usr/lib/octave/site/exec
        keepdir /usr/lib/octave/site/oct
        keepdir /usr/share/octave/${OR}/site
        keepdir /usr/share/octave/site/api-v53
        keepdir /usr/lib/octave/api-v53
        keepdir /usr/lib/octave/site

	cyginstall 
	
	insinto /usr/share/doc/${PN}/etc
	doins ${S}/etc/PROJECTS
	insinto /usr/share/doc/${PN}
	doins ${S}/NEWS
	doins ${S}/ChangeLog

	dodir /usr/share/doc/${PN}/pdf
	insinto /usr/share/doc/${PN}/pdf
	doins ${S}/doc/interpreter/octave.pdf
	doins ${S}/doc/liboctave/liboctave.pdf
	doins ${S}/doc/refcard/refcard-a4.pdf
	doins ${S}/doc/refcard/refcard-legal.pdf
	doins ${S}/doc/refcard/refcard-letter.pdf
#	doins ${S}/doc/faq/OctaveFAQ.pdf
 
	dodir /usr/share/doc/${PN}/html/interpreter
	insinto /usr/share/doc/${PN}/html/interpreter
	doins ${S}/doc/interpreter/octave.html/*.html
	doins ${S}/doc/interpreter/octave.html/*.png 

	dodir /usr/share/doc/${PN}/html/liboctave
	insinto /usr/share/doc/${PN}/html/liboctave
	doins ${S}/doc/liboctave/liboctave.html/* 

	dodir /usr/share/info
	insinto /usr/share/info
	doins ${S}/doc/interpreter/octave.info* 
	doins ${S}/doc/liboctave/liboctave.info
#	doins ${S}/doc/faq/OctaveFAQ.info

# 	postinstall script
	insinto /var/lib/octave
	doins ${S}/CYGWIN-PATCHES/update_packages_list
	insinto /etc/postinstall
	doins ${S}/CYGWIN-PATCHES/zp_octave_finish.dash
}
-------------- next part --------------
--- origsrc/octave-4.0.0/CYGWIN-PATCHES/postinstall.sh	1970-01-01 01:00:00.000000000 +0100
+++ CYGWIN-PATCHES/postinstall.sh	2015-05-31 22:32:05.501058300 +0200
@@ -0,0 +1,4 @@
+if [ ! -f /var/lib/octave/update.flag ]
+then
+    touch /var/lib/octave/update.flag
+fi
--- origsrc/octave-4.0.0/CYGWIN-PATCHES/update_packages_list	1970-01-01 01:00:00.000000000 +0100
+++ CYGWIN-PATCHES/update_packages_list	2015-05-31 22:49:05.809416600 +0200
@@ -0,0 +1,18 @@
+##  to updated automatically the package database every time a package is 
+##  added or removed.
+##  preinstall and postremove for every forge package should create the flag
+
+# global package directory
+packages_dir=stat("/usr/share/octave/packages");
+
+# if no package directory, we remove database 
+# otherwise we rebuild
+if (isempty(packages_dir))
+	unlink("/usr/share/octave/octave_packages");	
+else
+	pkg rebuild -noauto -global
+	pkg list
+endif
+
+# removing package list rebuild flag
+unlink("/var/lib/octave/update.flag")
--- origsrc/octave-4.0.0/CYGWIN-PATCHES/zp_octave_finish.dash	1970-01-01 01:00:00.000000000 +0100
+++ CYGWIN-PATCHES/zp_octave_finish.dash	2015-06-01 22:37:28.000000000 +0200
@@ -0,0 +1,10 @@
+#!/bin/dash
+# only update if flag exists
+# PATH must include lapack directory
+# octave doesn't like a closed input stream so we use "< /dev/null" 
+
+if [ -f /var/lib/octave/update.flag ]
+then
+  export PATH=/usr/bin:/bin:/usr/lib/lapack
+  /usr/bin/octave-cli  /var/lib/octave/update_packages_list < /dev/null > /var/lib/octave/update.log  2>&1
+fi
-------------- next part --------------
%!test
%! f = tempname ();
%! fid = fopen (f, "w+");
%! fprintf (fid, "1\n2\n3\n4\n5\n6");
%! fseek (fid, 0, "bof");
%! c = textscan (fid, "%f %f", 2);
%! E = feof (fid);
%! fclose (fid);
%! unlink (f);
%! assert (c, {1, 2});
%! assert (! E);
-------------- next part --------------
%!test
%! f = tempname ();
%! fid = fopen (f, "w+");
%! fprintf (fid, "1\r\n2\r3\n4\r\n5\n6");
%! fseek (fid, 0, "bof");
%! c = textscan (fid, "%f %f", 4);
%! fclose (fid);
%! unlink (f);
%! assert (c, {[1;3], [2;4]});
-------------- next part --------------

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list