bugGNU Octave - Bugs: bug #60308, mkoctfile function behaves...

 
 

bug #60308: mkoctfile function behaves different than in command style

Submitter:  Martin K <grisu86>
Submitted:  Tue 30 Mar 2021 10:00:12 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.2.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 30 Mar 2021 05:07:24 PM UTC, comment #2: 

The correct translation from command style should be this


blas_libs = mkoctfile ('--print', 'BLAS_LIBS');
lapack_libs = mkoctfile ('--print', 'LAPACK_LIBS');


The return value of '-lblas' (or '-lopenblas' on my system) is not wrong. So I don't think there is any bug here.

Mike Miller <mtmiller>
Group Member
Tue 30 Mar 2021 10:27:11 AM UTC, comment #1: 

The working code should be

 blas_libs = evalc('mkoctfile --print BLAS_LIBS');
lapack_libs = evalc('mkoctfile --print LAPACK_LIBS');


with 'eval' ist returns a parse error.

But this output can later not be used in 'mkoctfile' since they return `-lblas` and not `-l blas`. So this is an issue as well.

Martin K <grisu86>
Tue 30 Mar 2021 10:00:12 AM UTC, original submission:  

I am currently setting up a m-file to compile mex/oct files on demand in my project for this reason I tried the following from the octave prompt:


blas_libs = mkoctfile('--print BLAS_LIBS');
lapack_libs = mkoctfile('--print LAPACK_LIBS');


which resulted in an error, since the arguments get passed to gcc and the source file is missing.  On the other hand if I execute


blas_libs = eval('mkoctfile --print BLAS_LIBS');
lapack_libs = eval('mkoctfile --print LAPACK_LIBS');


is works. This seems to be a bit inconsistent and from the documentation I think it is a bit strange that the "print action"  requires a source file to work.

Tested on Octave-6.2.0 / Ubuntu 20.04



Martin K <grisu86>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by grisu86 (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-30 mtmiller StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code