Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: 'be16toh' macro redefined ... ld: error: undefined symbol: letoh16 #190

Open
yurivict opened this issue May 20, 2021 · 0 comments

Comments

@yurivict
Copy link

yurivict commented May 20, 2021

/disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/portable_endian.h:52:9: warning: 'be16toh' macro redefined [-Wmacro-redefined]
#define be16toh(x) betoh16(x)
        ^
/usr/include/sys/endian.h:77:9: note: previous definition is here
#define be16toh(x)      bswap16((x))
        ^
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/test/net_tests.c:6:
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/serialize.h:34:
/disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/portable_endian.h:53:9: warning: 'le16toh' macro redefined [-Wmacro-redefined]
#define le16toh(x) letoh16(x)
        ^
/usr/include/sys/endian.h:80:9: note: previous definition is here
#define le16toh(x)      ((uint16_t)(x))
        ^
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/test/net_tests.c:6:
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/serialize.h:34:
/disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/portable_endian.h:55:9: warning: 'be32toh' macro redefined [-Wmacro-redefined]
#define be32toh(x) betoh32(x)
        ^
/usr/include/sys/endian.h:78:9: note: previous definition is here
#define be32toh(x)      bswap32((x))
        ^
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/test/net_tests.c:6:
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/serialize.h:34:
/disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/portable_endian.h:56:9: warning: 'le32toh' macro redefined [-Wmacro-redefined]
#define le32toh(x) letoh32(x)
        ^
/usr/include/sys/endian.h:81:9: note: previous definition is here
#define le32toh(x)      ((uint32_t)(x))
        ^
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/test/net_tests.c:6:
In file included from /disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/serialize.h:34:
/disk-samsung/freebsd-ports/finance/libbtc/work/libbtc-0793399/include/btc/portable_endian.h:58:9: warning: 'be64toh' macro redefined [-Wmacro-redefined]
#define be64toh(x) betoh64(x)
        ^
...
...
ld: error: undefined symbol: letoh16
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_u16) in archive libbtc.a
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_varlen) in archive libbtc.a
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_varlen_from_file) in archive libbtc.a
>>> referenced 3 more times

ld: error: undefined symbol: letoh32
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_s32) in archive libbtc.a
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_u32) in archive libbtc.a
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_varlen) in archive libbtc.a
>>> referenced 8 more times

ld: error: undefined symbol: letoh64
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_u64) in archive libbtc.a
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_varlen) in archive libbtc.a
>>> referenced by serialize.c
>>>               serialize.c.o:(deser_varlen_from_file) in archive libbtc.a
>>> referenced 4 more times

OS: FreeBSD 13

@yurivict yurivict changed the title warning: 'be16toh' macro redefined, etc warning: 'be16toh' macro redefined ... ld: error: undefined symbol: letoh16 May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant