tech-pkg archive

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

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

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)

... but I have no CMake clue and no idea what this dance is about.


Home | Main Index | Thread Index | Old Index