taf2 / curb

Ruby bindings for libcurl
Other
1.29k stars 227 forks source link

Build fix: Gemfile.lock: update gems to avoid changes in lockfile #417

Closed olleolleolle closed 3 years ago

olleolleolle commented 3 years ago

This PR is an attempt to avoid the following build error in: https://travis-ci.org/github/taf2/curb/jobs/741142541

$ bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle}

You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
The gemspecs for path gems changed

Result

It avoids the error and continues!

This takes us to the next build error - which is a good thing.

Details

https://github.com/taf2/curb/compare/fa6e08ecb878...fc43c798332b introduced a .11 but the Gemfile.lock wasn't informed.

olleolleolle commented 3 years ago

This is the error which was hidden by the version mismatch in the Gemfile.lock:

Error in ruby-head: https://travis-ci.org/github/taf2/curb/jobs/741157248

creating Makefile

compiling curb.c

curb.c: In function ‘Init_curb_core’:

curb.c:296:66: error: ‘CURL_SSLVERSION_MAX_DEFAULT’ undeclared (first use in this function)

   rb_define_const(mCurl, "CURL_SSLVERSION_MAX_DEFAULT", LONG2NUM(CURL_SSLVERSIO

                                                                  ^

curb.c:296:66: note: each undeclared identifier is reported only once for each function it appears in

curb.c:302:66: error: ‘CURL_SSLVERSION_MAX_TLSv1_0’ undeclared (first use in this function)

   rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_0", LONG2NUM(CURL_SSLVERSIO

                                                                  ^

curb.c:306:66: error: ‘CURL_SSLVERSION_MAX_TLSv1_1’ undeclared (first use in this function)

   rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_1", LONG2NUM(CURL_SSLVERSIO

                                                                  ^

curb.c:310:66: error: ‘CURL_SSLVERSION_MAX_TLSv1_2’ undeclared (first use in this function)

   rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_2", LONG2NUM(CURL_SSLVERSIO

                                                                  ^

curb.c: At top level:

cc1: warning: unrecognized command line option ‘-Wno-tautological-compare’

cc1: warning: unrecognized command line option ‘-Wno-self-assign’

cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’

cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’

cc1: warning: unrecognized command line option ‘-Wno-cast-function-type’

Makefile:244: recipe for target 'curb.o' failed
olleolleolle commented 3 years ago

In the Ruby 2.4, the issue seems to be that the C lib is not made available:

https://travis-ci.org/github/taf2/curb/jobs/741157251#L577

olleolleolle commented 3 years ago

Mildly related issue: https://github.com/taf2/curb/issues/343

olleolleolle commented 3 years ago

@taf2 Hi, I hope this PR explains what's going on.

taf2 commented 3 years ago

Thanks I merged it looks like a Gemfile.lock and I'll try to see i can spend some time to investigate different edge cases related to constant defined or not based on libcurl versions...