Package: freeimage Version: 3.15.4-3 Tags: sid patch Severity: important User: [email protected] Usertags: mips-patch Control: block -1 by 763255
Package skimage FTBFS on testing for mips: > ====================================================================== > FAIL: test_freeimage.test_imread > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest > self.test(*self.arg) > File "/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line > 146, in skipper_func > return f(*args, **kwargs) > File > "/«PKGBUILDDIR»/debian/tmp/usr/lib/python2.7/dist-packages/skimage/io/tests/test_freeimage.py", > line 38, in test_imread > assert all(img[274, 135] == [0, 130, 253]) > AssertionError > > ---------------------------------------------------------------------- > Ran 1033 tests in 1239.576s > > FAILED (SKIP=20, failures=1) Test reads info from color.png with coordinates [274, 135]. Obtained result is [253 130 0], instead of expected [0, 130, 253]. It seems that color format is twisted (RGB -> BGR) during loading of PNG. The reason for that is a fact that big endian was not detected right in FreeImage.h. Patch that improves big endian detection in freeimage is attached. Using freeimage, that conatins these changes I was able to build skimage successfully on mips, with all tests passing. Could you please consider including this patch? The same test is failing on sparc and s390s (BE archs), I suppose that this fix could solve this issue on those architectures as well. Best Regards, Dejan
diff -uNr freeimage-3.15.4.orig/Source/FreeImage.h freeimage-3.15.4/Source/FreeImage.h --- freeimage-3.15.4.orig/Source/FreeImage.h 2014-09-30 15:13:07.000000000 +0000 +++ freeimage-3.15.4/Source/FreeImage.h 2014-09-30 15:23:06.000000000 +0000 @@ -73,6 +73,7 @@ // If your big endian system isn't being detected, add an OS specific check #if (defined(BYTE_ORDER) && BYTE_ORDER==BIG_ENDIAN) || \ (defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN) || \ + (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__) || \ defined(__BIG_ENDIAN__) #define FREEIMAGE_BIGENDIAN #endif // BYTE_ORDER

