Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libevent: [warn] kq_init: detected broken kqueue; not using.: Undefined error: 0 #2869

Closed
deepj opened this issue Jul 9, 2016 · 14 comments
Closed
Labels
10.12 Sierra is specifically affected upstream issue An upstream issue report is needed

Comments

@deepj
Copy link

deepj commented Jul 9, 2016

I'm getting this warning on macOS Sierra PB1 when I run crystal compiler. It probably prevents to run a simple Kemal app (it's web framework written in Crystal language). Apparently the problem lies in libevent. Tthe library would belong to #1957 list.

It seems the fix is the following https://codereview.chromium.org/2134603002/diff/20001/base/third_party/libevent/kqueue.c (according to a guy from Crystal IRC).

@DomT4
Copy link
Member

DomT4 commented Jul 9, 2016

Refs:

I'd be fine with us adopting the patch proposed in libevent/libevent#377, but it may be reasonable to wait on some upstream feedback to the PR there given upstream is fairly active.

@DomT4 DomT4 added upstream issue An upstream issue report is needed 10.12 Sierra is specifically affected labels Jul 9, 2016
@ghost
Copy link

ghost commented Jul 25, 2016

Still no change, even brew install libevent --HEAD doesn't fix the issue.

Have to continue using my Linux machine to stay with Crystal; a fantastic Ruby alternative.

@DomT4
Copy link
Member

DomT4 commented Jul 27, 2016

Yeah, I can reproduce. The upstream fix doesn't seem completely sufficient, at least for crystal-lang.

It makes a significant difference though, at least on the surface. I don't know enough about crystal-lang to poke around deeper:

~> brew install libevent --HEAD && brew install crystal-lang -v

==> make crystal release=true
clang++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc `/usr/local/opt/llvm/bin/llvm-config --cxxflags`
clang -fPIC   -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
./bin/crystal build --release  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Deprecation: The build command was renamed to compile and will be removed in a future version.
...

==> Summary
🍺  /usr/local/Cellar/crystal-lang/0.18.7: 631 files, 34.3M, built in 4 minutes 49 seconds
$ crystal
Usage: crystal [command] [switches] [program file] [--] [arguments]

Compared to:

~> brew install libevent && brew install crystal-lang -v

==> make crystal release=true
clang++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc `/usr/local/opt/llvm/bin/llvm-config --cxxflags`
clang -fPIC   -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
./bin/crystal build --release  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Deprecation: The build command was renamed to compile and will be removed in a future version.
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
...

==> Summary
🍺  /usr/local/Cellar/crystal-lang/0.18.7: 631 files, 34.3M, built in 4 minutes 18 seconds
$ crystal
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Usage: crystal [command] [switches] [program file] [--] [arguments]

@ghost
Copy link

ghost commented Jul 27, 2016

It works for me on macOS 10.12 beta3 with Xcode 8 beta3 :-)

Uninstalled libevent, llvm and cleaned up brew.
Run brew update twice and then brew install libevent --HEAD && brew install crystal-lang -v

I also saw this message

==> make crystal release=true
clang++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc `/usr/local/opt/llvm/bin/llvm-config --cxxflags`
clang -fPIC   -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
./bin/crystal build --release  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Deprecation: The build command was renamed to compile and will be removed in a future version.

But at the end the installation was successful.

==> /private/tmp/crystal-lang-20160727-38564-1a406ho/crystal-0.18.7/bin/crystal build -o /private/tmp/crystal-lang-20160727-38564-1a406ho/crystal-0.18.7/.build/shards src/shards.cr
Using compiled compiler at .build/crystal
==> Cleaning
==> Finishing up
ln -s ../../Cellar/crystal-lang/0.18.7/etc/bash_completion.d/crystal crystal
ln -s ../Cellar/crystal-lang/0.18.7/bin/crystal crystal
ln -s ../Cellar/crystal-lang/0.18.7/bin/shards shards
ln -s ../../../Cellar/crystal-lang/0.18.7/share/zsh/site-functions/crystal crystal
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/crystal-lang/0.18.7: 631 files, 34.3M, built in 4 minutes 31 seconds

@DomT4
Copy link
Member

DomT4 commented Jul 27, 2016

I've applied the upstream patch to our libevent formula in stable, so you should be able to brew update & then use a vanilla brew install libevent && brew install crystal-lang -v without issue.

Since we seem to have mostly resolved this specific issue I've added this into our tracking thread @ #1957 & will close here. Please shout if you uncover any deeper errors though, so we can go back upstream to libevent as necessary.

@DomT4 DomT4 closed this as completed Jul 27, 2016
@ghost
Copy link

ghost commented Jul 28, 2016

It works! I uninstalled libevent, llvm and crystal-lang then let brew install everything again but without --HEAD. Thanks, man!

@DomT4
Copy link
Member

DomT4 commented Jul 28, 2016

Great! Thanks for the confirmation on your end. Happy to help.

@shawkinaw
Copy link

Just for future reference, I ran into the same problem with tmux. Was able to solve by reinstalling libevent and tmux:

$ brew reinstall libevent
$ brew reinstall tmux

@jonathanlamela
Copy link

I've tried reinstalling libevent , tmux , llvm and crystal lang. But not work , I've always the same error:

[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0

@thijsbloks
Copy link

I had the same problem. It happened because i had 2 installs from the chromedriver. What i did: Uninstall chromedriver with brew brew uninstall chromedriver. Than type chromedriver in your terminal. If it still exists than remove it. In my case i installed it in my global node modules. So i deleted it with npm npm uninstall -g chromedriver and installed it again with brew. That did the trick for me.

@barriem
Copy link

barriem commented Oct 24, 2016

I had the same issue with chromedriver, the following worked for me:

brew update
brew reinstall libevent
brew reinstall chromedriver

@learnsomuch
Copy link

I've tried reinstalling libevent , tmux , llvm and crystal lang. I am still getting the same error:
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0

@MordaBoy
Copy link

I've tried reinstalling libevent,llvm,chromewebdriver,upgrade brew and ect.... It's doesn't work....still.....help me....
2016-10-27 11 47 52

@MikeMcQuaid
Copy link
Member

@learnsomuch @MordaBoy Please report this to the upstream project, it's not our issue.

@Homebrew Homebrew locked and limited conversation to collaborators Nov 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
10.12 Sierra is specifically affected upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests

9 participants