Code Monkey home page Code Monkey logo

Comments (29)

nooop3 avatar nooop3 commented on August 24, 2024 18

Thanks @hipsrinoky , for quick fix by brew edit openresty/brew/openresty and add \ -fno-stack-check in with-luajit-xcflags line.

from homebrew-brew.

BigYoungs avatar BigYoungs commented on August 24, 2024 11

brew edit openresty/brew/openresty
找到此行:--with-luajit-xcflags,最后增加内容:\ -fno-stack-check
改完后: --with-luajit-xcflags=-DLUAJIT_NUMMODE=2\ -DLUAJIT_ENABLE_LUA52COMPAT\ -fno-stack-check

然后重开一个窗口,重新执行:brew install openresty/brew/openresty

from homebrew-brew.

hipsrinoky avatar hipsrinoky commented on August 24, 2024 2

I have same problem.
This reason seems to be caused by Issues of Xcode11.1.
neovim/neovim#11192 (comment)
macports/macports-ports#5472 (comment)
It seems to be fixed on Xcode11.2(It still in beta version now)

--added--
This is clang bug with checking stack at compile. And need to add '-fno-stack-check' parameter at CFLAGS.
Which is better adding the parameter in openresty/util/configure or homebrew-core/Formula/luajit.rb ?
(OR Which is faster to be merged?)

from homebrew-brew.

jason-zuo avatar jason-zuo commented on August 24, 2024 2

@hipsrinoky I try it, but it not work for me,failed to run command: gmake -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

from homebrew-brew.

hipsrinoky avatar hipsrinoky commented on August 24, 2024 1

Hack for install on Catalina. (It is a temporary hack because of that I don't know to check OS version in configure file.)

if ($platform eq 'macosx') {
my $v = $ENV{MACOSX_DEPLOYMENT_TARGET};
if (!defined $v || $v !~ /^\d+.\d+$/) {
$v = sw_vers -productVersion;
if (defined $v && $v =~ /^\s*(\d+.\d+)/) {
$ENV{MACOSX_DEPLOYMENT_TARGET} = $1;
#warn "MACOSX_DEPLOYMENT_TARGET = $1";
}
}
#hipsrinoky added
#hack for osx10.15
$extra_opts .= " CFLAGS='-fno-stack-check'";
}

from homebrew-brew.

agentzh avatar agentzh commented on August 24, 2024 1

I don't have a macOS 10.5 to test. Could anyone contribute a pull request to the openresty/openresty github repo so that I can simply merge? Many thanks!

from homebrew-brew.

TinkoLiu avatar TinkoLiu commented on August 24, 2024 1

Not working for me neither.

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 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.1/luajit

macOS 10.15.1

Xcode 11.2 (11B52)

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.12)
Target: x86_64-apple-darwin19.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

from homebrew-brew.

meunierd avatar meunierd commented on August 24, 2024 1

Adding ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.14' to the the formula gets it to build, but attempting to run it instantly throws a SIGABRT. Same is true of passing -f-no-stack-check, you'll get a build but it'll crash.

from homebrew-brew.

chenyongze avatar chenyongze commented on August 24, 2024 1

brew edit openresty
Add ENV['CFLAGS']='-fno-stack-check' at the start of the install def

from homebrew-brew.

i6u avatar i6u commented on August 24, 2024 1

try it out

Kong/homebrew-kong#121 (comment)

from homebrew-brew.

codecodingg avatar codecodingg commented on August 24, 2024

Mac os 10.15 upgrade openresty 1.15.8.1 -> 1.15.8.2 fail
==> Downloading https://openresty.org/download/openresty-1.15.8.2.tar.gz
Already downloaded: /Users/lunicornxiao/Library/Caches/Homebrew/downloads/4395089f0fd423261d4f1124b7beb0f69e1121e59d399e89eaa6e25b641333bc--openresty-1.15.8.2.tar.gz
==> ./configure -j12 --prefix=/usr/local/Cellar/openresty/1.15.8.2 --pid-path=/usr/local/var/run/openresty.pid --lock-path=/usr/local/var/run/openresty.lock --conf-p
Last 15 lines from /Users/lunicornxiao/Library/Logs/Homebrew/openresty/01.configure:
DYNASM host/buildvm_arch.h
HOSTCC host/buildvm.o
HOSTLINK host/buildvm
BUILDVM lj_vm.S
BUILDVM lj_ffdef.h
BUILDVM lj_folddef.h
BUILDVM lj_bcdef.h
BUILDVM lj_recdef.h
BUILDVM lj_libdef.h
BUILDVM jit/vmdef.lua
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 -j12 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

from homebrew-brew.

agentzh avatar agentzh commented on August 24, 2024

I'm also wondering if we could simply ship binaries in our homebrew repo so that people don't have to bother fighting Xcode toolchain bugs :) Just a thought.

from homebrew-brew.

hipsrinoky avatar hipsrinoky commented on August 24, 2024

I don't have a macOS 10.5 to test. Could anyone contribute a pull request to the openresty/openresty github repo so that I can simply merge? Many thanks!

Is there some way to check current OS version in openresty/configure file?
(EX.
$extra_opts .= " CFLAGS='-fno-stack-check'" if DevelopmentTools.clang_build_version >= 1010;
or
$OS == "dawin19"
and others.
)
I can send pull request soon when I fixed that.

from homebrew-brew.

zqiangli avatar zqiangli commented on August 24, 2024
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 -j12 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

HOMEBREW_VERSION: 2.1.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2bf8015bc44878d432fb9da4f11e1d8abcef8f32
Last commit: 5 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 1112da1c9b6e8e6eba6747f20c824da5009da999
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/robin/Library/Caches/Homebrew
HOMEBREW_LOGS: /Users/robin/Library/Logs/Homebrew
CPU: dodeca-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.21.0 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_221
macOS: 10.15-x86_64
CLT: 11.0.0.0.1.1567737322
Xcode: 11.1
CLT headers: 11.0.0.0.1.1567737322

from homebrew-brew.

dfkfhv avatar dfkfhv commented on August 24, 2024

Same:

$ brew install openresty/brew/openresty --verbose

==> ./configure -j8 --prefix=/usr/local/Cellar/openresty/1.15.8.2 --pid-path=/usr/local/var/run/openresty.pid --lock-path=/usr/local/var/run/openresty.lock --conf-path=/usr/local/etc/openresty/nginx.conf --http-log-path=/usr/local/var/log/nginx/access.log --error-log-path=/usr/local/var/log/nginx/error.log --with-cc-opt=-I/usr/local/include -I/usr/local/opt/pcre/include -I/usr/local/opt/openresty-openssl/include --with-ld-opt=-L/usr/local/lib -L/usr/local/opt/pcre/lib -L/usr/local/opt/openresty-openssl/lib --with-pcre-jit --without-http_rds_json_module --without-http_rds_csv_module --without-lua_rds_parser --with-ipv6 --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_geoip_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-luajit-xcflags=-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT --with-dtrace-probes
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='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/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   lj_libdef.h
BUILDVM   jit/vmdef.lua
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='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

==> Formula
Tap: openresty/brew
Path: /usr/local/Homebrew/Library/Taps/openresty/homebrew-brew/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: 63 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/opt/openresty-openssl:/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/geoip/lib/pkgconfig:/usr/local/opt/openresty-openssl/lib/pkgconfig:/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/geoip/bin:/usr/local/opt/openresty-openssl/bin:/usr/local/opt/pcre/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: openresty/brew/openresty 1.15.8.2 did not build
Logs:
     /Users/123/Library/Logs/Homebrew/openresty/00.options.out
     /Users/123/Library/Logs/Homebrew/openresty/01.configure.cc
     /Users/123/Library/Logs/Homebrew/openresty/01.configure

from homebrew-brew.

jason-zuo avatar jason-zuo commented on August 24, 2024

i have the same problems ;
ERROR: failed to run command: gmake -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-msse4.2 -DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' CC=cc PREFIX=/usr/local/Cellar/openresty/1.15.8.2/luajit

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/openresty/homebrew-brew/issues

These open issues may also help:
Can't install openresty on macOS 10.15 #10
Fails to install OpenResty #5
The openresty-debug package should use openresty-openssl-debug instead #3

from homebrew-brew.

hipsrinoky avatar hipsrinoky commented on August 24, 2024

XCode has been updated to version 11.2, And 'brew install openresty' will work. Try it!

from homebrew-brew.

ewalk153 avatar ewalk153 commented on August 24, 2024

Looks like this ties to an issue resolved in LuaJIT: LuaJIT/LuaJIT#518

Solution was to pass -fno-stack-check to the build to work around a regression in XCode 11 https://forums.developer.apple.com/thread/121887:

macports/macports-ports@29d7df9

# Workaround for Xcode 11 issue
# https://forums.developer.apple.com/thread/121887
# Current information is that this should be fixed in Xcode 11.2
if { ([vercmp ${os.major} 19] >= 0) && ([vercmp $xcodeversion 11.2] < 0) } {
    if {[string match clang ${configure.compiler}]} {
        configure.cc-append -fno-stack-check
    }
}

from homebrew-brew.

jason-zuo avatar jason-zuo commented on August 24, 2024

@nooop3 yes this work for me

from homebrew-brew.

cute-angelia avatar cute-angelia commented on August 24, 2024

....

-fno-stack-check was deleted from homebrew/core in commit e4cc1ca401:
[email protected]: delete

from homebrew-brew.

yeetk avatar yeetk commented on August 24, 2024

brew edit openresty
Add ENV['CFLAGS']='-fno-stack-check' at the start of the install def

this work for me, thanks!

from homebrew-brew.

a652 avatar a652 commented on August 24, 2024

Thanks @hipsrinoky , for quick fix by brew edit openresty/brew/openresty and add \ -fno-stack-check in with-luajit-xcflags line.

This worked for me!

from homebrew-brew.

bpzhang avatar bpzhang commented on August 24, 2024

XCode has been updated to version 11.2, And 'brew install openresty' will work. Try it!

doesn't work!!!

from homebrew-brew.

zhenglaizhang avatar zhenglaizhang commented on August 24, 2024

brew edit openresty/brew/openresty
找到此行:--with-luajit-xcflags,最后增加内容:\ -fno-stack-check
改完后: --with-luajit-xcflags=-DLUAJIT_NUMMODE=2\ -DLUAJIT_ENABLE_LUA52COMPAT\ -fno-stack-check

然后重开一个窗口,重新执行:brew install openresty/brew/openresty

this works for me, awesome!

from homebrew-brew.

zhangchenguang231x avatar zhangchenguang231x commented on August 24, 2024

I have same question ,you can update new command line tools in here ,i have solved

from homebrew-brew.

agentzh avatar agentzh commented on August 24, 2024

I committed a fix to our official brew today as per the discussion here. Will some of you help test it out on your side please? I only have 10.14 and 10.12 macOS systems locally. Thanks!

from homebrew-brew.

agentzh avatar agentzh commented on August 24, 2024

BTW, I also upgraded our openresty-openssl brew package to OpenSSL 1.1.0l. We'll move further onto OpenSSL 1.1.1 for the next OpenResty release (1.17.8.1).

from homebrew-brew.

nooop3 avatar nooop3 commented on August 24, 2024

Openresty had been upgrade to 1.15.8.3 on 10.15.3 macOS system by brew. It works normally. Thanks @agentzh .

from homebrew-brew.

gebing avatar gebing commented on August 24, 2024

OpenSSL 1.1.0l can not download.

==> Downloading https://www.openssl.org/source/openssl-1.1.0l.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading https://dl.bintray.com/homebrew/mirror/openssl-1.1.0l.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "openresty-openssl"
Download failed: https://dl.bintray.com/homebrew/mirror/openssl-1.1.0l.tar.gz

from homebrew-brew.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.