tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CMake help needed: graphics/openexr does not compile on big endian machines



On Thu, Sep 16, 2021 at 09:17:25PM +0200, Martin Husemann wrote:
> Trying to build graphics/openexr on sparc64 fails with:
> 
> /usr/pkgobj/graphics/openexr/work/openexr-3.1.1/src/test/OpenEXRTest/testFutureProofing.cpp: In function 'void {anonymous}::modifyType(bool)':
> /usr/pkgobj/graphics/openexr/work/openexr-3.1.1/src/test/OpenEXRTest/testFutureProofing.cpp:1225:19: error: 'bswap_32' was not declared in this scope; did you mean 'bswap32'?
>  1225 |          length = bswap_32(length);
>       |                   ^~~~~~~~
>       |                   bswap32
> 
> 
> This should be fixed by bswap_32.h in that directory by definining __BSWAP_RENAME:
> 
> #elif defined(__NetBSD__)
> #include <sys/types.h>
> #include <machine/bswap.h>
> #if defined(__BSWAP_RENAME) && !defined(__bswap_32)
> #define bswap_32(x) bswap32(x)
> #endif

It should be using sys/bswap.h and then just #define bswap_32(x) bswap32(x) ?

Joerg


Home | Main Index | Thread Index | Old Index