bugGNU Octave - Bugs: bug #57042, ...

 
 

bug #57042: __octave_config_info__.build_features.LAPACK = 0

Submitter:  Muhali <muhali>
Submitted:  Fri 11 Oct 2019 04:05:03 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 11 Oct 2019 11:23:55 PM UTC, comment #13: 

Confirmed also, works for my normal build environment. I also tested a minimal container without any BLAS or LAPACK for completeness, and the expected error was reported correctly, no weird shell or syntax errors.

Mike Miller <mtmiller>
Group Member
Fri 11 Oct 2019 11:13:13 PM UTC, comment #12: 

Works fine.  Closing report.

Rik <rik5>
Group administrator
Fri 11 Oct 2019 09:04:50 PM UTC, comment #11: 

I pushed the following change so that the second argument for OCTAVE_BLAS_WITH_F77_FUNC can be empty

  http://hg.savannah.gnu.org/hgweb/octave/rev/f19e621d7f2d

and then this one to eliminate the arguments where they are not needed, and make them empty otherwise:

  http://hg.savannah.gnu.org/hgweb/octave/rev/3fe26656e73c

It seems to work for me.

John W. Eaton <jwe>
Group administrator
Fri 11 Oct 2019 08:42:40 PM UTC, comment #10: 

Yeah, your patch looks ok to me on inspection, not tested. You should also be able to remove the arguments and parentheses completely from AX_LAPACK in this change, but not OCTAVE_BLAS_WITH_F77_FUNC. Whichever form you think looks clearer.

Mike Miller <mtmiller>
Group Member
Fri 11 Oct 2019 08:31:10 PM UTC, comment #9: 

Yeah, the macros could also be improved and updated to current best practice.  But I think we should use them in a way that they will define the HAVE_* macros to 1 when the features are found, and keep those in Octave's list of configuration features.

John W. Eaton <jwe>
Group administrator
Fri 11 Oct 2019 08:28:53 PM UTC, comment #8: 

Oh, I see, because we are passing [:] as the "action if found" first argument to these macros, then since it is not empty, the default action is not performed.  I'm guessing it was a misunderstanding of how those macros work.  Is there any reason not to just pass [] instead for those arguments?  For example, the attached change?  With that, I get the HAVE_* macros defined to 1.


(file #47653)

John W. Eaton <jwe>
Group administrator
Fri 11 Oct 2019 08:23:46 PM UTC, comment #7: 

I think technically it's considered bad practice to put an AC_DEFINE inside of an m4 if conditional, it's better to always expand it and put it inside of a shell if conditional at runtime. This could be reported as a bug against the autoconf-archive to get the files fixed there.

Mike Miller <mtmiller>
Group Member
Fri 11 Oct 2019 08:20:43 PM UTC, comment #6: 

jwe - the macros are defined by AC_DEFINE in an m4_ifelse conditional in ax_blas.m4 and ax_lapack.m4. We pass an argument to both the AX_BLAS and AX_LAPACK macros, so those conditionals skip executing the AC_DEFINE unconditionally, they are simply not expanded at all in the output configure shell script.

However, when autoheader scans the input sources, it sees the AC_DEFINE and stuffs HAVE_BLAS and HAVE_LAPACK into the config.in.h template, because it's not smart enough to know that the AC_DEFINE will never be expanded by autoconf.

Mike Miller <mtmiller>
Group Member
Fri 11 Oct 2019 08:15:45 PM UTC, comment #5: 

How is it that we require these libraries and check for them but don't define the macros?  If someone already understands exactly how that happens, can you explain?  Otherwise, I'll keep looking.

John W. Eaton <jwe>
Group administrator
Fri 11 Oct 2019 06:20:55 PM UTC, comment #4: 

My last comment overlapped with Mike's.  Same idea though.

Rik <rik5>
Group administrator
Fri 11 Oct 2019 06:19:38 PM UTC, comment #3: 

This is an error in reporting.  Octave requires BLAS and LAPACK libraries to even build, these are NOT optional in any sense.

Since they are not optional, one choice would be to remove them from the build_features structure.  The other choice would be to default them to 1 always.

I'll ask on the Octave Maintainer's list.

Rik <rik5>
Group administrator
Fri 11 Oct 2019 05:13:43 PM UTC, comment #2: 

For details, the presence of these build features comes precisely from the content of config.h, which is generated from the configure run. The configure script exports both HAVE_BLAS and HAVE_LAPACK as preprocessor defines, but the code path to set them to true is never used the way our configure script is written. Their existence is more of an accident of the implementation, a default conditional define that we don't make use of, but gets pulled into the build_features automatically anyway.

Mike Miller <mtmiller>
Group Member
Fri 11 Oct 2019 04:45:50 PM UTC, comment #1: 

I confirm, but also question why this is useful information. BLAS and LAPACK interfaces are required, Octave cannot be built without them. We could fix this, and then these options would always be true, and there would be no point in checking them. They appear to be false for me going back to version 3.8.

Mike Miller <mtmiller>
Group Member
Fri 11 Oct 2019 04:05:03 PM UTC, original submission:  

My running octave does not show LAPACK,

octave> _octave_config_info_.build_features.LAPACK
ans = 0

although for liboctave.so I have

liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007fe393ca0000)

Or am I missing something?

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #47653:  diffs.txt added by jwe (1KiB - 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 jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (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 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-11 rik5 CategoryNone Configuration and Build System
        Item GroupNone Incorrect Result
        StatusReady For Test Fixed
        Open/ClosedOpen Closed
        Release5.1.0 dev
    2019-10-11 jwe StatusNone Ready For Test
    2019-10-11 jwe Attached File- Added diffs.txt, #47653
    2019-10-11 rik5 CategoryOctave Function None
        Severity2 - Minor 3 - Normal
        Priority3 - Low 5 - Normal
        Item GroupIncorrect Result None
        StatusConfirmed None
    2019-10-11 mtmiller CategoryNone Octave Function
        Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        Item GroupNone Incorrect Result
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code