Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Incompatible with OS X 10.10 Yosemite #16

Closed
parkr opened this issue Jan 8, 2015 · 16 comments
Closed

Incompatible with OS X 10.10 Yosemite #16

parkr opened this issue Jan 8, 2015 · 16 comments

Comments

@parkr
Copy link

parkr commented Jan 8, 2015

Couldn't get this sucker to install on my Maverick's machine. When running rake compile, first I get can't find header dns_sd.h (which is present, in /usr/include):

~/code/dnssd#master$ rake compile
Defaulting gemspec to MIT license.
Call license in hoe spec to change.
mkdir -p tmp/x86_64-darwin13.0/dnssd/2.1.2
cd tmp/x86_64-darwin13.0/dnssd/2.1.2
/usr/local/var/rbenv/versions/2.1.2-github1/bin/ruby -I. ../../../../ext/dnssd/extconf.rb
checking for dns_sd.h... no
unable to find dnssd header
*** ../../../../ext/dnssd/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=../../../../ext/dnssd
    --curdir
    --ruby=/usr/local/var/rbenv/versions/2.1.2-github1/bin/ruby
    --with-warnings
    --without-warnings
    --with-dnssd-dir
    --without-dnssd-dir
    --with-dnssd-include
    --without-dnssd-include=${dnssd-dir}/include
    --with-dnssd-lib
    --without-dnssd-lib=${dnssd-dir}/lib
rake aborted!
Command failed with status (1): [/usr/local/var/rbenv/versions/2.1.2-github...]

Tasks: TOP => compile => compile:x86_64-darwin13.0 => compile:dnssd:x86_64-darwin13.0 => copy:dnssd:x86_64-darwin13.0:2.1.2 => tmp/x86_64-darwin13.0/dnssd/2.1.2/dnssd.bundle => tmp/x86_64-darwin13.0/dnssd/2.1.2/Makefile
(See full trace by running task with --trace)

If I remove that header check, I get:

~/code/dnssd#master$ rake compile
Defaulting gemspec to MIT license.
Call license in hoe spec to change.
cd tmp/x86_64-darwin13.0/dnssd/2.1.2
/usr/local/var/rbenv/versions/2.1.2-github1/bin/ruby -I. ../../../../ext/dnssd/extconf.rb
checking for main() in -ldnssd... no
checking for main() in -ldns_sd... no
checking for main() in -lmdns... no
checking for main() in -lSystem... yes
checking for htons in arpa/inet.h... yes
checking for ntohs in arpa/inet.h... yes
checking for iphlpapi.h... no
checking for if_indextoname() in sys/types.h,sys/socket.h,net/if.h... yes
checking for if_nametoindex() in sys/types.h,sys/socket.h,net/if.h... yes
checking for getservbyport() in netdb.h... yes
checking for rb_thread_fd_select() in ruby/intern.h... yes
checking for struct sockaddr_in in netinet/in.h... yes
checking for struct sockaddr_in.sin_len in netinet/in.h... yes

checking for missing avahi features
checking for DNSServiceGetProperty() in dns_sd.h... no
checking for DNSServiceGetAddrInfo() in dns_sd.h... no
checking for kDNSServiceFlagsForce() in dns_sd.h... no
checking for kDNSServiceFlagsNonBrowsable() in dns_sd.h... no
checking for kDNSServiceFlagsReturnIntermediates() in dns_sd.h... no
checking for kDNSServiceFlagsShareConnection() in dns_sd.h... no
checking for kDNSServiceErr_BadSig() in dns_sd.h... no

checking for ruby features
checking for ruby/encoding.h... yes

creating Makefile
cd -
cd tmp/x86_64-darwin13.0/dnssd/2.1.2
make
compiling ../../../../ext/dnssd/dnssd.c
couldn't understand kern.osversion `14.0.0'
In file included from /usr/include/os/object.h:27,
                 from /usr/include/dispatch/dispatch.h:48,
                 from /usr/include/dns_sd.h:129,
                 from ../../../../ext/dnssd/dnssd.h:6,
                 from ../../../../ext/dnssd/dnssd.c:1:
/usr/include/os/base.h:113:20: error: missing binary operator before token "("
/usr/include/os/base.h:119:54: error: missing binary operator before token "("
In file included from /usr/include/dispatch/dispatch.h:51,
                 from /usr/include/dns_sd.h:129,
                 from ../../../../ext/dnssd/dnssd.h:6,
                 from ../../../../ext/dnssd/dnssd.c:1:
/usr/include/dispatch/object.h:325:20: error: missing binary operator before token "("
/usr/include/dispatch/object.h:363:20: error: missing binary operator before token "("
/usr/include/dispatch/object.h:391:20: error: missing binary operator before token "("
/usr/include/dispatch/object.h:423:20: error: missing binary operator before token "("
make: *** [dnssd.o] Error 1
rake aborted!
Command failed with status (2): [make...]

Tasks: TOP => compile => compile:x86_64-darwin13.0 => compile:dnssd:x86_64-darwin13.0 => copy:dnssd:x86_64-darwin13.0:2.1.2 => tmp/x86_64-darwin13.0/dnssd/2.1.2/dnssd.bundle
(See full trace by running task with --trace)

Entirely borked, unfortunately. Not sure how to go about fixing here.

@parkr
Copy link
Author

parkr commented Jan 8, 2015

/cc @tenderlove

@parkr parkr changed the title Incompatible with OS X 10.9 Mavericks Incompatible with OS X 10.10 Yosemite Jan 8, 2015
@sodabrew
Copy link
Contributor

sodabrew commented Jan 8, 2015

Mavericks or Yosemite?

@parkr
Copy link
Author

parkr commented Jan 8, 2015

Mavericks or Yosemite?

Yosemite. I forgot I upgraded. Heh.

@sodabrew
Copy link
Contributor

sodabrew commented Jan 8, 2015

@sodabrew
Copy link
Contributor

sodabrew commented Jan 8, 2015

@tenderlove Could you do a release from master branch? The last release was in 2011, and there's been a bunch of work since then in the repo. https://rubygems.org/gems/dnssd

Let's see if master compiles on Yosemite...

@drbrain
Copy link
Collaborator

drbrain commented Jan 8, 2015

You don't have a dns_sd.h? What files do you have in /usr/include?

$ mdfind -name dns_sd.h | grep -v /Users
/usr/include/dns_sd.h
$ ls -l /usr/include/dns_sd.h
-rw-r--r--  1 root  wheel  132596 Sep  9 13:50 /usr/include/dns_sd.h
$ uname -a
Darwin asx.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

@parkr
Copy link
Author

parkr commented Jan 8, 2015

@drbrain That's the weird part – I do:

~$ mdfind -name dns_sd.h | grep -v /Users
/usr/include/dns_sd.h
~$ ls -l /usr/include/dns_sd.h
-rw-r--r--  1 root  wheel  132596 Sep  9 13:50 /usr/include/dns_sd.h
~$ uname -a
Darwin parkervsco.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
~$

@sodabrew
Copy link
Contributor

sodabrew commented Jan 8, 2015

master branch builds out of the box on Yosemite.

@parkr
Copy link
Author

parkr commented Jan 8, 2015

master branch builds out of the box on Yosemite.

@sodabrew You're right. I think I figured out my problem – I am using a custom Ruby, a distribution by GitHub. When I switch to the system Ruby, it all goes as planned. I'll test with an rbenv'd unmodified MRI.

@drbrain Would you mind pushing out the latest changes?

@sodabrew
Copy link
Contributor

sodabrew commented Jan 8, 2015

@parkr Oh, I didn't figure on the custom Ruby being the issue. If you add --with-dnssd-dir=/usr does it work?

@parkr
Copy link
Author

parkr commented Jan 8, 2015

@parkr Oh, I didn't figure on the custom Ruby being the issue. If you add --with-dnssd-dir=/usr does it work?

Nope, tried that.

@drbrain
Copy link
Collaborator

drbrain commented Jan 8, 2015

I imagine github ruby uses a compiler and include path that you don't have access to?

The changes since v2.0 don't involve changes to mkmf.rb so I doubt they would make a difference. I note that in the compile log it says mkdir -p tmp/x86_64-darwin13.0/dnssd/2.1.2 which is attempting to use mavericks things.

Still, I can make a release as there are changes pending.

@parkr
Copy link
Author

parkr commented Jan 8, 2015

I imagine github ruby uses a compiler and include path that you don't have access to?

Must be it. Dammit. MRI 2.1.5 unmodified installs fine.

@drbrain
Copy link
Collaborator

drbrain commented Jan 8, 2015

2.0.1 released!

@parkr
Copy link
Author

parkr commented Jan 8, 2015

2.0.1 released!

❤️ You're the best, @drbrain.

Now to dig into where GitHub's Ruby differs from MRI... I definitely like their distro better.

Thanks guys!!

@sodabrew
Copy link
Contributor

sodabrew commented Jan 8, 2015

Thank you!

@parkr parkr closed this as completed Jan 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants