View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005904ITKpublic2007-10-19 16:142008-01-03 15:07
ReporterMathieu Coursolle 
Assigned ToBill Lorensen 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005904: Nrrd related ITK tests fail in 64 bits.
DescriptionWhen running ctest in 64 bits, the tests using the Nrrd library fail.
See as an example:
http://www.itk.org/Testing/Sites/redwall.kitware/Win64-Vista-vs8-Release/20071015-0100-Nightly/Test.html [^]

This was also noticed on Mac OSX.

Additional InformationCopy of a post on the mailing list related to this issues:

Hi ITK developpers,

We currently have a private dashboard (OSX) which is doing a universal
32 and 64 bits nightly build
of ITK. (CMAKE_OSX_ARCHITECTURES = i386; x86_64)

However, a lots of ITK tests related to the Nrrd library are failing (0000110:0000040).

Our ITK build is both 32 and 64 bits (i386 and x86_64). However, the
TEEM_32BIT flag
of the Nrrd library is defined according to the size of a void pointer
when cmake configures.

In the case of a universal 32-64 bits build, that flag cannot be the
same for both builds,
and therefore needs to depend on something else.

We could check in the itkConfigures.h.in for the __LP64__ definition
which tells if an apple
build is 64 bits:

/* 32 or 64 bits. */
/* All compilers that support Mac OS X define __LP64__ if the architecture is
   64 bits. */
#if !defined(__APPLE__)
  #cmakedefine CMAKE_SIZEOF_VOID_P
  #if CMAKE_SIZEOF_VOID_P == 8
    #define ITK_32BITS 0
  #else
    #define ITK_32BITS 1
  #endif
#elif defined(__LP64__) && __LP64__
  #define ITK_32BITS 0
#else
  #define ITK_32BITS 1
#endif

However, in the NrrdIO/CMakeList.txt file, the TEEM_32BIT flag is set
as follow:

IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
  ADD_DEFINITIONS(-DTEEM_32BIT=0)
ELSE(CMAKE_SIZEOF_VOID_P MATCHES 8)
  ADD_DEFINITIONS(-DTEEM_32BIT=1)
ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8)

Is there a way to set TEEM_32BIT to the value of ITK_32BITS definition
at that point?

Example:

# Set compiler flags for 32 or 64 bit architecture (based on the size
# of a void pointer).
IF(APPLE)
  ADD_DEFINITIONS(-DTEEM_32BIT=ITK_32BITS)
ELSE(APPLE)
  IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
    ADD_DEFINITIONS(-DTEEM_32BIT=0)
  ELSE(CMAKE_SIZEOF_VOID_P MATCHES 8)
    ADD_DEFINITIONS(-DTEEM_32BIT=1)
  ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8)
ENDIF(APPLE)

It seems like it is always define as 0 if I do this.

Any idea on how this could be solve?

Thank you.

Mathieu
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Files

 Relationships

  Notes
(0009767)
Bill Lorensen (developer)
2007-11-27 20:19

BUG: Fixed sscanf format issue for Win64 and long integers.
     Thanks to Eran for tracking the issue and to
     Gordon and Steve for finding a solution.
(0009798)
Sean McBride (developer)
2007-11-30 10:45

Doesn't the submitter of a bug decide if it's fixed? :)

While I'm sure Bill's checkin fixed something, I don't believe it addresses the TEEM_32BIT issue discussed here.

You can see a dashboard with all the nrrd tests failing here:
http://www.itk.org/Testing/Sites/RogueResearch4/Mac10.5-InsightBS-dbg/20071129-0100-Nightly/Test.html [^]
(0009800)
Bill Lorensen (developer)
2007-11-30 11:39

Apparently, as Sean pointed out, only part of this bug was resolved. The Mac still has problems.
(0010022)
Bill Lorensen (developer)
2007-12-25 12:11

Added file NrrdConfigure.h.in that generates NrrdConfigure.h. This header file contains the preprocessor logic that sets TEEM_32BIT. Previously, TEEM_32BIT was set with compiler -D flags. This new approach was required to accommodate the Mac OS X 64 bit systems.

After cvs commit, all of the previously failing nrrd-related tests are passing on the Mac OS X 64 bit builds.

 Issue History
Date Modified Username Field Change
2007-10-19 16:14 Mathieu Coursolle New Issue
2007-11-27 20:19 Bill Lorensen Note Added: 0009767
2007-11-27 20:19 Bill Lorensen Status new => resolved
2007-11-27 20:19 Bill Lorensen Resolution open => fixed
2007-11-27 23:34 Bill Lorensen Status resolved => closed
2007-11-30 10:45 Sean McBride Assigned To => Bill Lorensen
2007-11-30 10:45 Sean McBride Status closed => feedback
2007-11-30 10:45 Sean McBride Resolution fixed => reopened
2007-11-30 10:45 Sean McBride Note Added: 0009798
2007-11-30 11:38 Bill Lorensen Status feedback => assigned
2007-11-30 11:38 Bill Lorensen Assigned To Bill Lorensen => Luis Ibanez
2007-11-30 11:39 Bill Lorensen Note Added: 0009800
2007-12-24 16:06 Bill Lorensen Assigned To Luis Ibanez => Bill Lorensen
2007-12-25 12:11 Bill Lorensen Status assigned => resolved
2007-12-25 12:11 Bill Lorensen Resolution reopened => fixed
2007-12-25 12:11 Bill Lorensen Note Added: 0010022
2008-01-03 15:07 Mathieu Coursolle Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team