bugGNU Octave - Bugs: bug #51961, integer argument size conflict in...


bug #51961: integer argument size conflict in ranlib when building with 64-bit Fortran support

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Thu 07 Sep 2017 10:42:13 PM UTC  
Category: LibrariesSeverity: 4 - Important
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: Patch SubmittedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


Mon 13 Nov 2017 09:56:26 PM UTC, comment #5:

It's your bug (both submitted and solved). If you feel okay closing it then go ahead and do so.

I'm always trying to prune the bug list so what remains are actual issues worth resolving.

Rik <rik5>
Project Administrator
Mon 13 Nov 2017 08:00:24 PM UTC, comment #4:

I don't remember now if the simple patch I posted here was enough for the test suite to run or if there were other problems at run time.

Mike Miller <mtmiller>
Project Administrator
Mon 13 Nov 2017 07:53:35 PM UTC, comment #3:

I would be ok with closing this as won't fix for now.

The problem arises when the default FFLAGS is set to include "-fdefault-integer-8", so all Fortran is compiled with 64-bit INTEGERs. Or if one happens to have a Fortran compiler that works with 64-bit INTEGERs by default.

This problem does not occur when the default Fortran compilation environment builds 32-bit INTEGERs, but the F77_INTEGER_8_FLAG is set to "-fdefault-integer-8" (or other compiler-specific option) and only used to compile the Fortran files that have to do with BLAS and other external libraries.

All Fortran files under liboctave/external/ranlib must continue to be built with 32-bit INTEGERs always, while all other Fortran files under liboctave/external and liboctave/util must be built with the same INTEGER size that was used in the BLAS and other external numerical libraries.

Mike Miller <mtmiller>
Project Administrator
Fri 10 Nov 2017 05:52:37 AM UTC, comment #2:

@Mike: Did you resolve this? Your Fortran patch seems quite simple and jwe gave the go ahead to use the INTEGER*N syntax as necessary.

Rik <rik5>
Project Administrator
Sat 09 Sep 2017 12:27:50 AM UTC, comment #1:

I don't think the INTEGER*N syntax is part of any standard, but it has been a very common extension for more than 30 years. I can't imagine a compiler that would not support it.

John W. Eaton <jwe>
Project Administrator
Thu 07 Sep 2017 10:42:13 PM UTC, original submission:

When building with 64-bit Fortran indexing, there is a conflict between some of the function arguments in liboctave/external/ranlib and the calling prototypes declared in C.

In C:

But in Fortran the arguments are declared as plain INTEGER types.

I've worked around this with the following patch

I don't remember how portable the INTEGER*N syntax is, I don't know if we want to keep these source files pristine, or if there's a cleaner solution, like overriding the FFLAGS for just the libranlib source files.

Mike Miller <mtmiller>
Project Administrator


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 10 Nov 2017 05:52:37 AM UTCrik5StatusNone=>Patch Submitted

    Back to the top

    Powered by Savane 3.1-cleanup1