taf2 / curb

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

After updating XCode on Mac OS X, curb native extensions fail to compile with #259

Closed rajsahae closed 8 years ago

rajsahae commented 9 years ago

Running Mac OS X v 10.10.5, and using rvm with oh-my-zsh, ruby 2.2.1

Installing curb failed with the error '__curl_rule_01__' declared as an array with a negative size Seems to be related to this general topic: http://discuss.cocos2d-x.org/t/when-update-to-xcode-5-1-an-error-occur---curl-rule-01---declared-as-an-array-with-a-negative-size/11953 Not sure why I'm experiencing the issue now, and not before, as it seems this compilation issue is over a year old.

I did recently update to XCode 7.0, and updated command line tools.

Here is the verbose output during gem install:

[$] gem install curb -v '0.8.8' --verbose                                                                                                                                                                                 [16:41:12]
HEAD https://rubygems.org/specs.4.8.gz
302 Moved Temporarily
HEAD https://rubygems.global.ssl.fastly.net/specs.4.8.gz
200 OK
GET https://rubygems.org/specs.4.8.gz
302 Moved Temporarily
GET https://rubygems.global.ssl.fastly.net/specs.4.8.gz
200 OK
HEAD http://gems.tools.teslamotors.com/specs.4.8.gz
200 OK
GET http://gems.tools.teslamotors.com/specs.4.8.gz
200 OK
HEAD https://artifactory.dev.teslamotors.com/artifactory/api/gems/tesla-gems-local/specs.4.8.gz
304 Not Modified
Installing gem curb-0.8.8
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/LICENSE
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/README.markdown
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/Rakefile
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/doc.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb.c
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_easy.c
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_easy.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_errors.c
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_errors.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_macros.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_multi.c
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_multi.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_postfield.c
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_postfield.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_upload.c
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/curb_upload.h
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/extconf.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/lib/curb.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/lib/curl.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/lib/curl/easy.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/lib/curl/multi.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/alltests.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_crash_on_debug.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_crash_on_progress.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_curb_easy_blocks_ruby_threads.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_curb_easy_post_with_string_no_content_length_header.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_instance_post_differs_from_class_post.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_issue102.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_multi_segfault.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_postfields_crash.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_postfields_crash2.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bug_require_last_or_segfault.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/bugtests.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/helper.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/mem_check.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/require_last_or_segfault_script.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/signals.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/tc_curl.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/tc_curl_download.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/tc_curl_easy.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/tc_curl_easy_setopt.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/tc_curl_multi.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/tc_curl_postfield.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/timeout.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/timeout_server.rb
/Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/tests/unittests.rb
Building native extensions.  This could take a while...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for curl-config... yes
checking for curlinfo_appconnect_time... no
checking for curlinfo_redirect_time... no
checking for curlinfo_response_code... no
checking for curlinfo_filetime... no
checking for curlinfo_redirect_count... no
checking for curlinfo_os_errno... no
checking for curlinfo_num_connects... no
checking for curlinfo_ftp_entry_path... no
checking for curl_version_ssl... no
checking for curl_version_libz... no
checking for curl_version_ntlm... no
checking for curl_version_gssnegotiate... no
checking for curl_version_debug... no
checking for curl_version_asynchdns... no
checking for curl_version_spnego... no
checking for curl_version_largefile... no
checking for curl_version_idn... no
checking for curl_version_sspi... no
checking for curl_version_conv... no
checking for curlproxy_http... no
checking for curlproxy_socks4... no
checking for curlproxy_socks4a... no
checking for curlproxy_socks5... no
checking for curlauth_basic... no
checking for curlauth_digest... no
checking for curlauth_gssnegotiate... no
checking for curlauth_ntlm... no
checking for curlauth_anysafe... no
checking for curlauth_any... no
checking for curle_tftp_notfound... no
checking for curle_tftp_perm... no
checking for curle_tftp_diskfull... no
checking for curle_tftp_illegal... no
checking for curle_tftp_unknownid... no
checking for curle_tftp_exists... no
checking for curle_tftp_nosuchuser... no
checking for curle_send_fail_rewind... no
checking for curle_ssl_engine_initfailed... no
checking for curle_login_denied... no
checking for curlmopt_maxconnects... no
checking for curlopt_seekfunction... no
checking for curlopt_seekdata... no
checking for curlopt_sockoptfunction... no
checking for curlopt_sockoptdata... no
checking for curlopt_opensocketfunction... no
checking for curlopt_opensocketdata... no
checking for curle_conv_failed... no
checking for curle_conv_reqd... no
checking for curle_ssl_cacert_badfile... no
checking for curle_remote_file_not_found... no
checking for curle_ssh... no
checking for curle_ssl_shutdown_failed... no
checking for curle_again... no
checking for curle_ssl_crl_badfile... no
checking for curle_ssl_issuer_error... no
checking for curlinfo_redirect_url... no
checking for curlopt_username... no
checking for curlopt_password... no
checking for curlinfo_primary_ip... no
checking for curlauth_digest_ie... no
checking for curlftpmethod_multicwd... no
checking for curlftpmethod_nocwd... no
checking for curlftpmethod_singlecwd... no
checking for curlm_bad_socket... no
checking for curlm_unknown_option... no
checking for curl_multi_timeout()... no
checking for curl_multi_fdset()... no
checking for curl_multi_perform()... no
checking for curlopt_interleavefunction... no
checking for curlopt_interleavedata... no
checking for curlopt_chunk_bgn_function... no
checking for curlopt_chunk_end_function... no
checking for curlopt_chunk_data... no
checking for curlopt_fnmatch_function... no
checking for curlopt_fnmatch_data... no
checking for curlopt_errorbuffer... no
checking for curlopt_stderr... no
checking for curlopt_failonerror... no
checking for curlopt_url... no
checking for curlopt_protocols... no
checking for curlopt_redir_protocols... no
checking for curlopt_proxy... no
checking for curlopt_proxyport... no
checking for curlopt_proxytype... no
checking for curlopt_noproxy... no
checking for curlopt_httpproxytunnel... no
checking for curlopt_socks5_gssapi_service... no
checking for curlopt_socks5_gssapi_nec... no
checking for curlopt_interface... no
checking for curlopt_localport... no
checking for curlopt_dns_cache_timeout... no
checking for curlopt_dns_use_global_cache... no
checking for curlopt_buffersize... no
checking for curlopt_port... no
checking for curlopt_tcp_nodelay... no
checking for curlopt_address_scope... no
checking for curlopt_netrc... no
checking for curl_netrc_optional... no
checking for curl_netrc_ignored... no
checking for curl_netrc_required... no
checking for curlopt_netrc_file... no
checking for curlopt_userpwd... no
checking for curlopt_proxyuserpwd... no
checking for curlopt_username... no
checking for curlopt_password... no
checking for curlopt_password... no
checking for curlopt_password... no
checking for curlopt_httpauth... no
checking for curlauth_digest_ie... no
checking for curlauth_only... no
checking for curlopt_tlsauth_type... no
checking for curlopt_tlsauth_srp... no
checking for curlopt_tlsauth_username... no
checking for curlopt_tlsauth_password... no
checking for curlopt_proxyauth... no
checking for curlopt_autoreferer... no
checking for curlopt_encoding... no
checking for curlopt_followlocation... no
checking for curlopt_unrestricted_auth... no
checking for curlopt_maxredirs... no
checking for curlopt_postredir... no
checking for curlopt_put... no
checking for curlopt_post... no
checking for curlopt_postfields... no
checking for curlopt_postfieldsize... no
checking for curlopt_postfieldsize_large... no
checking for curlopt_copypostfields... no
checking for curlopt_httppost... no
checking for curlopt_referer... no
checking for curlopt_useragent... no
checking for curlopt_httpheader... no
checking for curlopt_http200aliases... no
checking for curlopt_cookie... no
checking for curlopt_cookiefile... no
checking for curlopt_cookiejar... no
checking for curlopt_cookiesession... no
checking for curlopt_cookielist... no
checking for curlopt_httpget... no
checking for curlopt_http_version... no
checking for curl_http_version_none... no
checking for curl_http_version_1_0... no
checking for curl_http_version_1_1... no
checking for curlopt_ignore_content_length... no
checking for curlopt_http_content_decoding... no
checking for curlopt_http_transfer_decoding... no
checking for curlopt_mail_from... no
checking for curlopt_mail_rcpt... no
checking for curlopt_tftp_blksize... no
checking for curlopt_ftpport... no
checking for curlopt_quote... no
checking for curlopt_postquote... no
checking for curlopt_prequote... no
checking for curlopt_dirlistonly... no
checking for curlopt_append... no
checking for curlopt_ftp_use_eprt... no
checking for curlopt_ftp_use_epsv... no
checking for curlopt_ftp_use_pret... no
checking for curlopt_ftp_create_missing_dirs... no
checking for curlopt_ftp_response_timeout... no
checking for curlopt_ftp_alternative_to_user... no
checking for curlopt_ftp_skip_pasv_ip... no
checking for curlopt_ftpsslauth... no
checking for curlftpauth_default... no
checking for curlftpauth_ssl... no
checking for curlftpauth_tls... no
checking for curlopt_ftp_ssl_ccc... no
checking for curlftpssl_ccc_none... no
checking for curlftpssl_ccc_passive... no
checking for curlftpssl_ccc_active... no
checking for curlopt_ftp_account... no
checking for curlopt_ftp_filemethod... no
checking for curlftpmethod_multicwd... no
checking for curlftpmethod_nocwd... no
checking for curlftpmethod_singlecwd... no
checking for curlopt_rtsp_request... no
checking for curl_rtspreq_options... no
checking for curl_rtspreq_describe... no
checking for curl_rtspreq_announce... no
checking for curl_rtspreq_setup... no
checking for curl_rtspreq_play... no
checking for curl_rtspreq_pause... no
checking for curl_rtspreq_teardown... no
checking for curl_rtspreq_get_parameter... no
checking for curl_rtspreq_set_parameter... no
checking for curl_rtspreq_record... no
checking for curl_rtspreq_receive... no
checking for curlopt_rtsp_session_id... no
checking for curlopt_rtsp_stream_uri... no
checking for curlopt_rtsp_transport... no
checking for curlopt_rtsp_header... no
checking for curlopt_rtsp_client_cseq... no
checking for curlopt_rtsp_server_cseq... no
checking for curlopt_transfertext... no
checking for curlopt_proxy_transfer_mode... no
checking for curlopt_crlf... no
checking for curlopt_range... no
checking for curlopt_resume_from... no
checking for curlopt_resume_from_large... no
checking for curlopt_customrequest... no
checking for curlopt_filetime... no
checking for curlopt_nobody... no
checking for curlopt_infilesize... no
checking for curlopt_infilesize_large... no
checking for curlopt_upload... no
checking for curlopt_maxfilesize... no
checking for curlopt_maxfilesize_large... no
checking for curlopt_timecondition... no
checking for curlopt_timevalue... no
checking for curlopt_timeout... no
checking for curlopt_timeout_ms... no
checking for curlopt_low_speed_limit... no
checking for curlopt_low_speed_time... no
checking for curlopt_max_send_speed_large... no
checking for curlopt_max_recv_speed_large... no
checking for curlopt_maxconnects... no
checking for curlopt_closepolicy... no
checking for curlopt_fresh_connect... no
checking for curlopt_forbid_reuse... no
checking for curlopt_connecttimeout... no
checking for curlopt_connecttimeout_ms... no
checking for curlopt_ipresolve... no
checking for curl_ipresolve_whatever... no
checking for curl_ipresolve_v4... no
checking for curl_ipresolve_v6... no
checking for curlopt_connect_only... no
checking for curlopt_use_ssl... no
checking for curlusessl_none... no
checking for curlusessl_try... no
checking for curlusessl_control... no
checking for curlusessl_all... no
checking for curlopt_resolve... no
checking for curlopt_sslcert... no
checking for curlopt_sslcerttype... no
checking for curlopt_sslkey... no
checking for curlopt_sslkeytype... no
checking for curlopt_keypasswd... no
checking for curlopt_sslengine... no
checking for curlopt_sslengine_default... no
checking for curlopt_sslversion... no
checking for curl_sslversion_default... no
checking for CURL_SSLVERSION_TLSv1... no
checking for CURL_SSLVERSION_SSLv2... no
checking for CURL_SSLVERSION_SSLv3... no
checking for curlopt_ssl_verifypeer... no
checking for curlopt_cainfo... no
checking for curlopt_issuercert... no
checking for curlopt_capath... no
checking for curlopt_crlfile... no
checking for curlopt_ssl_verifyhost... no
checking for curlopt_certinfo... no
checking for curlopt_random_file... no
checking for curlopt_egdsocket... no
checking for curlopt_ssl_cipher_list... no
checking for curlopt_ssl_sessionid_cache... no
checking for curlopt_krblevel... no
checking for curlopt_ssh_auth_types... no
checking for curlopt_ssh_host_public_key_md5... no
checking for curlopt_ssh_public_keyfile... no
checking for curlopt_ssh_private_keyfile... no
checking for curlopt_ssh_knownhosts... no
checking for curlopt_ssh_keyfunction... no
checking for curlkhstat_fine_add_to_file... no
checking for curlkhstat_fine... no
checking for curlkhstat_reject... no
checking for curlkhstat_defer... no
checking for curlopt_ssh_keydata... no
checking for curlopt_private... no
checking for curlopt_share... no
checking for curlopt_new_file_perms... no
checking for curlopt_new_directory_perms... no
checking for curlopt_telnetoptions... no
checking for curle_not_built_in... no
checking for curle_obsolete... no
checking for curlopt_gssapi_delegation... no
checking for curlgssapi_delegation_policy_flag... no
checking for curlgssapi_delegation_flag... no
checking for CURLM_ADDED_ALREADY... no
checking for curl_easy_escape... no
checking for rb_thread_blocking_region()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
creating curb_config.h
creating Makefile
make "DESTDIR="
compiling curb.c
In file included from curb.c:8:
In file included from ./curb.h:12:
In file included from /usr/local/include/curl/curl.h:35:
/usr/local/include/curl/curlrules.h:143:6: error: '__curl_rule_01__' declared as an array with a negative size
    [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                          ^~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/curl/curlrules.h:153:6: error: '__curl_rule_02__' declared as an array with a negative size
    [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                          ^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [curb.o] Error 1
ERROR:  Error installing curb:
    ERROR: Failed to build gem native extension.

    Building has failed. See above output for more information on the failure.

Gem files will remain installed in /Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8 for inspection.
Results logged to /Users/rsahae/.rvm/gems/ruby-2.2.1/gems/curb-0.8.8/ext/gem_make.out
taf2 commented 9 years ago

looks like an issue in libcurl...

taf2 commented 8 years ago

reinstall libcurl