macOS 11.0 Big Sur beta에 thin gem을 설치할 수 없습니다.
6527 단어 thin
묘사
맥OS 11.0 빅수르 베타에 thin gem을 설치하는 방법을 알고 싶습니다.배경:
저는 MacOS를 사용하여 Ruby on Rails 프레임워크에 기여하고 있습니다.그 중 하나인 Rails 모듈 동작 케이블은 bladegem를 사용하는데 thingem가 필요합니다.
소프트웨어 버전
% sw_vers master
ProductName: macOS
ProductVersion: 11.0
BuildVersion: 20A5323l
% ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin20]
% gem -v
3.1.2
% cc -v
Apple clang version 12.0.0 (clang-1200.0.26.2)
Target: x86_64-apple-darwin20.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% gem install thin
Building native extensions. This could take a while...
ERROR: Error installing thin:
ERROR: Failed to build gem native extension.
current directory: /Users/yahonda/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.7.2/ext/thin_parser
/Users/yahonda/.rbenv/versions/2.7.1/bin/ruby -I /Users/yahonda/.rbenv/versions/2.7.1/lib/ruby/2.7.0 -r ./siteconf20200730-33834-mbvks1.rb extconf.rb
checking for main() in -lc... yes
creating Makefile
current directory: /Users/yahonda/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.7.2/ext/thin_parser
make "DESTDIR=" clean
current directory: /Users/yahonda/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.7.2/ext/thin_parser
make "DESTDIR="
compiling parser.c
parser.c:31:18: warning: unused variable 'http_parser_en_main' [-Wunused-const-variable]
static const int http_parser_en_main = 1;
^
1 warning generated.
compiling thin.c
thin.c:242:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(hp);
^
thin.c:242:3: note: did you mean 'http_parser_init'?
./parser.h:41:5: note: 'http_parser_init' declared here
int http_parser_init(http_parser *parser);
^
thin.c:260:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(http);
^
thin.c:277:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(http);
^
thin.c:294:3: error: implicit declaration of function 'thin_http_parser_finish' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_finish(http);
^
thin.c:294:3: note: did you mean 'Thin_HttpParser_finish'?
thin.c:290:7: note: 'Thin_HttpParser_finish' declared here
VALUE Thin_HttpParser_finish(VALUE self)
^
thin.c:296:10: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
^
thin.c:334:5: error: implicit declaration of function 'thin_http_parser_execute' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_execute(http, dptr, dlen, from);
^
thin.c:334:5: note: did you mean 'Thin_HttpParser_execute'?
thin.c:317:7: note: 'Thin_HttpParser_execute' declared here
VALUE Thin_HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
^
thin.c:338:8: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if(thin_http_parser_has_error(http)) {
^
thin.c:338:8: note: did you mean 'http_parser_has_error'?
./parser.h:44:5: note: 'http_parser_has_error' declared here
int http_parser_has_error(http_parser *parser);
^
thin.c:359:10: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_has_error(http) ? Qtrue : Qfalse;
^
thin.c:374:10: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
^
9 errors generated.
make: *** [thin.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/yahonda/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/thin-1.7.2 for inspection.
Results logged to /Users/yahonda/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/extensions/x86_64-darwin-20/2.7.0/thin-1.7.2/gem_make.out
토론 #1
Catalina 10.15.6에서 똑같은 오류가 발생했습니다.$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.6
BuildVersion: 19G73
토론 #2
에서 인출 요청 #366토론 #셋
을 열었습니다. #364에서 해결해야 합니다.토론 #4
#364가 마스터 브랜치로 결합되었으므로 종료합니다.토론 #5
gem을 업그레이드할 수 없으면 XCode 11.7로 업그레이드하면 위의 오류가 수정됩니다.이전에 독립된 명령줄 도구를 설치한 적이 있다면,
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
토론 #6
를 통해 XCode와 함께 제공된 도구로 전환해야 합니다. @kellishaver에 PR을 만들고 이 상세한 정보로 자술한 파일을 업데이트하시겠습니까?토론 #7
Do you want to make a PR to update the README with those details @kellishaver ?
나는 매우 기쁘다!오늘 밤 내가 할게.
토론 #8
나에게 효과적인 대안은gem install thin -v '1.6.4' -- --with-cflags="-Wno-error=implicit-function-declaration"
XCode를 설치할 필요는 없고 명령줄 도구토론 #9
만 사용할 수 있습니다bundle install
.이것도 저한테는 되게 쓸모가 있어요.
bundle config build.thin --with-cflags="-Wno-error=implicit-function-declaration"
토론 #10
몬트리에는 아무런 해결 방안이 없다.또 누가 이 문제를 가지고 있습니까?토론 #11
몬트리@mszyndel의 조언을 따라 효과가 좋습니다.토론 #12
Reference
이 문제에 관하여(macOS 11.0 Big Sur beta에 thin gem을 설치할 수 없습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://github.com/macournoyer/thin/issues/365텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)