Closed shiodat closed 7 years ago
The mmapper modules are not called from any libraries. https://github.com/search?q=org%3Ajubatus+mmapper&type=Code
The mmapper has a comparison bug and this PR fixes it. This PR will also fix https://github.com/jubatus/homebrew-jubatus/issues/29 .
../jubatus/util/system/mmapper.cpp:63:3: error: ordered comparison between pointer and zero ('void *' and 'int') NO_INTR(p, mmap(NULL, tmp.length, prot, MAP_SHARED, tmp.fd, 0)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../jubatus/util/system/syscall.h:41:17: note: expanded from macro 'NO_INTR' if ((result)<0 && errno==EINTR) \ ~~~~~~~~^~ 1 error generated. ../jubatus/util/system/sysstat.cpp:111:17: warning: unused variable 'error' [-Wunused-variable] kern_return_t error = host_statistics(mach_host_self(), HOST_LOAD_INFO, (host_info_t)&hl,&count); ^ 1 warning generated.
I compiled with clang with macOS.
Apple LLVM version 9.0.0 (clang-900.0.38) Target: x86_64-apple-darwin17.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
This problem seems to be caused by clang 4.0 and later. After applying this patch, build succeeded. We should accept this workaround for usability.
The mmapper modules are not called from any libraries. https://github.com/search?q=org%3Ajubatus+mmapper&type=Code
The mmapper has a comparison bug and this PR fixes it. This PR will also fix https://github.com/jubatus/homebrew-jubatus/issues/29 .
I compiled with clang with macOS.
Apple LLVM version 9.0.0 (clang-900.0.38) Target: x86_64-apple-darwin17.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin