bugGNU Octave - Bugs: bug #43318, [MinGW] "unknown type name...

 
 

bug #43318: [MinGW] "unknown type name 'int64_t'" with --enable-64 when compiling some OF packages

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Sun 28 Sep 2014 03:16:49 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 19 Mar 2015 09:40:33 PM UTC, comment #8: 

This bug has been fixed with this (other) changeset:
http://hg.savannah.gnu.org/hgweb/octave/rev/dbdc60e36dbc

See also bug #43805

Philip Nienhuis <philipnienhuis>
Group Member
Fri 12 Dec 2014 09:31:45 PM UTC, comment #7: 

Indeed, just patching mxarry.h alongthe lines you sketched in the installed Octave tree makes ltfat install fine :-)

Then doing:

addpath (strrep (which ('ltfathelp'), 'ltfathelp.m', 'private'));
test_demos
:
test_pgauss


at least suggests that the package runs fine....

BYW it seems <cstdint> is only included in C+11 / clang. We have to make do with <stdint.h>

Philip Nienhuis <philipnienhuis>
Group Member
Fri 12 Dec 2014 09:22:01 PM UTC, comment #6: 

It should be required for the patch except to verify that octave still compiles ok with the patch applied.

My comment applied more to the fact that I had previously just compiled octave with 64 bit, but the supporting libraries (suitesparse etc) was still built without the enable-64 option.

So the patch is required in order for the packages to install successfully in windows, however it isn't the only issue.

John Donoghue <lostbard>
Group Member
Fri 12 Dec 2014 09:02:30 PM UTC, comment #5: 

Q: is a complete new mxe-octave build required or would it suffice to patch mxarray.h in the installed Octave directory tree? I guess the former. But I can give it a try here...

quaternion, data-smoothing, fuzzy-logic and optim install fine with current Octave sources with or without patch.

Indeed, odepkg, fl-core, netcdf, image and ltfat have more profound problems. And that's only packages included in mxe-octave - who knows what problems turn up when more packages get included.

IIRC the compile error you showed for image is the same that I've got ever since I started with 64bit mingw cross-builds a few months ago. So it seems to be separate from the <stdint.h> / <cstdint> issue.


Philip Nienhuis <philipnienhuis>
Group Member
Fri 12 Dec 2014 05:25:27 PM UTC, comment #4: 

ltfat will installed ok on my 64 bit 3.8.2 with it moved.

I believe quaterian, fuzzy logic installed ok on 64 bit 3.8.2 without the change.

I was going to do a new install just to make sure.

The image odepkg, fl-core, netcdf packages now have a different problem.


>> pkg install image-2.2.2.tar.gz
__spatial_filtering__.cc: In instantiation of 'ET_OUT entropy_filt(MT&, octave_idx_type, int) [with ET = octave_int<signed
 char>; MT = intNDArray<octave_int<signed char> >; ET_OUT = double; octave_idx_type = long long int]':
__spatial_filtering__.cc:600:9:   required from here
__spatial_filtering__.cc:191:25: error: conversion from 'octave_int<signed char>' to 'octave_idx_type {aka long long int}'
 is ambiguous
     hist (vals (i) + add) ++;
                        ^
__spatial_filtering__.cc:191:25: note: candidates are:
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/idx-vector.h:35:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:36,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:884:3: note: octave_int<T>::operator float() c
onst [with T = signed char]
   operator float (void) const { return float_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:882:3: note: octave_int<T>::operator double()
const [with T = signed char]
   operator double (void) const { return double_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:878:3: note: octave_int<T>::operator T() const
 [with T = signed char]
   operator T (void) const { return value (); }
   ^
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:389:6: note: initializing argument 1 of 'T& Array<T>:
:operator()(octave_idx_type) [with T = double; octave_idx_type = long long int]'
   T& operator () (octave_idx_type n) { return elem (n); }
      ^
__spatial_filtering__.cc:193:25: error: conversion from 'octave_int<signed char>' to 'octave_idx_type {aka long long int}'
 is ambiguous
    hist (vals (i) + add) /= (double)len;
                         ^
__spatial_filtering__.cc:193:25: note: candidates are:
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/idx-vector.h:35:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:36,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:884:3: note: octave_int<T>::operator float() c
onst [with T = signed char]
   operator float (void) const { return float_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:882:3: note: octave_int<T>::operator double()
const [with T = signed char]
   operator double (void) const { return double_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:878:3: note: octave_int<T>::operator T() const
 [with T = signed char]
   operator T (void) const { return value (); }
   ^
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:389:6: note: initializing argument 1 of 'T& Array<T>:
:operator()(octave_idx_type) [with T = double; octave_idx_type = long long int]'
   T& operator () (octave_idx_type n) { return elem (n); }
      ^
__spatial_filtering__.cc: In instantiation of 'ET_OUT entropy_filt(MT&, octave_idx_type, int) [with ET = octave_int<unsign
ed char>; MT = intNDArray<octave_int<unsigned char> >; ET_OUT = double; octave_idx_type = long long int]':
__spatial_filtering__.cc:602:9:   required from here
__spatial_filtering__.cc:191:25: error: conversion from 'octave_int<unsigned char>' to 'octave_idx_type {aka long long int
}' is ambiguous
     hist (vals (i) + add) ++;
                         ^
__spatial_filtering__.cc:191:25: note: candidates are:
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/idx-vector.h:35:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:36,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:884:3: note: octave_int<T>::operator float() c
onst [with T = unsigned char]
   operator float (void) const { return float_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:882:3: note: octave_int<T>::operator double()
const [with T = unsigned char]
   operator double (void) const { return double_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:878:3: note: octave_int<T>::operator T() const
 [with T = unsigned char]
   operator T (void) const { return value (); }
   ^
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:389:6: note: initializing argument 1 of 'T& Array<T>:
:operator()(octave_idx_type) [with T = double; octave_idx_type = long long int]'
   T& operator () (octave_idx_type n) { return elem (n); }
      ^
__spatial_filtering__.cc:193:25: error: conversion from 'octave_int<unsigned char>' to 'octave_idx_type {aka long long int
}' is ambiguous
     hist (vals (i) + add) /= (double)len;
                         ^
__spatial_filtering__.cc:193:25: note: candidates are:
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/idx-vector.h:35:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:36,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:884:3: note: octave_int<T>::operator float() c
onst [with T = unsigned char]
   operator float (void) const { return float_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:882:3: note: octave_int<T>::operator double()
const [with T = unsigned char]
   operator double (void) const { return double_value (); }
   ^
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct-inttypes.h:878:3: note: octave_int<T>::operator T() const
 [with T = unsigned char]
   operator T (void) const { return value (); }
   ^
In file included from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/boolMatrix.h:27:0,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/mx-base.h:32,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Matrix.h:30,
                 from C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/oct.h:33,
                 from __spatial_filtering__.cc:21:
C:\Octave\octave-3.8.2\include\octave-3.8.2\octave\../octave/Array.h:389:6: note: initializing argument 1 of 'T& Array<T>:
:operator()(octave_idx_type) [with T = double; octave_idx_type = long long int]'
   T& operator () (octave_idx_type n) { return elem (n); }
      ^
make: *** [__spatial_filtering__.oct] Error 1
make: Entering directory `/tmp/oct-38/image/src'
C:/Octave/octave-3.8.2/bin/mkoctfile-3.8.2.exe __spatial_filtering__.cc
make: Leaving directory `/tmp/oct-38/image/src'

pkg: error running `make' for the image package.
error: called from 'configure_make' in file C:\Octave\octave-3.8.2\share\octave\3.8.2\m\pkg\private\configure_make.m near
line 82, column 9
error: called from:
error:   C:\Octave\octave-3.8.2\share\octave\3.8.2\m\pkg\private\install.m at line 199, column 5
error:   C:\Octave\octave-3.8.2\share\octave\3.8.2\m\pkg\pkg.m at line 394, column 9
>>




John Donoghue <lostbard>
Group Member
Fri 12 Dec 2014 04:43:29 PM UTC, comment #3: 

The idea was taken from the thread post mentioned in "original submission" below, the poster in that thread gave no further info. I'm not proficient in C++ so there's undoubtedly room for improvement.

The changeset did make a difference around October; it allowed to install a few OF packages [*] that didn't without this patch. But yes, in recent MXE builds it doesn't seem to be make a difference anymore (the OF packages in question do install without it now).
Whether that is due to a newer mingw/gcc?

Does your change (moving it up & include <cstdint> help to get OF image, odepkg, fl-core, ltfat and netcdf installed? That would be awesome. I can only try it here much later tonight or tomorrow.


[*] (see Task #13313, orig. subm.) data-smoothing, fuzzy-logic, optim and quaternion

Philip Nienhuis <philipnienhuis>
Group Member
Fri 12 Dec 2014 02:23:00 PM UTC, comment #2: 

Changeset does not appear to work for me.
In mxarray.in.h, mwSize,mwIndex and mmwSignedIndex are typedefed to int64_t when in 64 bit mode.

But the #include <stdint.h> is below that.

If the include is added just before the typedefs for mwSize, then it appears to work ok for me.

It should also probally be <cstdint> rather than <stdint.h> ?

John Donoghue <lostbard>
Group Member
Sun 28 Sep 2014 03:18:35 PM UTC, comment #1: 

Here's a changeset

(file #32193)

Philip Nienhuis <philipnienhuis>
Group Member
Sun 28 Sep 2014 03:16:49 PM UTC, original submission:  

See this thread:
http://octave.1599824.n4.nabble.com/MXE-mingw-quot-unknown-type-name-int64-t-quot-with-enable-64-when-compiling-mex-files-tt4666187.html

In this thread "Rafael" suggested a fix that helps to get more OF packages to install on Octave built with --enable-64.
I tried the fix in the last weeks; AFAICS it doesn't have adverse effects on Octave on 32- and 64 bit Linux and Windows, and indeed helps to get more OF packages building on 64-bit MinGW Octave.

I'll upload the changeset in a next post.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32193:  mxarray_h_in.cs added by philipnienhuis (596B - text/x-csharp)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by philipnienhuis (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-19 philipnienhuis StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2014-09-28 philipnienhuis Attached File- Added mxarray_h_in.cs, #32193
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code