ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: franklinyu@hotmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91824] [Ruby trunk Bug#15665] Cannot compile socket extension on Mojave
Date: Thu, 14 Mar 2019 03:03:59 +0000 (UTC)	[thread overview]
Message-ID: <redmine.issue-15665.20190314030358.d973d0f9da63b0d8@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15665.20190314030358@ruby-lang.org

Issue #15665 has been reported by franklinyu (Franklin Yu).

----------------------------------------
Bug #15665: Cannot compile socket extension on Mojave
https://bugs.ruby-lang.org/issues/15665

* Author: franklinyu (Franklin Yu)
* Status: Open
* 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 <netinet/in.h>
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.



-- 
https://bugs.ruby-lang.org/

       reply	other threads:[~2019-03-14  3:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-15665.20190314030358@ruby-lang.org>
2019-03-14  3:03 ` franklinyu [this message]
2019-03-20 23:21 ` [ruby-core:91904] [Ruby trunk Bug#15665] Cannot compile socket extension on Mojave hsbt
2019-05-18 22:29 ` [ruby-core:92716] " franklinyu
2019-05-18 22:31 ` [ruby-core:92717] " hsbt
2019-05-19  7:38 ` [ruby-core:92720] " nobu
2019-05-21 16:16 ` [ruby-core:92745] " franklinyu
2019-05-23  5:11 ` [ruby-core:92791] " franklinyu
2019-05-23  6:08 ` [ruby-core:92793] " nobu
2019-05-31  4:50 ` [ruby-core:92902] [Ruby trunk Feature#15665] " franklinyu
2019-06-06 18:28 ` [ruby-core:93013] " franklinyu
2019-06-07  3:04 ` [ruby-core:93014] " hsbt
2019-06-08  0:42 ` [ruby-core:93017] " franklinyu
2019-06-18 12:20 ` [ruby-core:93222] " franklinyu
2019-11-11 14:03 ` [ruby-core:95788] [Ruby master " nobu
2019-11-11 15:22 ` [ruby-core:95792] " naruse
2019-11-15  6:22 ` [ruby-core:95857] " franklinyu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-15665.20190314030358.d973d0f9da63b0d8@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).