From: franklinyu@... Date: 2019-05-23T05:11:39+00:00 Subject: [ruby-core:92791] [Ruby trunk Bug#15665] Cannot compile socket extension on Mojave Issue #15665 has been updated by franklinyu (Franklin Yu). File mkmf.log added nobu (Nobuyoshi Nakada) wrote: > That check is necessary only for very old, 6 years ago, header. > It is strange that `IN6_IS_ADDR_UNSPECIFIED` code cannot compile. > Could you show how it failed in mkmf.log? Please find attached. I was trying to install 2.6.3 version. ---------------------------------------- Bug #15665: Cannot compile socket extension on Mojave https://bugs.ruby-lang.org/issues/15665#change-78163 * Author: franklinyu (Franklin Yu) * Status: Feedback * Priority: Normal * Assignee: * Target version: * ruby -v: 2.6.0 * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- The `mkmf.log` is reporting that it cannot find `netinet6/in6.h`. I guess that previously it���s finding it in `/usr/include`, but as we all know Apple removed that path since Mojave. On my machine the current path is: ``` /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/ ``` The C compiler seems fine if I���m using it stand-alone. I tried compiling following snippet: ```c #include int main() {} int t(struct in6_addr *addr) { return IN6_IS_ADDR_UNSPECIFIED(addr); } ``` And it works, although I have no idea which header it included. I tried both compiling it with `cc test.c`, and with the actual command in `mkmf.log`: ``` clang -I../../.ext/include/x86_64-darwin18 -I../.././include -I../.././ext/socket -I../.. -I../../. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -Wall -Wextra -Wpedantic -Wshadow -pipe -D__APPLE_USE_RFC_3542 -Werror ``` Both works without any warning/error. ## note This only happens to 2.6.0 and 2.6.1. Releases in 2.5.x or below are not affected. ---Files-------------------------------- mkmf.log (143 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: