Skip to content

undefined reference to `htobe64' #157

@noloader

Description

@noloader

Hi Everyone,

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions