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 06 Apr 2013 01:36:12 AM UTC  
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 01 Jun 2015 11:29:41 AM UTC, comment #6:

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

Mike Miller <mtmiller>
Project Member
Sat 13 Apr 2013 02:32:32 AM UTC, 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 09 Apr 2013 11:26:46 AM UTC, 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 08 Apr 2013 04:10:28 PM UTC, 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 08 Apr 2013 04:04:46 PM UTC, 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 08 Apr 2013 01:08:17 PM UTC, 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 06 Apr 2013 01:36:12 AM UTC, 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 01 Jun 2015 11:29:41 AM UTCmtmillerStatusNeed Info=>Fixed
    Mon 08 Apr 2013 04:10:28 PM UTCjordighCarbon-Copy-=>Added -unavailable-
    Mon 08 Apr 2013 01:08:34 PM UTCjordighStatusNone=>Need Info

    Back to the top

    Powered by Savane 3.1-cleanup