bitcoin: Can't compile bitcoin for SmartOS - recipe for target 'compat/libbitcoin_util_a-glibc_sanity.o' failed

After fixing #13580 my build still fails with…

CXX compat/libbitcoin_util_a-glibc_sanity.o
In file included from compat/glibc_sanity.cpp:12:0:
compat/glibc_sanity.cpp: In function 'bool {anonymous}::sanity_test_fdelt()':
compat/glibc_sanity.cpp:53:5: error: 'memset' was not declared in this scope
FD_ZERO(&fds);
^
Makefile:6248: recipe for target 'compat/libbitcoin_util_a-glibc_sanity.o' failed
make[2]: *** [compat/libbitcoin_util_a-glibc_sanity.o] Error 1
make[2]: Leaving directory '/opt/local/src/bitcoin/src'
Makefile:9824: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/opt/local/src/bitcoin/src'
Makefile:757: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I have attached config.log for your review.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@Empact sadly this is just a bug in SmartOS’s libc. glibc even makes a note about not using memset for this reason.

We can work around it by splitting glibc_sanity.cpp into two pieces: One for sanity_test_memcpy and one for sanity_test_fdelt. Once split, the file with sanity_test_fdelt can safely include string.h.