Closed bgeet closed 4 years ago
Thanks for reporting! I happened to notice something similar but wasn't sure if it was just my hacked version of OSX - looks like actual OSX has the same (weird) issue.
Could you give the following a try?
In src/common.h, find
#if defined(__cplusplus) && __cplusplus > 201100 && !(defined(_MSC_VER) && defined(__clang__))
replace with
#if defined(__cplusplus) && __cplusplus > 201100 && !(defined(_MSC_VER) && defined(__clang__)) && !defined(__APPLE__)
See if that works for you.
I got another issue with _lzcnt_u32
not being found. I added the following to the same file, just before the last line (#endif /* __YENC_COMMON */
):
// weird thing with Apple's Clang
#if defined(__clang__) && defined(__APPLE__)
# define _lzcnt_u32 __lzcnt32
#endif
In src/common.h, find
#if defined(__cplusplus) && __cplusplus > 201100 && !(defined(_MSC_VER) && defined(__clang__))
replace with
#if defined(__cplusplus) && __cplusplus > 201100 && !(defined(_MSC_VER) && defined(__clang__)) && !defined(__APPLE__)
See if that works for you.
Builds. Thanks a lot.
I got another issue with
_lzcnt_u32
not being found. I added the following to the same file, just before the last line (#endif /* __YENC_COMMON */
):// weird thing with Apple's Clang #if defined(__clang__) && defined(__APPLE__) # define _lzcnt_u32 __lzcnt32 #endif
Did not encounter. Adding it (combined with the previous suggestion) does still compile.
Thanks a lot for confirming and testing the second edit!
Could you please cut a new release with this fixed. That way macOS users can simply get it from NPM and automatically stay updated (instead of manually checking our manual builds).
Yes definitely. Sorry for the delay.
NPM module should now be at v1.1.1
Versions
sw_vers
clang++ --version
(homebrew)node --version
Problem Despite yencode 1.0.8 building, 1.1.0 doesn't:
CC="/usr/local/opt/llvm/bin/clang" CXX="/usr/local/opt/llvm/bin/clang++" LDFLAGS="-L/usr/local/opt/llvm/lib" CPPFLAGS="-I/usr/local/opt/llvm/include" npm install -g yencode@1.1.0
Node v12 gives the same error.