bugGNU Octave - Bugs: bug #46060, netcdf package: fails to build...

 
 

bug #46060: netcdf package: fails to build with octave built with --enable-64

Submitted by:  John Donoghue <lostbard>
Submitted on:  Sun 27 Sep 2015 01:33:52 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: lostbardOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 02 May 2016 06:12:36 PM UTC, comment #11:

Alright, looks to be fixed, closing.

Mike Miller <mtmiller>
Project Administrator
Mon 02 May 2016 04:46:20 PM UTC, comment #10:
John Donoghue <lostbard>
Project Member
Mon 02 May 2016 11:42:04 AM UTC, comment #9:

try test_netcdf
(test are written to be matlab compatible)

Alexander Barth <abarth>
Tue 26 Apr 2016 08:18:45 PM UTC, comment #8:

compiles for me, running tests on it:

John Donoghue <lostbard>
Project Member
Tue 26 Apr 2016 04:41:02 PM UTC, comment #7:

ok - will recompile

John Donoghue <lostbard>
Project Member
Tue 26 Apr 2016 11:48:39 AM UTC, comment #6:

Thank you Mike for your very helpful comments.

John, can you try with the attached package (netcdf-1.0.10) to check if it solves the problem?

(file #36996)

Alexander Barth <abarth>
Mon 28 Mar 2016 10:10:27 PM UTC, comment #5:

Actually the bug is that there actually is no constructor for octave_value with an Array<int>.

The only reason this has ever worked by accident is because there is a constructor for octave_value that takes an Array<octave_idx_type> which may be either a 32-bit or 64-bit integer. You should not rely on that to coincide with the type "int".

I am not at all familiar with the netcdf code or what the function is trying to return, but maybe use one of Octave's sized integer types instead?

At a glance it looks like you need to pass a pointer to the underlying array into the netcdf library. Maybe use an actual int array or vector, and have some conditional logic that says if sizeof(int) is not equal to sizeof(octave_int32) then copy the contents into an Array<octave_int64>?

Mike Miller <mtmiller>
Project Administrator
Tue 15 Mar 2016 10:06:36 AM UTC, comment #4:

Thank you for testing. I filled a bug against octave since this is independent of the netcdf package.

https://savannah.gnu.org/bugs/index.php?47416

I prefer not to use your workaround (using double) as it results in a lost of precision. If this is the only way, I will included it with CPP macros making it only active on windows.

Alexander Barth <abarth>
Wed 27 Jan 2016 01:13:56 PM UTC, comment #3:

I get the same result as you do in comment #1 in both win32 and win64 versions of octave 4.0.1-rc3.

John Donoghue <lostbard>
Project Member
Wed 27 Jan 2016 09:23:26 AM UTC, comment #2:

Using double for integer identifier is not an optimal solution. Maybe we can find something better.

Can you compile and run the attached code helloworld_con.cc on your system?

On my system:
mkoctfile helloworld_con.cc
octave --eval helloworld_con
[...]
ans =

0 1 2

It makes the casting more explicit.
Thanks!

(file #36173)

Alexander Barth <abarth>
Wed 30 Sep 2015 12:08:26 PM UTC, comment #1:

Pushed temporary fix to mxe-octave - http://hg.octave.org/mxe-octave/rev/85abb6c3ec8b

John Donoghue <lostbard>
Project Member
Sun 27 Sep 2015 01:33:52 PM UTC, original submission:

Perhaps only a windows issue, when attempting to compile netcdf using mxe-octave built with the --enable-64 option, it fails to build with errors such as:

The following patch works for me.

John Donoghue <lostbard>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36996:  netcdf-1.0.10.tar.gz added by abarth (69KiB - application/gzip)
file #36173:  helloworld_con.cc added by abarth (282B - text/x-c++src)
file #34995:  of-netcdf-1-fixes.patch added by lostbard (2KiB - text/x-patch)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by abarth (Updated the item)
  • -unavailable- added by lostbard (Submitted the item)
  • -unavailable- added by lostbard
  •  

    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):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 02 May 2016 06:12:36 PM UTCmtmillerStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Tue 26 Apr 2016 11:48:39 AM UTCabarthAttached File-=>Added netcdf-1.0.10.tar.gz, #36996
    Mon 28 Mar 2016 10:10:27 PM UTCmtmillerOperating SystemMicrosoft Windows=>Any
      Summary[octave forge] netcdf pacage fails to build with octave 32 built with --enable-64=>netcdf package: fails to build with octave built with --enable-64
    Wed 27 Jan 2016 09:23:26 AM UTCabarthAttached File-=>Added helloworld_con.cc, #36173
    Tue 29 Sep 2015 10:32:45 AM UTClostbardStatusNone=>Patch Submitted
    Sun 27 Sep 2015 01:37:54 PM UTClostbardDependencies-=>bugs #43908 is dependent
    Sun 27 Sep 2015 01:33:52 PM UTClostbardAttached File-=>Added of-netcdf-1-fixes.patch, #34995
      Carbon-Copy-=>Added abarth

    Back to the top


    Powered by Savane 3.1-cleanup1