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

Comments

@deepj
Copy link

@deepj 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 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.

@fibric
Copy link

@fibric fibric 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 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]
@DomT4 DomT4 mentioned this issue Jul 27, 2016
4 of 4 tasks complete
BrewTestBot pushed a commit to BrewTestBot/homebrew-core that referenced this issue Jul 27, 2016
@fibric
Copy link

@fibric fibric 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 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 Jul 27, 2016
@fibric
Copy link

@fibric fibric 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 DomT4 commented Jul 28, 2016

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

@shawkinaw
Copy link

@shawkinaw shawkinaw commented Sep 29, 2016

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
mtigas added a commit to mtigas/libevent that referenced this issue Sep 29, 2016
@puntoclassic
Copy link

@puntoclassic puntoclassic commented Oct 14, 2016

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

@thijsbloks thijsbloks commented Oct 17, 2016

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 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

@learnsomuch learnsomuch commented Oct 25, 2016

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

@MordaBoy MordaBoy commented Oct 27, 2016

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

@MikeMcQuaid MikeMcQuaid commented Nov 6, 2016

@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants