在构建期间,我收到此错误
ERROR: Failed to build gem native extension.
current directory: /Users/someuser/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/curb-0.9.3/ext
/Users/someuser/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170712-26044-1w4zaqi.rb extconf.rb
checking for curl-config... yes
checking for curlinfo_appconnect_time... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details.
You may
需要配置选项。
然后,我查找了每个mkmf.log
文件,我可以在我的主目录中找到并找到这个文件:
~/.gem/extensions/x86_64-darwin-16/2.4.0/curb-0.9.3/mkmf.log
在查看此文件并搜索curlinfo_appconnect_time
时,我看到了这一点:
have_constant: checking for curlinfo_appconnect_time... -------------------- yes
"clang -o conftest -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/x86_64-darwin16 -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/ruby/backward -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -g conftest.c -L. -L/usr/local/Cellar/ruby/2.4.1_1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -lruby.2.4.1 -lpthread -ldl -lobjc -lcurl"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"clang -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/x86_64-darwin16 -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0/ruby/backward -I/usr/local/Cellar/ruby/2.4.1_1/include/ruby-2.4.0 -I. -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -g -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe -g -lpthread -ldl -lobjc -lcurl -c conftest.c"
clang: warning: -lpthread: 'linker' input unused
clang: warning: -ldl: 'linker' input unused
clang: warning: -lobjc: 'linker' input unused
clang: warning: -lcurl: 'linker' input unused
conftest.c:5:13: warning: unused variable 'test' [-Wunused-variable]
int test = (int)CURLINFO_APPCONNECT_TIME;
^
1 warning generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <curl/curl.h>
4: int main() {
5: int test = (int)CURLINFO_APPCONNECT_TIME;
6: return 0;
7: }
/* end */
--------------------
对我来说似乎没问题。我对整个MacOS的东西比较新,所以需要帮助。我应该在哪里寻找解决这个问题的方法?
答案 0 :(得分:0)
只是为了记录,你可以尝试brew:
brew install gcc@4.9