Kong / homebrew-kong

:monkey: Homebrew tap for Kong
https://getkong.org
69 stars 30 forks source link

Mac Catalina 10.15 - Failed to run command `gmake` #121

Closed vrusso-kong closed 4 years ago

vrusso-kong commented 5 years ago

I have just updated to Catalina OSX 10.15. I did a refresh reinstall of brew to clean up some bad links and tried running the install. I have verified that gmake is installed through $brew install make and i can successfully run gmake.

Below you can see lj_folddef.h is throwing a seg fault on line 11 and getting deleted. Any help would be much appreciated.

$ brew install kong ]==> Installing kong from kong/kong ==> Installing dependencies for kong/kong/kong: kong/kong/openresty@1.15.8.1 ==> Installing kong/kong/kong dependency: kong/kong/openresty@1.15.8.1 ==> Downloading https://raw.githubusercontent.com/Kong/openresty-build-tools/0.0.5/kong-ngx-build Already downloaded: /Users/vince/Library/Caches/Homebrew/downloads/f740523c8a49e495ba8f85e1fc6a358e595c7c2d1b32a5b1c4d80c985a10df7a--kong-ngx-build ==> ./kong-ngx-build --prefix /usr/local/Cellar/openresty/1.15.8.1 --openresty 1.15.8.1 --openssl 1.1.1c --luarocks 3.1.3 -j 4 Last 15 lines from /Users/vince/Library/Logs/Homebrew/openresty/01.kong-ngx-build: CC lib_init.o CC luajit.o HOSTLINK host/minilua DYNASM host/buildvm_arch.h HOSTCC host/buildvm.o HOSTLINK host/buildvm BUILDVM lj_vm.S BUILDVM lj_ffdef.h BUILDVM lj_bcdef.h BUILDVM lj_folddef.h make[1]: [lj_folddef.h] Segmentation fault: 11 make[1]: Deleting file `lj_folddef.h' make[1]: Waiting for unfinished jobs.... make: [default] Error 2 ERROR: failed to run command: gmake -j4 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.1/openresty/luajit

zhiyongwang commented 5 years ago

I had the same problem.

dfkfhv commented 5 years ago

Same thing:

$ brew install kong --verbose

./kong-ngx-build
--prefix /usr/local/Cellar/openresty/1.15.8.1
--openresty 1.15.8.1
--openssl 1.1.1c
--luarocks 3.1.3
-j 8

...

SUCCESS: OpenSSL 1.1.1c has been built successfully!
NOTICE: Building OpenResty...
/private/tmp/openresty-20191022-31194-1vs4cag/work/openresty-1.15.8.1 /private/tmp/openresty-20191022-31194-1vs4cag
platform: macosx (darwin)
cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20190507
INFO: found -msse4.2 in cc.
gmake -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.1/openresty/luajit
==== Building LuaJIT 2.1.0-beta3 ====
/Library/Developer/CommandLineTools/usr/bin/make -C src
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_buf.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_strfmt.o
CC        lj_strfmt_num.o
CC        lj_api.o
CC        lj_profile.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
DYNASM    host/buildvm_arch.h
HOSTCC    host/buildvm.o
HOSTLINK  host/buildvm
BUILDVM   lj_vm.S
BUILDVM   lj_ffdef.h
BUILDVM   lj_bcdef.h
BUILDVM   lj_folddef.h
BUILDVM   lj_recdef.h
BUILDVM   jit/vmdef.lua
BUILDVM   lj_libdef.h
make[1]: *** [lj_folddef.h] Segmentation fault: 11
make[1]: *** Deleting file `lj_folddef.h'
make[1]: *** Waiting for unfinished jobs....
make: *** [default] Error 2
ERROR: failed to run command: gmake -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.1/openresty/luajit

==> Formula
Tap: kong/kong
Path: /usr/local/Homebrew/Library/Taps/kong/homebrew-kong/Formula/openresty.rb
==> Configuration
HOMEBREW_VERSION: 2.1.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2bf8015bc44878d432fb9da4f11e1d8abcef8f32
Last commit: 6 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 80c190fa2d7b283c857a0e1bfb70a03a9ca11587
Core tap last commit: 28 minutes ago
HOMEBREW_PREFIX: /usr/local
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1100
Git: 2.23.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 13, 1.8.0_232
macOS: 10.15-x86_64
CLT: 11.0.0.0.1.1567737322
Xcode: N/A
CLT headers: 11.0.0.0.1.1567737322
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j8
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_PATH: /usr/local/opt/pcre/lib/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/pcre/bin:/usr/local/opt/coreutils/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: kong/kong/openresty 1.15.8.1 did not build
Logs:
     /Users/123/Library/Logs/Homebrew/openresty/01.kong-ngx-build.cc
     /Users/123/Library/Logs/Homebrew/openresty/00.options.out
     /Users/123/Library/Logs/Homebrew/openresty/01.kong-ngx-build

$ gmake --version

GNU Make 4.2.1
Built for x86_64-apple-darwin19.0.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ type -a gmake

gmake is /usr/local/bin/gmake

$ brew install make

Warning: make 4.2.1_1 is already installed and up-to-date
To reinstall 4.2.1_1, run `brew reinstall make`

$ sw_vers

ProductName:    Mac OS X
ProductVersion: 10.15
BuildVersion:   19A583

$ /Library/Developer/CommandLineTools/usr/bin/make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

$ type -a make
make is /usr/bin/make
sayboras commented 5 years ago

Same for me

Sully93 commented 4 years ago

i'm having the same problem.

zhaochuanyun commented 4 years ago

Same for me

dmgorsky commented 4 years ago

same

andresreynoso commented 4 years ago

I Have the same problem.

PhilippeCorreges commented 4 years ago

Hello. same problem here.

kkindaface commented 4 years ago

same issue: ERROR: failed to run command: gmake -j12 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/openresty/luajit

ruurd commented 4 years ago

Same

seonixx commented 4 years ago

Any updates? Having the same issue.

seonixx commented 4 years ago

@vrusso-pivotal not sure if you're still on this but there's an issue with openresty/MacOS 10.15 (https://github.com/openresty/homebrew-brew/issues/10).

Workaround

  1. brew edit openresty
  2. Add ENV['CFLAGS']='-fno-stack-check' at the start of the install def
  3. brew install openresty
  4. brew install kong
sayboras commented 4 years ago

Workaround

  1. brew edit openresty
  2. Add ENV['CFLAGS']='-fno-stack-check' at the start of the install def
  3. brew install openresty
  4. brew install kong

This is awesome, thanks a lot for sharing your workaround 💯

yangshugithub commented 4 years ago

same

yangshugithub commented 4 years ago

Workaround

  1. brew edit openresty
  2. Add ENV['CFLAGS']='-fno-stack-check' at the start of the install def
  3. brew install openresty
  4. brew install kong

This is awesome, thanks a lot for sharing your workaround 💯

WechatIMG2 in here?

gszr commented 4 years ago

Hi all, we have merged a fix for this issue, please run brew update and try reinstalling. Closing this for now - thanks for the report and discussion!