bugGNU Octave - Bugs: bug #53853, configure: OCTAVE_BLAS_F77_FUNC...

 
 

bug #53853: configure: OCTAVE_BLAS_F77_FUNC sets ax_blas_integer_size incorrectly on big endian system

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Sun 06 May 2018 06:30:11 PM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  4.4.1-rc2 Operating System:  GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Fri 10 Aug 2018 07:13:06 AM UTC, comment #17:

Pushed: https://hg.savannah.gnu.org/hgweb/octave/rev/66caa6dc6701.

Kai Torben Ohlhus <siko1056>
Project Member
Mon 06 Aug 2018 08:42:01 AM UTC, comment #16:

If you agree on comment #15, I can push file #44730 myself.

Kai Torben Ohlhus <siko1056>
Project Member
Mon 06 Aug 2018 08:27:15 AM UTC, comment #15:

Sorry for reopening the issue for my 64-bit builds. I used a cached version and a clean build revealed this issue for me.

Shouldn't the "else"-branch completely be removed here (lines 66 and 67)?

https://hg.savannah.gnu.org/hgweb/octave/rev/171d90967f16#l1.66

When if and else result in the same, e.g. "STOP 1", what sense does the branch make. If the else branch was completely removed, the script can terminate without STOP.

At least I was happy then ;-)

Shortly attach a cset.

Kai Torben Ohlhus <siko1056>
Project Member
Wed 18 Jul 2018 06:37:25 PM UTC, comment #14:

I got three successful builds on x86_64, mips, and s390x, all with 32-bit Fortran integers.

Mike Miller <mtmiller>
Project Administrator
Wed 18 Jul 2018 12:12:27 PM UTC, comment #13:

I pushed this change on stable and merged with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/171d90967f16

John W. Eaton <jwe>
Project Administrator
Wed 18 Jul 2018 02:29:15 AM UTC, comment #12:

The x86_64 build was successful this time. I am currently building for mips, but the configure output looks right to me, the integer size is detected to be 4 bytes and OCTAVE_F77_INT_TYPE is set to int32_t.

I'm not doing any 8-byte integer testing, just making sure configure correctly detects 4-byte integers on both little and big endian builds.

Mike Miller <mtmiller>
Project Administrator
Wed 18 Jul 2018 12:44:17 AM UTC, comment #11:

Oops, bad cut and paste. Try this new diff.

I didn't test the configure script. I just tested the individual program, on x86_64 and Michele's solaris system. I tried with the system BLAS (4-byte integers) and a separate ddot.f file that was compiled with -fdefault-integer-8.

(file #44576)

John W. Eaton <jwe>
Project Administrator
Wed 18 Jul 2018 12:28:18 AM UTC, comment #10:

Hmm, I get configure exiting with an error on x86_64, as well as mips and s390x, all with the same error.

I haven't looked at the patch to see if this is a simple mistake, but it seems like a shell variable substitution error rather than a logic error in the change to the test program itself.

Mike Miller <mtmiller>
Project Administrator
Wed 18 Jul 2018 12:04:15 AM UTC, comment #9:

If it works, I'll build another tarball for Michele to test back on the Solaris bug report.

Rik <rik5>
Project Administrator
Tue 17 Jul 2018 11:25:15 PM UTC, comment #8:

I will test this on my Debian mips and s390x emulators for confirmation, may take a little while.

Mike Miller <mtmiller>
Project Administrator
Tue 17 Jul 2018 11:18:33 PM UTC, comment #7:

I came up with the attached test program that I think should work on either big- or little-endian systems. Seems to work with my tests.

(file #44575)

John W. Eaton <jwe>
Project Administrator
Tue 17 Jul 2018 08:15:53 PM UTC, comment #6:

Is there a way to use existing Autoconf macros to help change the test for integer size?

I see AC_C_BIGENDIAN which could be used to determine the endianness of the system. Maybe then one uses

Just trying to move the ball forward on this bug.

Rik <rik5>
Project Administrator
Tue 15 May 2018 11:24:47 PM UTC, comment #5:

Sorry, I don't have access to give, but I can probably test any potential fixes.

Mike Miller <mtmiller>
Project Administrator
Tue 15 May 2018 08:25:58 PM UTC, comment #4:

Could anyone provide access to a big-endian system so I could use to do some testing?

John W. Eaton <jwe>
Project Administrator
Tue 08 May 2018 06:50:38 AM UTC, comment #3:

I patched the Debian source package to set the integer size to be 4 bytes unconditionally until we can resolve this here.

https://salsa.debian.org/pkg-octave-team/octave/blob/e4b807459a80edfa3f6c4780cf0504ea26d3564d/debian/patches/assume-blas-integer-size.patch

I don't have any bright ideas about fixing this properly at the moment.

Mike Miller <mtmiller>
Project Administrator
Sun 06 May 2018 07:12:12 PM UTC, comment #2:

After looking at the test program, it's pretty clear that it's expecting a 8 byte integer on the stack to be interpreted by only looking at the least-significant 4 bytes. On a big endian system, the argument is interpreted as -1 (from the most-significant 4 bytes) instead of +1. That's why the test then wrongly thinks that the integer size is 8 bytes. Needs some rethinking to fix this properly.

Mike Miller <mtmiller>
Project Administrator
Sun 06 May 2018 06:35:22 PM UTC, comment #1:

If I can't figure out the cause of this in the next days, I am planning on patching the configure script to always use ax_blas_integer_size=4 in the Debian source package, since we know Debian Fortran libraries are always built with gfortran with the default 32-bit integer size.

Mike Miller <mtmiller>
Project Administrator
Sun 06 May 2018 06:30:11 PM UTC, original submission:

The new logic in Octave 4.4 to try to determine the BLAS integer parameter size fails on big endian systems. The integer size is determined to be 8 bytes, even though the true integer size is 4 bytes.

With Octave 4.2 on Debian GNU/Linux mips:

With Octave 4.4 on Debian GNU/Linux mips:

Mike Miller <mtmiller>
Project Administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44576:  diffs.txt added by jwe (2KiB - text/plain)
file #44575:  diffs.txt added by jwe (3KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-10 siko1056 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-08-06 siko1056 Attached File- => Added bug53853-unnecessay-else.patch, #44730
    2018-08-06 siko1056 StatusFixed => Ready For Test
        Open/ClosedClosed => Open
        Releasedev => 4.4.1-rc2
    2018-07-18 mtmiller StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2018-07-18 jwe StatusConfirmed => Ready For Test
    2018-07-18 jwe Attached File- => Added diffs.txt, #44576
    2018-07-17 jwe Attached File- => Added diffs.txt, #44575
    2018-05-06 mtmiller StatusNone => Confirmed

    Back to the top


    Powered by Savane 3.3