[Pkg-phototools-devel] openimageio: FTBFS on powerpc and s390x: Package pdftex.def Error: File `figures/flip.jpg' not found
Aurelien Jarno
aurelien at aurel32.net
Thu Jun 26 09:46:42 UTC 2014
tag 752449 + patch
thanks
On Mon, Jun 23, 2014 at 05:51:22PM +0200, Emilio Pozuelo Monfort wrote:
> Package: src:openimageio
> Version: 1.4.9~dfsg0-2
> Severity: serious
>
> openimageio 1.4.9~dfsg0-2 seems much better build-wise than 1.4.9~dfsg0-1.
> Still, it failed to build on powerpc and s390x:
>
> ! Package pdftex.def Error: File `figures/flip.jpg' not found.
>
> See the pdftex.def package documentation for explanation.
> Type H <return> for immediate help.
> ...
>
> l.382 ...egraphics[width=1.25in]{figures/flip.jpg}
> \\
> ! ==> Fatal error occurred, no output PDF file produced!
> Transcript written on openimageio.log.
> make[2]: *** [openimageio.pdf] Error 1
>
>
> See https://buildd.debian.org/status/logs.php?pkg=openimageio&ver=1.4.9~dfsg0-2&suite=sid
All these platforms are big endian. In most of the case it means a
pointer is casted to do a type conversion. This is also the case there,
in the atomic_exchange_and_add() function. A pointer to long long is
cast to a pointer to int. In practice the cast is not even needed, so I
also removed it in the int case.
Note that the issue also concerns little endian platform, though it only
affects negative values and values greater than 2**31.
--- openimageio-1.4.10~dfsg0.orig/src/include/OpenImageIO/thread.h
+++ openimageio-1.4.10~dfsg0/src/include/OpenImageIO/thread.h
@@ -220,7 +220,7 @@ atomic_exchange_and_add (volatile int *a
#ifdef NOTHREADS
int r = *at; *at += x; return r;
#elif defined(OIIO_USE_GCC_NEW_ATOMICS)
- return __atomic_fetch_add ((int *)at, x, __ATOMIC_SEQ_CST);
+ return __atomic_fetch_add (at, x, __ATOMIC_SEQ_CST);
#elif defined(USE_GCC_ATOMICS)
return __sync_fetch_and_add ((int *)at, x);
#elif defined(_MSC_VER)
@@ -239,7 +239,7 @@ atomic_exchange_and_add (volatile long l
#ifdef NOTHREADS
long long r = *at; *at += x; return r;
#elif defined(OIIO_USE_GCC_NEW_ATOMICS)
- return __atomic_fetch_add ((int *)at, x, __ATOMIC_SEQ_CST);
+ return __atomic_fetch_add (at, x, __ATOMIC_SEQ_CST);
#elif defined(USE_GCC_ATOMICS)
return __sync_fetch_and_add (at, x);
#elif defined(_MSC_VER)
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien at aurel32.net http://www.aurel32.net
More information about the Pkg-phototools-devel
mailing list