I'm working on a an older, CentOS 5, x86_64 machine. I use it for regression testing of some libraries. The machine provides GCC 4.1 and glibc 2.5, and the machine lacks htobe64, be64toh, __builtin_bswap64 and friends.
I need some up to date tools on the old machine, and Unbound gets built as a dependency. Attempting a compile results in:
.libs/cachedb.o: In function `prep_data':
/home/jwalton/Build-Scripts/unbound-1.9.1/cachedb/cachedb.c:400: undefined reference to `htobe64'
/home/jwalton/Build-Scripts/unbound-1.9.1/cachedb/cachedb.c:401: undefined reference to `htobe64'
.libs/cachedb.o: In function `good_expiry_and_qinfo':
/home/jwalton/Build-Scripts/unbound-1.9.1/cachedb/cachedb.c:424: undefined reference to `be64toh'
.libs/cachedb.o: In function `parse_data':
/home/jwalton/Build-Scripts/unbound-1.9.1/cachedb/cachedb.c:484: undefined reference to `be64toh'
/home/jwalton/Build-Scripts/unbound-1.9.1/cachedb/cachedb.c:485: undefined reference to `be64toh'
collect2: ld returned 1 exit status
gmake: *** [unbound-checkconf] Error 1
Failed to build Unbound
You might want to use a TRY_LINK test (not a TRY_COMPILE test) for htobe64 and be64toh since missing symbols may not cause a compile failure.
Update: I was testing an older version of Unbound. If this has been fixed, please close/delete this report.
The text was updated successfully, but these errors were encountered:
The commit above performs the TRY_LINK that you suggest, and tests for the function and provides a workaround if it is not present. If it does not work, please show what goes wrong in the configure.ac and config.log output (for htobe64), or what the compiler reports.