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

 
 

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

Submitter:  None
Submitted:  Sat 06 Apr 2013 01:36:12 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Dirk Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * Mac OS Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Dirk


Anonymous
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>
Group Member
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.

Anonymous
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>
Group Member
Sat 06 Apr 2013 01:36:12 AM UTC, original submission:  

Hi,

please add

#if defined(_APPLE_) && defined(_MACH_)
#include <machine/endian.h>
#define _BYTE_ORDER      __DARWIN_BYTE_ORDER
#define _LITTLE_ENDIAN   __DARWIN_LITTLE_ENDIAN
#define _BIG_ENDIAN      __DARWIN_BIG_ENDIAN
#endif

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

Thanks

Dirk

Anonymous

 

(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 schloegl (Posted a comment)
  • -email is unavailable- added by jordigh
  • -email is unavailable- added by jordigh (Posted a comment)
  •  

    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-06-01 mtmiller StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2013-04-08 jordigh Carbon-Copy- Added -email is unavailable-
    2013-04-08 jordigh StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code