Source: insighttoolkit4
Version: 4.3.1-1
Severity: wishlist
Tags: patch sid
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

insighttoolkit4 FTBFS on powerpcspe[1] like this:

[...]
[ 44%] Building C object 
Modules/ThirdParty/TIFF/src/itktiff/CMakeFiles/itktiff.dir/tif_predict.c.o
cd /«PKGBUILDDIR»/BUILD/Modules/ThirdParty/TIFF/src/itktiff && /usr/bin/gcc  
-Ditktiff_EXPORTS -DJPEG_SUPPORT -DZIP_SUPPORT -D_HPUX_SOURCE -g -O2 
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security 
-D_FORTIFY_SOURCE=2   -Wno-uninitialized -Wno-unused-parameter -Wall 
-Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch 
-Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings 
-funit-at-a-time -Wno-strict-overflow  -w -fno-strict-aliasing -O3 -DNDEBUG 
-fPIC -I/«PKGBUILDDIR»/BUILD/Modules/ThirdParty/TIFF/src/itktiff 
-I/«PKGBUILDDIR»/Modules/ThirdParty/TIFF/src/itktiff 
-I/«PKGBUILDDIR»/BUILD/Modules/ThirdParty/JPEG/src 
-I/«PKGBUILDDIR»/BUILD/Modules/ThirdParty/KWSys/src 
-I/«PKGBUILDDIR»/BUILD/Modules/ThirdParty/ZLIB/src 
-I/«PKGBUILDDIR»/BUILD/Modules/ThirdParty/TIFF/src 
-I/«PKGBUILDDIR»/Modules/ThirdParty/TIFF/src    -o 
CMakeFiles/itktiff.dir/tif_predict.c.o   -c /«PKGBUILDDIR»/
 Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c
/«PKGBUILDDIR»/Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c: In function 
'fpAcc':
/«PKGBUILDDIR»/Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c:394:26: 
error: #if with no expression
/«PKGBUILDDIR»/Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c: In function 
'fpDiff':
/«PKGBUILDDIR»/Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c:563:26: 
error: #if with no expression
make[3]: *** 
[Modules/ThirdParty/TIFF/src/itktiff/CMakeFiles/itktiff.dir/tif_predict.c.o] 
Error 1
make[3]: Leaving directory `/«PKGBUILDDIR»/BUILD'
make[2]: *** [Modules/ThirdParty/TIFF/src/itktiff/CMakeFiles/itktiff.dir/all] 
Error 2
make[2]: Leaving directory `/«PKGBUILDDIR»/BUILD'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/«PKGBUILDDIR»/BUILD'
dh_auto_build: make -j1 returned exit code 2
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
[...]

This is because of WORDS_BIGENDIAN (which is either defined or not) used as
"#if WORDS_BIGENDIAN". The attached patch fixes this by using #ifdef instead
(as in the other places in the package). This is definitely an upstream bug,
and not very powerpcspe related at all.

Unfortunately, after applying this fix, the build runs amok by printing:

"""
**********************************
truth values: Initialize
truth values: GetValueAndDerivative
truth values: Iterate over region
* Testing with identity transforms...
Check Value return values...
--Number of threads used: 1
"""

much later on in an infinite loop. This needs to be investgated separately.

I'm filing this patch just because it might be useful anyway.

Thanks,

Roland


[1] http://wiki.debian.org/PowerPCSPEPort

-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.8.0 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
--- insighttoolkit4-4.3.1.orig/Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c
+++ insighttoolkit4-4.3.1/Modules/ThirdParty/TIFF/src/itktiff/tif_predict.c
@@ -391,7 +391,7 @@ fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc
   for (count = 0; count < wc; count++) {
     uint32 byte;
     for (byte = 0; byte < bps; byte++) {
-      #if WORDS_BIGENDIAN
+      #ifdef WORDS_BIGENDIAN
       cp[bps * count + byte] = tmp[byte * wc + count];
       #else
       cp[bps * count + byte] =
@@ -560,7 +560,7 @@ fpDiff(TIFF* tif, uint8* cp0, tmsize_t c
   for (count = 0; count < wc; count++) {
     uint32 byte;
     for (byte = 0; byte < bps; byte++) {
-      #if WORDS_BIGENDIAN
+      #ifdef WORDS_BIGENDIAN
       cp[byte * wc + count] = tmp[bps * count + byte];
       #else
       cp[(bps - byte - 1) * wc + count] =

Reply via email to