简体   繁体   中英

checking for curlinfo_appconnect_time… *** extconf.rb failed ***

During a build I get this error

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

need configuration options.

Then, I looked for every mkmf.log file, I could find in my home directory and found this one:

~/.gem/extensions/x86_64-darwin-16/2.4.0/curb-0.9.3/mkmf.log

When looking into this file and searching for curlinfo_appconnect_time , I see this:

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 */

--------------------

Which seems to be OK for me. I am relatively new to the whole MacOS stuff, so help is needed. Where should I look for solving this problem?

仅作记录,您可以尝试冲泡:

brew install gcc@4.9

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM