bugGNU Octave - Bugs: bug #38670, NaN package: Fix to compile on OS X


bug #38670: NaN package: Fix to compile on OS X

Submitted by:  None
Submitted on:  Sat Apr 6 01:36:12 2013  
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: FixedAssigned to: None
Originator Name: DirkOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: Mac OS

Add a New Comment (Rich MarkupRich 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 Jun 1 11:29:41 2015, comment #6:

Seems to be fixed based on my reading of the comments, closing.

Mike Miller <mtmiller>
Project Administrator
Sat Apr 13 02:32:32 2013, comment #5:

Hi Alois,

I just noticed that you commited appropriate patches to SVN last year after 2.5.5 was released. So you can remove my patch again, and please release a new version 2.5.6. I like the 'pkg install -forge "nan"' feature :-)


Tue Apr 9 11:26:46 2013, comment #4:

I've included a patch similar to the one suggested by Dirk.

In order to clarify what xptopen is about, I've add the following documentation

XPTOPEN is C-MEX implementation for reading various
statistical data formats including SAS/XPT, SPSS/PASW,
STATA and ARFF data formats. Basic support for writing
SAS/XPT is also supported.
Endian conversion is done automatically.

There might be other ways of addressing the endianity issue (e.g. using htole##, ltohe## etc.). However, the current way is tested; if Dirk's suggestion is working for him, we can include it because its unlike that it will break something else.

Alois Schlögl <schloegl>
Mon Apr 8 16:10:28 2013, comment #3:

Of course you can avoid SOME_OS CPP macros. You check for features instead of checking for versions or systems.

At any rate, if SOME_OS macros are already there, perhaps it's ok to just keep using them.

Alois, can you comment on this?

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Mon Apr 8 16:04:46 2013, comment #2:

Endianess is important in the file "xptopen.cpp". There are already a log of #if SOME_OS CPP checks. I don't think one can "generally" avoid them in a low level programming language.

I don't know what xptopen.cpp is for, but it's the reason why installation of the NaN package 2.5.5 fails on OS X.

Mon Apr 8 13:08:17 2013, comment #1:

We generally discourage #if SOME_OS CPP checks. Instead, we should check for features.

Where is endinanness relevant in the NaN package? What should this endianness be?

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Sat Apr 6 01:36:12 2013, original submission:


please add

#if defined(_APPLE_) && defined(_MACH_)
#include <machine/endian.h>

to xptopen.cpp in order to allow for compilation of the NaN package on OS X.





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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by schloegl (Posted a comment)
  • -unavailable- added by jordigh
  • -unavailable- added by jordigh (Posted a comment)

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jun 1 11:29:41 2015mtmillerStatusNeed Info=>Fixed
    Mon Apr 8 16:10:28 2013jordighCarbon-Copy-=>Added -unavailable-
    Mon Apr 8 13:08:34 2013jordighStatusNone=>Need Info

    Back to the top

    Powered by Savane 3.1-cleanup1