I am running bundle install to gems but it is failing for some gems.
Currently, it's breaking for puma gem (An error occurred while installing puma (3.6.0), and Bundler cannot continue).
these are the logs for the same
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/pusingh/.rvm/gems/ruby-2.3.7#pm/extensions/x86_64-darwin-19/2.3.0/puma-3.6.0/mkmf.log
current directory: /Users/pusingh/.rvm/gems/ruby-2.3.7#pm/gems/puma-3.6.0/ext/puma_http11
make "DESTDIR=" clean
current directory: /Users/pusingh/.rvm/gems/ruby-2.3.7#pm/gems/puma-3.6.0/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
ext/puma_http11/http11_parser.rl:111:17: warning: comparison of integers of different signs: 'long' and 'unsigned long'
[-Wsign-compare]
assert(pe - p == len - off && "pointers aren't same distance");
~~~~~~ ^ ~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
ext/puma_http11/http11_parser.c:43:18: warning: unused variable 'puma_parser_en_main' [-Wunused-const-variable]
static const int puma_parser_en_main = 1;
^
2 warnings generated.
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c:90:5: error: incomplete definition of type 'struct dh_st'
dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:91:5: error: incomplete definition of type 'struct dh_st'
dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:93:10: error: incomplete definition of type 'struct dh_st'
if ((dh->p == NULL) || (dh->g == NULL)) {
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:93:29: error: incomplete definition of type 'struct dh_st'
if ((dh->p == NULL) || (dh->g == NULL)) {
~~^
/usr/local/opt/openssl/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
^
mini_ssl.c:197:27: warning: 'DTLSv1_method' is deprecated [-Wdeprecated-declarations]
conn->ctx = SSL_CTX_new(DTLSv1_method());
^
/usr/local/opt/openssl/include/openssl/ssl.h:1895:1: note: 'DTLSv1_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
^
/usr/local/opt/openssl/include/openssl/opensslconf.h:155:34: note: expanded from macro 'DEPRECATEDIN_1_1_0'
# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
^
/usr/local/opt/openssl/include/openssl/opensslconf.h:118:55: note: expanded from macro 'DECLARE_DEPRECATED'
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
^
mini_ssl.c:233:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
int verify_err = SSL_get_verify_result(ssl);
~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~
mini_ssl.c:246:13: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
err = ERR_get_error();
~ ^~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
make: *** [mini_ssl.o] Error 1
make failed, exit code 2
I am using ruby 2.3.7 with catalina mac os 10.15.5 Please help
Related
When installing the github-markdown 0.6.9 gem, the following errors are raised:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/Moth/.rvm/gems/ruby-2.6.6#searchgov-rails42/gems/github-markdown-0.6.9/ext/markdown
/Users/Moth/.rvm/rubies/ruby-2.6.6/bin/ruby -I /Users/Moth/.rvm/rubies/ruby-2.6.6/lib/ruby/site_ruby/2.6.0 -r
./siteconf20210820-81082-7n7xnz.rb extconf.rb
creating Makefile
current directory: /Users/Moth/.rvm/gems/ruby-2.6.6#searchgov-rails42/gems/github-markdown-0.6.9/ext/markdown
make "DESTDIR=" clean
current directory: /Users/Moth/.rvm/gems/ruby-2.6.6#searchgov-rails42/gems/github-markdown-0.6.9/ext/markdown
make "DESTDIR="
compiling autolink.c
compiling buffer.c
compiling gh-markdown.c
gh-markdown.c:56:29: error: implicitly declaring library function 'isspace' with type 'int (int)'
[-Werror,-Wimplicit-function-declaration]
while (i < lang->size && !isspace(lang->data[i]))
^
gh-markdown.c:56:29: note: include the header <ctype.h> or explicitly provide a declaration for 'isspace'
gh-markdown.c:60:14: warning: assigning to 'const char *' from 'uint8_t *' (aka 'unsigned char *') converts between
pointers to integer types with different sign [-Wpointer-sign]
lang_name = lang->data + 1;
^ ~~~~~~~~~~~~~~
gh-markdown.c:63:14: warning: assigning to 'const char *' from 'uint8_t *const' (aka 'unsigned char *const') converts
between pointers to integer types with different sign [-Wpointer-sign]
lang_name = lang->data;
^ ~~~~~~~~~~
gh-markdown.c:71:5: warning: passing 'uint8_t *const' (aka 'unsigned char *const') to parameter of type 'const char *'
converts between pointers to integer types with different sign [-Wpointer-sign]
geefem_str_new(text->data, text->size),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gh-markdown.c:21:35: note: expanded from macro 'geefem_str_new'
# define geefem_str_new(str, len) rb_enc_str_new(str, len, rb_utf8_encoding())
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:158:24: note: expanded from macro 'rb_enc_str_new'
rb_enc_str_new_static((str), (len), (enc)) : \
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/defines.h:116:53: note: expanded from macro
'RB_GNUC_EXTENSION_BLOCK'
#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/ruby.h:2588:40: note: expanded from macro 'rb_yield_values'
const VALUE rb_yield_values_args[] = {__VA_ARGS__}; \
^~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:140:40: note: passing argument to parameter here
VALUE rb_enc_str_new_static(const char*, long, rb_encoding*);
^
gh-markdown.c:71:5: warning: passing 'uint8_t *const' (aka 'unsigned char *const') to parameter of type 'const char *'
converts between pointers to integer types with different sign [-Wpointer-sign]
geefem_str_new(text->data, text->size),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gh-markdown.c:21:35: note: expanded from macro 'geefem_str_new'
# define geefem_str_new(str, len) rb_enc_str_new(str, len, rb_utf8_encoding())
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:159:17: note: expanded from macro 'rb_enc_str_new'
rb_enc_str_new((str), (len), (enc)) \
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/defines.h:116:53: note: expanded from macro
'RB_GNUC_EXTENSION_BLOCK'
#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/ruby.h:2588:40: note: expanded from macro 'rb_yield_values'
const VALUE rb_yield_values_args[] = {__VA_ARGS__}; \
^~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:138:33: note: passing argument to parameter here
VALUE rb_enc_str_new(const char*, long, rb_encoding*);
^
gh-markdown.c:82:3: error: implicit declaration of function 'houdini_escape_html0' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
houdini_escape_html0(ob, lang_name, lang_size, 0);
^
gh-markdown.c:89:2: error: implicit declaration of function 'houdini_escape_html0' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
houdini_escape_html0(ob, text->data, text->size, 0);
^
gh-markdown.c:122:33: warning: passing 'char *' to parameter of type 'const uint8_t *' (aka 'const unsigned char *')
converts between pointers to integer types with different sign [-Wpointer-sign]
sd_markdown_render(output_buf, RSTRING_PTR(rb_text), RSTRING_LEN(rb_text), md);
^~~~~~~~~~~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/ruby.h:1003:5: note: expanded from macro 'RSTRING_PTR'
(!(RBASIC(str)->flags & RSTRING_NOEMBED) ? \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./markdown.h:124:51: note: passing argument to parameter 'document' here
sd_markdown_render(struct buf *ob, const uint8_t *document, size_t doc_size, struct sd_markdown *md);
^
gh-markdown.c:125:12: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts
between pointers to integer types with different sign [-Wpointer-sign]
rb_text = geefem_str_new(output_buf->data, output_buf->size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gh-markdown.c:21:35: note: expanded from macro 'geefem_str_new'
# define geefem_str_new(str, len) rb_enc_str_new(str, len, rb_utf8_encoding())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:158:24: note: expanded from macro 'rb_enc_str_new'
rb_enc_str_new_static((str), (len), (enc)) : \
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/defines.h:116:53: note: expanded from macro
'RB_GNUC_EXTENSION_BLOCK'
#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:140:40: note: passing argument to parameter here
VALUE rb_enc_str_new_static(const char*, long, rb_encoding*);
^
gh-markdown.c:125:12: warning: passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'const char *' converts
between pointers to integer types with different sign [-Wpointer-sign]
rb_text = geefem_str_new(output_buf->data, output_buf->size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gh-markdown.c:21:35: note: expanded from macro 'geefem_str_new'
# define geefem_str_new(str, len) rb_enc_str_new(str, len, rb_utf8_encoding())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:159:17: note: expanded from macro 'rb_enc_str_new'
rb_enc_str_new((str), (len), (enc)) \
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/defines.h:116:53: note: expanded from macro
'RB_GNUC_EXTENSION_BLOCK'
#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
^
/Users/Moth/.rvm/rubies/ruby-2.6.6/include/ruby-2.6.0/ruby/encoding.h:138:33: note: passing argument to parameter here
VALUE rb_enc_str_new(const char*, long, rb_encoding*);
^
7 warnings and 3 errors generated.
make: *** [gh-markdown.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/Moth/.rvm/gems/ruby-2.6.6#searchgov-rails42/gems/github-markdown-0.6.9 for
inspection.
Results logged to
/Users/Moth/.rvm/gems/ruby-2.6.6#searchgov-rails42/extensions/x86_64-darwin-19/2.6.0/github-markdown-0.6.9/gem_make.out
An error occurred while installing github-markdown (0.6.9), and Bundler cannot continue.
Make sure that `gem install github-markdown -v '0.6.9' --source 'https://rubygems.org/'` succeeds before bundling.
I was able to successfully install the github-markdown gem with the following flags:
gem install github-markdown -v '0.6.9' --source 'https://rubygems.org/' -- --with-cflags="-Wno-error=implicit-function-declaration"
I'm getting the following error and wonder how should I solve it
I'm getting this error when trying to run gem install re2 -v 1.1.1
However, run gem install re2 -v 1.2.0 works perfectly for me in the same directory.
Building native extensions. This could take a while...
ERROR: Error installing re2:
ERROR: Failed to build gem native extension.
current directory: /home/aaron/.rvm/gems/ruby-2.5.3/gems/re2-1.1.1/ext/re2
/home/aaron/.rvm/rubies/ruby-2.5.3/bin/ruby -I /home/aaron/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200629-12178-1dryx90.rb extconf.rb
checking for -lstdc++... yes
checking for stdint.h... yes
checking for rb_str_sublen()... yes
checking for -lre2... yes
checking for re2 requires C++11 compiler... yes
checking for RE2::Match() with endpos argument... yes
creating Makefile
current directory: /home/aaron/.rvm/gems/ruby-2.5.3/gems/re2-1.1.1/ext/re2
make "DESTDIR=" clean
current directory: /home/aaron/.rvm/gems/ruby-2.5.3/gems/re2-1.1.1/ext/re2
make "DESTDIR="
compiling re2.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/ruby.h:29:0,
from /home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby.h:33,
from re2.cc:9:
/home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/defines.h:286:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\
^
In file included from /home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/intern.h:24:0,
from /home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/ruby.h:2040,
from /home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby.h:33,
from re2.cc:9:
/home/aaron/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/defines.h:286:44: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\
^
re2.cc: In function ‘VALUE re2_scanner_scan(VALUE)’:
re2.cc:261:37: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1"));
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_matchdata_to_a(VALUE)’:
re2.cc:459:35: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1"));
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_matchdata_nth_match(int, VALUE)’:
re2.cc:483:33: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_matchdata_inspect(VALUE)’:
re2.cc:614:29: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_regexp_initialize(int, VALUE*, VALUE)’:
re2.cc:687:19: error: ‘class re2::RE2::Options’ has no member named ‘set_utf8’
re2_options.set_utf8(RTEST(utf8));
^
re2.cc: In function ‘VALUE re2_regexp_inspect(VALUE)’:
re2.cc:770:29: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_regexp_to_s(VALUE)’:
re2.cc:788:29: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_regexp_utf8(VALUE)’:
re2.cc:818:42: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
return BOOL2RUBY(p->pattern->options().utf8());
^
re2.cc:21:23: note: in definition of macro ‘BOOL2RUBY’
#define BOOL2RUBY(v) (v ? Qtrue : Qfalse)
^
re2.cc: In function ‘VALUE re2_regexp_error_arg(VALUE)’:
re2.cc:1015:31: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_regexp_options(VALUE)’:
re2.cc:1046:39: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
BOOL2RUBY(p->pattern->options().utf8()));
^
re2.cc:21:23: note: in definition of macro ‘BOOL2RUBY’
#define BOOL2RUBY(v) (v ? Qtrue : Qfalse)
^
re2.cc: In function ‘VALUE re2_regexp_named_capturing_groups(VALUE)’:
re2.cc:1116:33: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1"),
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_Replace(VALUE, VALUE, VALUE, VALUE)’:
re2.cc:1287:31: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_GlobalReplace(VALUE, VALUE, VALUE, VALUE)’:
re2.cc:1324:31: error: ‘const class re2::RE2::Options’ has no member named ‘utf8’
p->pattern->options().utf8() ? "UTF-8" : "ISO-8859-1");
^
re2.cc:37:36: note: in definition of macro ‘ENCODED_STR_NEW’
int _enc = rb_enc_find_index(encoding); \
^
re2.cc: In function ‘VALUE re2_regexp_utf8(VALUE)’:
re2.cc:819:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
make: *** [re2.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/aaron/.rvm/gems/ruby-2.5.3/gems/re2-1.1.1 for inspection.
Results logged to /home/aaron/.rvm/gems/ruby-2.5.3/extensions/x86_64-linux/2.5.0/re2-1.1.1/gem_make.out
You have to use 2017-07-01 version of re2 lib for re2 gem 1.1.1
I am trying to install and use zeroMQ gem on macOS 10.15.3. But I get a build error, see last code fragment.
I install using bundle like so: bundle install --path vendor/bundle and my Gemfile like this:
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "sinatra"
gem "pg"
gem "zmq"
But the gem install of zeroMQ fails.
What I find weird is that both raw C zeroMQ, cppzmq, and I could install zeroMQ for python using PIP without any problems. zeroMQ is installed using Homebrew.
Any insights is appriciated.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/larsnielsen/git/au/alexandria-storage-node/vendor/bundle/ruby/2.6.0/gems/zmq-2.1.4
/Users/larsnielsen/.rbenv/versions/2.6.5/bin/ruby -I /Users/larsnielsen/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r ./siteconf20200305-37449-pikzw8.rb extconf.rb
checking for zmq.h... yes
checking for zmq_init() in -lzmq... yes
Cool, I found your zmq install...
creating Makefile
current directory: /Users/larsnielsen/git/au/alexandria-storage-node/vendor/bundle/ruby/2.6.0/gems/zmq-2.1.4
make "DESTDIR=" clean
current directory: /Users/larsnielsen/git/au/alexandria-storage-node/vendor/bundle/ruby/2.6.0/gems/zmq-2.1.4
make "DESTDIR="
compiling rbzmq.c
rbzmq.c:105:12: warning: 'rb_data_object_alloc' is deprecated: by rb_data_object_wrap [-Wdeprecated-declarations]
return rb_data_object_alloc (class_, NULL, 0, context_free);
^
/Users/larsnielsen/.rbenv/versions/2.6.5/include/ruby-2.6.0/ruby/ruby.h:1437:1: note: 'rb_data_object_alloc' has been explicitly marked deprecated here
DEPRECATED_BY(rb_data_object_wrap, static inline VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC));
^
/Users/larsnielsen/.rbenv/versions/2.6.5/include/ruby-2.6.0/x86_64-darwin19/ruby/config.h:139:44: note: expanded from macro 'DEPRECATED_BY'
#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
^
rbzmq.c:324:9: warning: implicit declaration of function 'rb_thread_blocking_region' is invalid in C99 [-Wimplicit-function-declaration]
rb_thread_blocking_region (zmq_poll_blocking, (void*)&poll_args, NULL, NULL);
^
rbzmq.c:968:7: error: use of undeclared identifier 'ZMQ_RECOVERY_IVL_MSEC'
case ZMQ_RECOVERY_IVL_MSEC:
^
rbzmq.c:990:10: error: use of undeclared identifier 'ZMQ_HWM'
case ZMQ_HWM:
^
rbzmq.c:991:10: error: use of undeclared identifier 'ZMQ_SWAP'
case ZMQ_SWAP:
^
rbzmq.c:995:10: error: use of undeclared identifier 'ZMQ_MCAST_LOOP'
case ZMQ_MCAST_LOOP:
^
rbzmq.c:1292:10: error: use of undeclared identifier 'ZMQ_HWM'
case ZMQ_HWM:
^
rbzmq.c:1293:10: error: use of undeclared identifier 'ZMQ_SWAP'
case ZMQ_SWAP:
^
rbzmq.c:1297:10: error: use of undeclared identifier 'ZMQ_MCAST_LOOP'
case ZMQ_MCAST_LOOP:
^
rbzmq.c:1315:10: error: use of undeclared identifier 'ZMQ_RECOVERY_IVL_MSEC'
case ZMQ_RECOVERY_IVL_MSEC:
^
rbzmq.c:1443:81: error: too few arguments to function call, expected 4, have 3
send_args->rc = zmq_send(send_args->socket, send_args->msg, send_args->flags);
~~~~~~~~ ^
/usr/local/include/zmq.h:489:1: note: 'zmq_send' declared here
ZMQ_EXPORT int zmq_send (void *s_, const void *buf_, size_t len_, int flags_);
^
/usr/local/include/zmq.h:90:20: note: expanded from macro 'ZMQ_EXPORT'
#define ZMQ_EXPORT __attribute__ ((visibility ("default")))
^
rbzmq.c:1512:9: warning: implicit declaration of function 'rb_thread_blocking_region' is invalid in C99 [-Wimplicit-function-declaration]
rb_thread_blocking_region (zmq_send_blocking, (void*) &send_args, NULL, NULL);
^
rbzmq.c:1517:38: error: too few arguments to function call, expected 4, have 3
rc = zmq_send (s, &msg, flags);
~~~~~~~~ ^
/usr/local/include/zmq.h:489:1: note: 'zmq_send' declared here
ZMQ_EXPORT int zmq_send (void *s_, const void *buf_, size_t len_, int flags_);
^
/usr/local/include/zmq.h:90:20: note: expanded from macro 'ZMQ_EXPORT'
#define ZMQ_EXPORT __attribute__ ((visibility ("default")))
^
rbzmq.c:1541:81: error: too few arguments to function call, expected 4, have 3
recv_args->rc = zmq_recv(recv_args->socket, recv_args->msg, recv_args->flags);
~~~~~~~~ ^
/usr/local/include/zmq.h:492:1: note: 'zmq_recv' declared here
ZMQ_EXPORT int zmq_recv (void *s_, void *buf_, size_t len_, int flags_);
^
/usr/local/include/zmq.h:90:20: note: expanded from macro 'ZMQ_EXPORT'
#define ZMQ_EXPORT __attribute__ ((visibility ("default")))
^
rbzmq.c:1596:9: warning: implicit declaration of function 'rb_thread_blocking_region' is invalid in C99 [-Wimplicit-function-declaration]
rb_thread_blocking_region (zmq_recv_blocking, (void*) &recv_args,
^
rbzmq.c:1602:38: error: too few arguments to function call, expected 4, have 3
rc = zmq_recv (s, &msg, flags);
~~~~~~~~ ^
/usr/local/include/zmq.h:492:1: note: 'zmq_recv' declared here
ZMQ_EXPORT int zmq_recv (void *s_, void *buf_, size_t len_, int flags_);
^
/usr/local/include/zmq.h:90:20: note: expanded from macro 'ZMQ_EXPORT'
#define ZMQ_EXPORT __attribute__ ((visibility ("default")))
^
rbzmq.c:1675:50: error: use of undeclared identifier 'ZMQ_HWM'
rb_define_const (zmq_module, "HWM", INT2NUM (ZMQ_HWM));
^
rbzmq.c:1676:51: error: use of undeclared identifier 'ZMQ_SWAP'
rb_define_const (zmq_module, "SWAP", INT2NUM (ZMQ_SWAP));
^
rbzmq.c:1683:57: error: use of undeclared identifier 'ZMQ_MCAST_LOOP'
rb_define_const (zmq_module, "MCAST_LOOP", INT2NUM (ZMQ_MCAST_LOOP));
^
rbzmq.c:1698:64: error: use of undeclared identifier 'ZMQ_RECOVERY_IVL_MSEC'
rb_define_const (zmq_module, "RECOVERY_IVL_MSEC", INT2NUM (ZMQ_RECOVERY_IVL_MSEC));
^
4 warnings and 16 errors generated.
make: *** [rbzmq.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/larsnielsen/git/au/alexandria-storage-node/vendor/bundle/ruby/2.6.0/gems/zmq-2.1.4 for inspection.
Results logged to /Users/larsnielsen/git/au/alexandria-storage-node/vendor/bundle/ruby/2.6.0/extensions/x86_64-darwin-19/2.6.0-static/zmq-2.1.4/gem_make.out
An error occurred while installing zmq (2.1.4), and Bundler cannot continue.
Make sure that `gem install zmq -v '2.1.4' --source 'https://rubygems.org/'` succeeds before bundling.
The zmq gem is very old: https://rubygems.org/gems/zmq - last update was performed in 2010. There are numerous known compatibility problems, see for example: https://github.com/zeromq/rbzmq/issues/32.
I would recommend you use gem rbczmq instead: https://github.com/methodmissing/rbczmq
I had no problem getting ffi-rzmq running.
https://github.com/chuckremes/ffi-rzmq
gem install ffi-rzmq
I am trying to install SWOOLE on my Ubuntu-16.04
I tried this sudo pecl install swoole
But am getting a long list of errors(Skipped some lines)
In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable':
/tmp/pear/temp/swoole/php7_wrapper.h:238:5: error: unknown type name 'zend_string'
zend_string *key = NULL;
^
/tmp/pear/temp/swoole/php7_wrapper.h:239:5: warning: passing argument 3 of 'zend_is_callable' from incompatible pointer type [enabled by default]
int ret = zend_is_callable(cb, a, &key);
^
In file included from /usr/include/php5/main/php.h:39:0,
from /tmp/pear/temp/swoole/php_swoole.h:25,
from /tmp/pear/temp/swoole/swoole.c:16:
/usr/include/php5/Zend/zend_API.h:301:20: note: expected 'char **' but argument is of type 'int **'
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **callable_name TSRMLS_DC);
^
In file included from /usr/include/php5/Zend/zend.h:252:0,
from /usr/include/php5/main/php.h:35,
from /tmp/pear/temp/swoole/php_swoole.h:25,
from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h:240:29: error: request for member 'val' in something not a structure or union
char *tmp = estrndup(key->val, key->len);
^
/usr/include/php5/Zend/zend_alloc.h:78:44: note: in definition of macro 'estrndup'
#define estrndup(s, length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
^
/tmp/pear/temp/swoole/php7_wrapper.h:240:39: error: request for member 'len' in something not a structure or union
char *tmp = estrndup(key->val, key->len);
^
/usr/include/php5/Zend/zend_alloc.h:78:49: note: in definition of macro 'estrndup'
#define estrndup(s, length) _estrndup((s), (length) ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
^
In file included from /tmp/pear/temp/swoole/php_swoole.h:156:0,
from /tmp/pear/temp/swoole/swoole.c:16:
/tmp/pear/temp/swoole/php7_wrapper.h: In function 'sw_zend_is_callable_ex':
/tmp/pear/temp/swoole/php7_wrapper.h:248:5: error: unknown type name 'zend_string'
zend_string *key = NULL;
^
/tmp/pear/temp/swoole/php7_wrapper.h:249:5: warning: passing argument 4 of 'zend_is_callable_ex' from incompatible pointer type [enabled by default]
int ret = zend_is_callable_ex(callable, NULL, check_flags, &key, fcc, error);
make: *** [swoole.lo] Error 1
ERROR: `make' failed
I have also tried this
cd swoole-src
./configure
make
Which is also giving the similar errors.
How to solve this? thanks in advance!
EDIT : Added the first Generated ERRORS too
since some weeks, I'm working with a new Mac which works with OS X Yosemite (Version 10.10.3). I figured out a lot of trouble installing programs from source, why I already changed the compiler to, e.g., gcc 4.2, 4.7, and 4.9. Furthermore, I "removed" the connection to clang, but also this produces still errors during compiling. However, doing the same on a Mac OS X machine version 10.7.5 works fine. There, gcc version 4.2.1 is running.
Here's an example error message, I get typing make in the command line:
cc -O2 -c -o swat.o swat.c
In file included from swat.c:25:
./swat.h:85:35: warning: '/*' within block comment [-Wcomment]
/* int *maxstu_vec; NOT NEEDED /* array of length length + 1, used to hold row of scores,
^
swat.c:29:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
compare_scores(entry1, entry2)
^
swat.c:35:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
compare_z_scores(entry1, entry2)
^
swat.c:42:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
compare_E_values(entry1, entry2)
^
swat.c:49:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main(argc,argv)
^
swat.c:75:3: warning: implicit declaration of function 'get_parameters' is invalid in C99 [-Wimplicit-function-declaration]
get_parameters(argc, argv, "swat");
^
swat.c:85:3: warning: implicit declaration of function 'alloc_hist' is invalid in C99 [-Wimplicit-function-declaration]
alloc_hist();
^
swat.c:86:10: warning: implicit declaration of function 'get_next_file_entry' is invalid in C99 [-Wimplicit-function-declaration]
while (get_next_file_entry(qdb)) {
^
swat.c:95:5: warning: implicit declaration of function 'notify' is invalid in C99 [-Wimplicit-function-declaration]
notify("Searching: ");
^
swat.c:98:12: warning: implicit declaration of function 'append_seq_entry' is invalid in C99 [-Wimplicit-function-declaration]
s_entry = append_seq_entry(sdb);
^
swat.c:110:2: warning: implicit declaration of function 'set_score' is invalid in C99 [-Wimplicit-function-declaration]
set_score(s_entry, score);
^
swat.c:127:57: warning: implicit declaration of function 'get_seq_length' is invalid in C99 [-Wimplicit-function-declaration]
score = parameters->align(q_profile, get_seq(s_entry), get_seq_length(s_entry), 1, 0, 0, 0, 0, 0);
^
swat.c:146:5: warning: implicit declaration of function 'initialize_hist' is invalid in C99 [-Wimplicit-function-declaration]
initialize_hist();
^
swat.c:155:7: warning: implicit declaration of function 'update_hist' is invalid in C99 [-Wimplicit-function-declaration]
update_hist(score_entry, 0);
^
swat.c:158:5: warning: implicit declaration of function 'process_hist' is invalid in C99 [-Wimplicit-function-declaration]
process_hist();
^
swat.c:172:2: warning: implicit declaration of function 'fit_log_n' is invalid in C99 [-Wimplicit-function-declaration]
fit_log_n(q_length);
^
swat.c:175:4: warning: implicit declaration of function 'find_z' is invalid in C99 [-Wimplicit-function-declaration]
find_z(score_entry);
^
swat.c:195:9: warning: implicit declaration of function 'reject_entry' is invalid in C99 [-Wimplicit-function-declaration]
if (!reject_entry(score_entry)) nz++; /* assumes Smith-Waterman */
^
swat.c:202:7: warning: implicit declaration of function 'new_est_lambda_K' is invalid in C99 [-Wimplicit-function-declaration]
new_est_lambda_K(q_length, score_entries, last_score_entry);
^
swat.c:242:24: warning: '&&' within '||' [-Wlogical-op-parentheses]
if (parameters->use_n && score_entry >= score_entries + parameters->max_num_alignments
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swat.c:242:24: note: place parentheses around the '&&' expression to silence this warning
if (parameters->use_n && score_entry >= score_entries + parameters->max_num_alignments
^
( )
swat.c:243:24: warning: '&&' within '||' [-Wlogical-op-parentheses]
|| parameters->use_z && score_entry->z < parameters->z_cutoff || !score_entry->score)
~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
swat.c:243:24: note: place parentheses around the '&&' expression to silence this warning
|| parameters->use_z && score_entry->z < parameters->z_cutoff || !score_entry->score)
^
( )
swat.c:256:29: warning: data argument not used by format string [-Wformat-extra-args]
score_entry->score, score_entry->z, e_value, score_entry->E);
^
swat.c:261:2: warning: implicit declaration of function 'print_alignment' is invalid in C99 [-Wimplicit-function-declaration]
print_alignment(q_profile);
^
swat.c:266:65: warning: data argument not used by format string [-Wformat-extra-args]
get_id(seq_num), get_seq_length(seq_num), score_entry->score, score_entry->z);
^
swat.c:272:5: warning: implicit declaration of function 'free_profile' is invalid in C99 [-Wimplicit-function-declaration]
free_profile(q_profile);
^
25 warnings generated.
cc -O2 -c -o weibull.o weibull.c
In file included from weibull.c:25:
./swat.h:85:35: warning: '/*' within block comment [-Wcomment]
/* int *maxstu_vec; NOT NEEDED /* array of length length + 1, used to hold row of scores,
^
weibull.c:47:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
reject_entry(score_entry)
^
weibull.c:50:32: warning: '&&' within '||' [-Wlogical-op-parentheses]
return (!parameters->nw_flag && !score_entry->score || score_entry->length < LENGTH_CUTOFF);
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ~~
weibull.c:50:32: note: place parentheses around the '&&' expression to silence this warning
return (!parameters->nw_flag && !score_entry->score || score_entry->length < LENGTH_CUTOFF);
^
( )
weibull.c:53:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
alloc_hist()
^
weibull.c:65:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
weibull.c:67:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
initialize_hist()
^
weibull.c:78:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
weibull.c:80:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
update_hist(score_entry, z_flag)
^
weibull.c:88:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
return;
^
weibull.c:92:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
return;
^
weibull.c:106:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
prune_hist(score_entry)
^
weibull.c:111:34: error: non-void function 'prune_hist' should return a value [-Wreturn-type]
if (reject_entry(score_entry)) return;
^
weibull.c:127:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
process_hist()
^
weibull.c:155:5: warning: implicit declaration of function 'fatalError' is invalid in C99 [-Wimplicit-function-declaration]
fatalError("No entries have scores exceeding -gap_init");
^
weibull.c:168:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
fit_log_n(q_length)
^
weibull.c:300:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
est_lambda_K(q_length)
^
weibull.c:399:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
new_est_lambda_K(q_length, score_entries, last_score_entry) /* using non-extreme-value dist'n */
^
weibull.c:644:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
find_z(entry)
^
weibull.c:652:21: warning: implicit declaration of function 'make_log_table' is invalid in C99 [-Wimplicit-function-declaration]
if (!log_table) make_log_table();
^
weibull.c:665:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
make_log_table()
^
17 warnings and 3 errors generated.
make: *** [weibull.o] Error 1
Maybe someone of you has any idea, what the problem could be???
I would be very glad for every answer :)
weibull.c:88:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
return;
^
weibull.c:92:5: error: non-void function 'update_hist' should return a value [-Wreturn-type]
return;
^
and
weibull.c:111:34: error: non-void function 'prune_hist' should return a value [-Wreturn-type]
if (reject_entry(score_entry)) return;
^
must return a vaule of type in given function's header.
I found a solution. The problem was, as I already feared, the compiler.
I installed a relatively new version (gcc 4.9), set this version as active and added the path in ~/.bash_profile (that was the most important step). Furthermore, I adopted the makefile. Opening a new terminal and typing "make" runs without errors.