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

 
 

bug #48559: F77_USES_GFORTRAN_CALLING_CONVENTION not defined

Submitter:  Robert Jenssen <morgawr>
Submitted:  Tue 19 Jul 2016 08:53:10 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Robert Jenssen Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Jul 2016 06:37:45 PM UTC, comment #2: 

Works for me, I can install the control package.

For the broader issue of f77-fcn.h being public, I think we can address that later, we have a half dozen Forge packages all including that header file to get instructions on how to link with Fortran: control, linear-algebra, nlwing2, odepkg, optim, optiminterp, and tisean.

Mike Miller <mtmiller>
Group Member
Tue 19 Jul 2016 12:57:33 PM UTC, comment #1: 

For now, I think I've fixed that here:

http://hg.savannah.gnu.org/hgweb/octave/rev/1bd872efdab5

Longer term, I'm not sure that we should continue to install f77-fcn.h.  No other public Octave header uses it, and knowing how a package should interface with Fortran is something that should be determined when your package is configured.  It doesn't seem right to me that Octave would determine that for you since you might be using a different compiler than was used when Octave was built.

To help with writing the configure checks, we could make the code we use in configure.ac available as autoconf macros.

See also bug #41027.

John W. Eaton <jwe>
Group administrator
Tue 19 Jul 2016 08:53:10 AM UTC, original submission:  

For HG-ID="62208397b99e+". I am using FC24 with gcc-6.1.1-3. I tried to install the Octave-Forge control-3.0.0.tar.gz package. It fails with the error message:


In file included from sl_ab08nd.cc:31:0,
                 from __control_slicot_functions__.cc:1:
/usr/local/include/octave-4.1.0+/octave/f77-fcn.h:327:2: error: #error "unknown C++ to Fortran calling convention"
 #error "unknown C++ to Fortran calling convention"
  ^~~~~
/usr/local/include/octave-4.1.0+/octave/f77-fcn.h:362:1: error: ‘F77_RET_T’ does not name a type
 F77_RET_T
 ^~~~~~~~~


The  config.h in the build directory has:

#define F77_USES_GFORTRAN_CALLING_CONVENTION 1


but this symbol does not seem to be defined anywhere in /usr/local/include/octave-4.1.0+:
+verbatim-
# find /usr/local/include/octave-4.1.0+ -type f -exec grep -H CALLING_CONVENTION {} ';'
/usr/local/include/octave-4.1.0+/octave/oct-conf-post.h:#  define F77_USES_CRAY_CALLING_CONVENTION
/usr/local/include/octave-4.1.0+/octave/oct-conf-post.h:#  define F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION
/usr/local/include/octave-4.1.0+/octave/f77-fcn.h:#if defined (F77_USES_CRAY_CALLING_CONVENTION)
/usr/local/include/octave-4.1.0+/octave/f77-fcn.h:#elif defined (F77_USES_VISUAL_FORTRAN_CALLING_CONVENTION)
/usr/local/include/octave-4.1.0+/octave/f77-fcn.h:#elif defined (F77_USES_GFORTRAN_CALLING_CONVENTION)
/usr/local/include/octave-4.1.0+/octave/f77-fcn.h:#elif defined (F77_USES_F2C_CALLING_CONVENTION)
-verbatim-

If I forcibly define it in f77-fcn.h then the package installs OK.

Robert Jenssen <morgawr>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by morgawr (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-19 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-07-19 jwe StatusNone Ready For Test

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code