giltene / wrk2

A constant throughput, correct latency recording variant of wrk
Apache License 2.0
4.27k stars 389 forks source link

Failed Installing wrk2 on Mac #65

Closed probeadd closed 5 years ago

probeadd commented 6 years ago

I tried to install wrk2 on Mac (MacOS Mojave verison 10.14 (18A391)) via HomeBrew. Here is the output:

==> Installing wrk2 from jabley/wrk2
/usr/bin/sandbox-exec -f /private/tmp/homebrew20181011-62982-3usk4m.sb nice /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/ruby-macho-2.1.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/plist-3.4.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/backports-3.11.4/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/activesupport-5.2.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/tzinfo-1.2.5/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/thread_safe-0.3.6/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/minitest-5.11.3/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/i18n-1.1.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle-standalone/bundler/../ruby/2.3.0/gems/concurrent-ruby-1.0.5/lib:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/universal-darwin9.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/x86_64-darwin9.0:/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/universal-darwin9.0:/usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/jabley/homebrew-wrk2/wrk2.rb --verbose --HEAD
==> Cloning https://github.com/giltene/wrk2.git
Updating /Users/satrioadip/Library/Caches/Homebrew/wrk2--git
git config remote.origin.url https://github.com/giltene/wrk2.git
git config remote.origin.fetch \+refs/heads/master:refs/remotes/origin/master
git fetch origin
==> Checking out branch master
git checkout -f master --
Already on 'master'
Your branch is up to date with 'origin/master'.
git reset --hard origin/master
HEAD is now at e0109df Merge pull request #18 from alex-koturanov/master
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/SCRIPTING /private/tmp/d20181011-62984-h35xj6/SCRIPTING
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/LICENSE /private/tmp/d20181011-62984-h35xj6/LICENSE
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/Makefile /private/tmp/d20181011-62984-h35xj6/Makefile
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/NOTICE /private/tmp/d20181011-62984-h35xj6/NOTICE
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/README.md /private/tmp/d20181011-62984-h35xj6/README.md
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/.gitignore /private/tmp/d20181011-62984-h35xj6/.gitignore
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/scripts/. /private/tmp/d20181011-62984-h35xj6/scripts
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/deps/. /private/tmp/d20181011-62984-h35xj6/deps
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/CoordinatedOmission/. /private/tmp/d20181011-62984-h35xj6/CoordinatedOmission
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/.git/. /private/tmp/d20181011-62984-h35xj6/.git
cp -pR /Users/satrioadip/Library/Caches/Homebrew/wrk2--git/src/. /private/tmp/d20181011-62984-h35xj6/src
cp -pR /private/tmp/d20181011-62984-h35xj6/SCRIPTING /private/tmp/wrk2-20181011-62984-awtwi9/SCRIPTING
cp -pR /private/tmp/d20181011-62984-h35xj6/LICENSE /private/tmp/wrk2-20181011-62984-awtwi9/LICENSE
cp -pR /private/tmp/d20181011-62984-h35xj6/Makefile /private/tmp/wrk2-20181011-62984-awtwi9/Makefile
cp -pR /private/tmp/d20181011-62984-h35xj6/NOTICE /private/tmp/wrk2-20181011-62984-awtwi9/NOTICE
cp -pR /private/tmp/d20181011-62984-h35xj6/README.md /private/tmp/wrk2-20181011-62984-awtwi9/README.md
cp -pR /private/tmp/d20181011-62984-h35xj6/.gitignore /private/tmp/wrk2-20181011-62984-awtwi9/.gitignore
cp -pR /private/tmp/d20181011-62984-h35xj6/scripts/. /private/tmp/wrk2-20181011-62984-awtwi9/scripts
cp -pR /private/tmp/d20181011-62984-h35xj6/deps/. /private/tmp/wrk2-20181011-62984-awtwi9/deps
cp -pR /private/tmp/d20181011-62984-h35xj6/CoordinatedOmission/. /private/tmp/wrk2-20181011-62984-awtwi9/CoordinatedOmission
cp -pR /private/tmp/d20181011-62984-h35xj6/.git/. /private/tmp/wrk2-20181011-62984-awtwi9/.git
cp -pR /private/tmp/d20181011-62984-h35xj6/src/. /private/tmp/wrk2-20181011-62984-awtwi9/src
chmod -Rf +w /private/tmp/d20181011-62984-h35xj6
==> make
Building LuaJIT...
HOSTCC    host/minilua.o
HOSTCC    host/buildvm_asm.o
HOSTCC    host/buildvm_peobj.o
HOSTCC    host/buildvm_lib.o
HOSTCC    host/buildvm_fold.o
CC        lj_gc.o
CC        lj_char.o
CC        lj_obj.o
CC        lj_str.o
CC        lj_tab.o
CC        lj_func.o
CC        lj_udata.o
CC        lj_meta.o
CC        lj_debug.o
CC        lj_state.o
CC        lj_vmevent.o
CC        lj_vmmath.o
CC        lj_strscan.o
CC        lj_api.o
CC        lj_lex.o
CC        lj_parse.o
CC        lj_bcread.o
CC        lj_bcwrite.o
CC        lj_load.o
CC        lj_ir.o
CC        lj_opt_mem.o
CC        lj_opt_narrow.o
CC        lj_opt_dce.o
CC        lj_opt_loop.o
CC        lj_opt_split.o
CC        lj_opt_sink.o
CC        lj_mcode.o
CC        lj_snap.o
CC        lj_asm.o
CC        lj_trace.o
CC        lj_gdbjit.o
CC        lj_ctype.o
CC        lj_cdata.o
CC        lj_cconv.o
CC        lj_ccall.o
CC        lj_ccallback.o
CC        lj_carith.o
CC        lj_clib.o
CC        lj_cparse.o
CC        lj_lib.o
CC        lj_alloc.o
CC        lib_aux.o
CC        lib_package.o
CC        lib_init.o
CC        luajit.o
HOSTLINK  host/minilua
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [host/minilua] Error 1
make: *** [deps/luajit/src/libluajit.a] Error 2

==> Formula
Tap: jabley/wrk2
Path: /usr/local/Homebrew/Library/Taps/jabley/homebrew-wrk2/wrk2.rb
==> Configuration
HOMEBREW_VERSION: 1.7.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: c54a657cd5987cba2718f7012a55101324fde8b1
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 683982a01204ddce1165daff00efc129d2e11adb
Core tap last commit: 12 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_ENABLE_AUTO_UPDATE_MIGRATION: 1
CPU: octa-core 64-bit skylake
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.14-x86_64
CLT: 10.0.0.0.1.1535735448
Xcode: N/A
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local/opt/openssl:/usr/local
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libxml2:/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.14
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/openssl/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: jabley/wrk2/wrk2 HEAD-e0109df did not build
Logs:
     /Users/satrioadip/Library/Logs/Homebrew/wrk2/01.make
     /Users/satrioadip/Library/Logs/Homebrew/wrk2/00.options.out
     /Users/satrioadip/Library/Logs/Homebrew/wrk2/01.make.cc
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/jabley/homebrew-wrk2/issues

I also tried to build from source, here is the output:

Building LuaJIT...
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
ld: warning: directory not found for option '-L/usr/local/Cellar/gsl/1.16/lib/'
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [host/minilua] Error 1
make: *** [deps/luajit/src/libluajit.a] Error 2

Is there any solution for this? Thank you.

guizmaii commented 5 years ago

Same here :/

AnderEnder commented 5 years ago

@guizmaii and @probeadd, could you please check my fix: https://github.com/giltene/wrk2/pull/66

whyboris commented 5 years ago

Just installed in on my Mac (10.13.6) with no problems following the instructions: https://github.com/giltene/wrk2/wiki/Installing-wrk2-on-Mac

Did not have to modify the Makefile for wrk2 command to work.

I have numerous dev dependencies (brew, xcode, etc) installed already so something may have been luckily aligned - I'm unsure what was needed for the install to work well.

AnderEnder commented 5 years ago

Just installed in on my Mac (10.13.6) with no problems following the instructions:

The issue appears on Mac Mojave: 10.14.+, because luajit requires MACOSX_DEPLOYMENT_TARGET should be set.

terasum commented 5 years ago

I modified file deps/luajit/src/Makefile line 293:

# export MACOSX_DEPLOYMENT_TARGET=10.4

as

export MACOSX_DEPLOYMENT_TARGET=10.14

fixed this.

AnderEnder commented 5 years ago

Fix(https://github.com/giltene/wrk2/pull/66) is already introduced and it sets MACOSX_DEPLOYMENT_TARGET dynamically based on OS you are running.

indrayam commented 5 years ago

I am getting this error while running make:

==== Building LuaJIT 2.0.3 ====
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src
HOSTLINK  host/minilua
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [host/minilua] Error 1
make: *** [default] Error 2
AnderEnder commented 5 years ago

@indrayam, PR#66 solves this issue. Unfortunately it is not merged yet. Anyway it is already merged into https://github.com/jabley/homebrew-wrk2, so you can use this tap for macosx

indrayam commented 5 years ago

Thanks, @AnderEnder. It worked!

cxorm commented 2 years ago

I have tried it on M1 Mac, it seems not work. could anyone be so kind as to share the working case on M1 ? ( Please feel free to correct me if I missed anything, thanks. )