bugGNU Octave - Bugs: bug #66976, biosig-3.9.0 is released - update...

 
 

bug #66976: biosig-3.9.0 is released - update mxe-octave/src/libbiosig.mk

Submitter:  Alois Schlögl <schloegl>
Submitted:  Wed 02 Apr 2025 08:19:50 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  schloegl Open/Closed:  * Closed
Release:  * dev Release: 
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  10.2.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 08 Apr 2025 05:12:12 PM UTC, comment #8: 

The test suite of the biosig package also passed on the nightly builds on Windows:
https://github.com/gnu-octave/octave-buildbot/actions/runs/14297307178

So, I agree that this report can be closed as fixed.

Building the biosig library started to fail suddenly with that linker error already before this update. So, this is unrelated to the changes from here.

If someone stumbles upon this in the future: See the discussion about that error and about dropping support for the native builds with MXE Octave on Discourse:
https://octave.discourse.group/t/drop-native-builds-from-mxe-octave/2689

Markus Mützel <mmuetzel>
Group administrator
Tue 08 Apr 2025 04:20:24 PM UTC, comment #7: 

The ordinary MXE builds for Windows now succeed.  The "native" builds do not.  Checking the last compilation log file I seed


gcc -D=NDEBUG -D=__4HAERTEL__ -D=WITH_FAMOS -D=WITH_FIFF -D=WITHOUT_NETWORK -D=WITH_SCP3 -D=WITH_FEF -D=MAKE_EDFLIB -D=WITH_LIBTINYXML  -pipe -fPIC -fno-builtin-memcmp -O2 -Wno-unused-result -Wno-deprecated -fvisibility=hidden -I/scratch/buildbot/workers/jwe-debian-x86_64-5/mxe-native-all-on-debian/src/usr/include -L/scratch/buildbot/workers/jwe-debian-x86_64-5/mxe-native-all-on-debian/src/usr/lib -L/scratch/buildbot/workers/jwe-debian-x86_64-5/mxe-native-all-on-debian/src/usr/lib64 "save2gdf.c" -L. -lbiosig -lstdc++ -liconv -lm -ltinyxml -lz -lcholmod -lm -ltinyxml -o "save2gdf"
/scratch/buildbot/workers/jwe-debian-x86_64-5/mxe-native-all-on-debian/src/usr/lib/gcc/x86_64-pc-linux-gnu/14.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lbiosig: No such file or directory
collect2: error: ld returned 1 exit status


I would be in favor of dropping "native" builds on the buildbots.  But if they are kept, it looks like there is still some issue with the build scripts for either biosig or libbiosig.


Rik <rik5>
Group administrator
Fri 04 Apr 2025 11:55:42 AM UTC, comment #6: 

Finally came around to building the updated packages in MXE Octave. With them all tests pass for `pkg test biosig`.
So, I added a commit message and pushed the patch with you as the author to the release branch of MXE Octave:
https://hg.octave.org/mxe-octave/rev/fdb0b78b0edb

It will be part of the next minor release of Octave (version 10.2.0).

Marking as ready for test (at least until one of the buildbots that cross-build to Windows succeeds with this change).

Markus Mützel <mmuetzel>
Group administrator
Thu 03 Apr 2025 10:11:40 AM UTC, comment #5: 

Could you consider upstreaming at least this part of that patch (and the other patches)?

`typeof` is a GNU extension. Use `decltype` which is part of C++11.
--- ./biosig4c++/t230/sopen_hl7aecg.cpp.orig        2021-08-02 18:59:57.000000000 +0200
+++ ./biosig4c++/t230/sopen_hl7aecg.cpp        2021-08-10 17:41:35.500597677 +0200
@@ -791,8 +791,8 @@ EXTERN_C int sopen_HL7aECG_read(HDRTYPE*

                                 if ((N+3) > N_Event) {
                                         N_Event = max(16,2*(N+2));
-                                        hdr->EVENT.TYP = (typeof(hdr->EVENT.TYP)) realloc(hdr->EVENT.TYP,N_Event*sizeof(*hdr->EVENT.TYP));
-                                        hdr->EVENT.POS = (typeof(hdr->EVENT.POS)) realloc(hdr->EVENT.POS,N_Event*sizeof(*hdr->EVENT.POS));
+                                        hdr->EVENT.TYP = (decltype(hdr->EVENT.TYP)) realloc(hdr->EVENT.TYP,N_Event*sizeof(*hdr->EVENT.TYP));
+                                        hdr->EVENT.POS = (decltype(hdr->EVENT.POS)) realloc(hdr->EVENT.POS,N_Event*sizeof(*hdr->EVENT.POS));
                                 }

                                 TiXmlHandle Boundary = Annotation.FirstChild("support").FirstChild("supportingROI").FirstChild("component").FirstChild("boundary").FirstChild("value");


Markus Mützel <mmuetzel>
Group administrator
Thu 03 Apr 2025 09:22:14 AM UTC, comment #4: 

The patch src/libbiosig-1-gcc11.patch causes some issues in upstream (actually in https://github.com/schloegl/mxe). So it will take more time to resolve this. I'll try to add these patches in the next release (3.9.1)


Alois Schlögl <schloegl>
Thu 03 Apr 2025 06:55:17 AM UTC, comment #3: 

Thank you for the revision.

We still need to apply the following patches to be able to build libbiosig:

src/libbiosig-1-gcc11.patch:

Change Makefile so that the values of environment variables are respected.

--- ./biosig4c++/Makefile.in.orig        2021-08-10 18:35:30.301801739 +0200
+++ ./biosig4c++/Makefile.in        2021-08-10 18:37:18.338795660 +0200
@@ -101,6 +101,9 @@ includedir    = @includedir@
 bindir        = @bindir@
 mandir        = @mandir@

+CC ?= @CC@
+CXX ?= @CXX@
+
 CFLAGS       += -I$(includedir)
 CXXFLAGS     += $(CFLAGS)

@@ -108,7 +111,8 @@ CXXFLAGS     += $(CFLAGS)
 ifeq (,$(TARGET))
         CC      ?= gcc
         CXX     ?= g++
-        AR      := ar rcs
+        ARFLAGS ?= rcs
+        AR      ?= ar
         PKGCONF := pkg-config
         SHAREDLIB = -shared
         DLEXT    = so
@@ -116,14 +120,16 @@ else ifeq (intel,$(TARGET))
         CC      := icc
         CXX     := icc
         LD      := xild
-        AR      := xiar crs
+        ARFLAGS ?= crs
+        AR      ?= xiar
 else
         PREFIX  := $(subst /bin/,/,$(dir $(shell which $(TARGET)-gcc)))
-        CC      := $(TARGET)-gcc
-        CXX     := $(TARGET)-g++
+        CC      ?= $(TARGET)-gcc
+        CXX     ?= $(TARGET)-g++
         LD      := $(TARGET)-ld
-        AR      := $(TARGET)-ar rcs
-        PKGCONF := $(TARGET)-pkg-config
+        AR      ?= $(TARGET)-ar
+        ARFLAGS ?= rcs
+        PKGCONF ?= $(TARGET)-pkg-config
         TARGETPLATFORM = windows
         ifneq (,$(findstring mingw,$(TARGET)))
                 ## add gnulib's getlogin
@@ -136,6 +142,8 @@ else
         endif
 endif

+AR := $(AR) $(ARFLAGS)
+
 SONAMEVERSION ?= 3

 ### TODO: DLEXT does not work correctly on MXE/MINGW


`typeof` is a GNU extension. Use `decltype` which is part of C++11.
--- ./biosig4c++/t230/sopen_hl7aecg.cpp.orig        2021-08-02 18:59:57.000000000 +0200
+++ ./biosig4c++/t230/sopen_hl7aecg.cpp        2021-08-10 17:41:35.500597677 +0200
@@ -791,8 +791,8 @@ EXTERN_C int sopen_HL7aECG_read(HDRTYPE*

                                 if ((N+3) > N_Event) {
                                         N_Event = max(16,2*(N+2));
-                                        hdr->EVENT.TYP = (typeof(hdr->EVENT.TYP)) realloc(hdr->EVENT.TYP,N_Event*sizeof(*hdr->EVENT.TYP));
-                                        hdr->EVENT.POS = (typeof(hdr->EVENT.POS)) realloc(hdr->EVENT.POS,N_Event*sizeof(*hdr->EVENT.POS));
+                                        hdr->EVENT.TYP = (decltype(hdr->EVENT.TYP)) realloc(hdr->EVENT.TYP,N_Event*sizeof(*hdr->EVENT.TYP));
+                                        hdr->EVENT.POS = (decltype(hdr->EVENT.POS)) realloc(hdr->EVENT.POS,N_Event*sizeof(*hdr->EVENT.POS));
                                 }

                                 TiXmlHandle Boundary = Annotation.FirstChild("support").FirstChild("supportingROI").FirstChild("component").FirstChild("boundary").FirstChild("value");


src/libiosig-2-missing-declarations.patch

Declare functions getdelim, getline in compilation units before they are used.

diff -urN biosig-2.6.0/biosig4c++/win32/getline.c.orig biosig-2.6.0/biosig4c++/win32/getline.c
--- biosig-2.6.0/biosig4c++/win32/getline.c.orig        2024-02-19 07:33:48.000000000 +0100
+++ biosig-2.6.0/biosig4c++/win32/getline.c        2024-06-03 21:06:29.705428073 +0200
@@ -20,6 +20,8 @@

 #include <stdio.h>

+ssize_t getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp);
+
 ssize_t
 getline (char **lineptr, size_t *n, FILE *stream)
 {
diff -urN biosig-2.6.0/biosig4c++/t210/sopen_abf_read.c.orig biosig-2.6.0/biosig4c++/t210/sopen_abf_read.c
--- biosig-2.6.0/biosig4c++/t210/sopen_abf_read.c.orig        2024-02-19 07:33:48.000000000 +0100
+++ biosig-2.6.0/biosig4c++/t210/sopen_abf_read.c        2024-06-03 21:12:05.512725985 +0200
@@ -34,6 +34,8 @@
 #include "axon_structs.h"        // ABF2
 #include "abfheadr.h"                // ABF1

+ssize_t getline (char **lineptr, size_t *n, FILE *stream);
+
 #define min(a,b)        (((a) < (b)) ? (a) : (b))
 #define max(a,b)        (((a) > (b)) ? (a) : (b))



Additionally, we need to apply this patch for `pkg test biosig` to pass its tests in Octave:

src/opkg-biosig-1-skip-test.patch:

Skip test if "nan" package isn't loaded

--- biosig4octave-2.4.0/inst/t400_Classification/sumskipnan.m.orig        2022-03-19 12:21:44.000000000 +0100
+++ biosig4octave-2.4.0/inst/t400_Classification/sumskipnan.m        2022-03-19 19:13:19.308144348 +0100
@@ -188,4 +188,7 @@
 %!assert(sumskipnan([1,NaN],2),1)
 %!assert(sumskipnan([1,NaN],2),1)
 %!assert(sumskipnan([nan,1,4,5]),10)
-%!assert(sumskipnan([nan,1,4,5]',1,[3;2;1;0]),6)
+%!test
+%! if (exist('sumskipnan_mex'))
+%!   assert(sumskipnan([nan,1,4,5]',1,[3;2;1;0]),6);
+%! end


Could you please upstream these patches?

(I haven't checked the new version yet. But it looks like it didn't change when it comes to the above patches.)

Markus Mützel <mmuetzel>
Group administrator
Wed 02 Apr 2025 09:42:03 PM UTC, comment #2: 

Thanks for pointing this out. That file test01.gf and a few others do indeed not belong into that release.

I've updated the release, and attached a revised patch for the update in mxe-octave.

Alois Schlögl <schloegl>
Wed 02 Apr 2025 04:57:26 PM UTC, comment #1: 

I started to look into this.

In the past, when we updated libbiosig in MXE Octave we usually also updated the biosig Octave package. For some reason, the tarball for that package increased in size from 1.5 MB (biosig4octave-2.6.0.src.tar.gz) to 31.9 MB (biosig4octave-3.9.0.src.tar.gz).

Did something go wrong in the creation of that tarball? Or did the sources for that package actually increase by that much?
Looking at the content of the tarball, most of this (99.8%) seems to be due to one single file:
inst/t330_StimFit/test01.gdf (46.3 MB unpacked)

Is that file actually needed?

Markus Mützel <mmuetzel>
Group administrator
Wed 02 Apr 2025 08:19:50 AM UTC, original submission:  

Biosig v3.9.0 has been released. See the release notes here:
https://biosig.sourceforge.net/download.html
https://biosig.sourceforge.net/CHANGELOG

Octave for Windows (mxe-octave) is including libbiosig, and I'd like to suggest to upgrade libbiosig in mxe-octave. Here is a minimal patch to do so.

diff -r d4c43b9ef707 src/libbiosig.mk
--- a/src/libbiosig.mk  Sun Mar 30 16:12:06 2025 -0400
+++ b/src/libbiosig.mk  Wed Apr 02 10:08:02 2025 +0200
@@ -4,8 +4,8 @@
 PKG             := libbiosig
 $(PKG)_WEBSITE  := http://biosig.sf.net/
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 2.6.0
-$(PKG)_CHECKSUM := 90a993aa97785a2f9bbdc6d251c43a4cedb48064
+$(PKG)_VERSION  := 3.9.0
+$(PKG)_CHECKSUM := 849342ac825373ecd018078c86c7efb4dba23dea
 $(PKG)_SUBDIR   := biosig-$($(PKG)_VERSION)
 $(PKG)_FILE     := biosig-$($(PKG)_VERSION).src.tar.xz
 $(PKG)_URL      := https://sourceforge.net/projects/biosig/files/BioSig%20for%20C_C%2B%2B/src/$($(PKG)_FILE)


Disclaimer: I've not tested this yet, myself. I'll let you know if I see the need for further changes.

Alois Schlögl <schloegl>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #57098:  update-biosig-390.patch added by schloegl (2KiB - text/x-patch)
file #57097:  update-biosig-390.patch added by schloegl (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by schloegl (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-04-08 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2025-04-04 mmuetzel StatusNone Ready For Test
        Planned ReleaseNone 10.2.0
    2025-04-02 schloegl Attached File- Added update-biosig-390.patch, #57098
    2025-04-02 schloegl Attached File- Added update-biosig-390.patch, #57097

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code