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.
Related
I was struggling to install thin as a dependency in a Ruby project, when I came across this solution here: https://github.com/macournoyer/thin/issues/365#issuecomment-692063842 (gem install thin -v '1.7.2' -- --with-cflags="-Wno-error=implicit-function-declaration")
It works, but I'm not very familiar with Ruby so have no idea why. What is this flag doing? Why does it make the install work without any issues?
The error I was getting before this fix:
❯ gem install thin -v '1.7.2'
Building native extensions. This could take a while...
ERROR: Error installing thin:
ERROR: Failed to build gem native extension.
current directory: /Users/XXX/.gem/ruby/2.7.1/gems/thin-1.7.2/ext/thin_parser
/Users/XXX/.rubies/ruby-2.7.1/bin/ruby -I /Users/XXX/.rubies/ruby-2.7.1/lib/ruby/2.7.0 -r ./siteconf20210923-79304-z21dcg.rb extconf.rb
checking for main() in -lc... yes
creating Makefile
current directory: /Users/XXX/.gem/ruby/2.7.1/gems/thin-1.7.2/ext/thin_parser
make "DESTDIR=" clean
current directory: /Users/XXX/.gem/ruby/2.7.1/gems/thin-1.7.2/ext/thin_parser
make "DESTDIR="
compiling parser.c
parser.c:31:18: warning: unused variable 'http_parser_en_main' [-Wunused-const-variable]
static const int http_parser_en_main = 1;
^
1 warning generated.
compiling thin.c
thin.c:242:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(hp);
^
thin.c:242:3: note: did you mean 'http_parser_init'?
./parser.h:41:5: note: 'http_parser_init' declared here
int http_parser_init(http_parser *parser);
^
thin.c:260:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(http);
^
thin.c:277:3: error: implicit declaration of function 'thin_http_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_init(http);
^
thin.c:294:3: error: implicit declaration of function 'thin_http_parser_finish' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_finish(http);
^
thin.c:294:3: note: did you mean 'Thin_HttpParser_finish'?
thin.c:290:7: note: 'Thin_HttpParser_finish' declared here
VALUE Thin_HttpParser_finish(VALUE self)
^
thin.c:296:10: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
^
thin.c:334:5: error: implicit declaration of function 'thin_http_parser_execute' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
thin_http_parser_execute(http, dptr, dlen, from);
^
thin.c:334:5: note: did you mean 'Thin_HttpParser_execute'?
thin.c:317:7: note: 'Thin_HttpParser_execute' declared here
VALUE Thin_HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
^
thin.c:338:8: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if(thin_http_parser_has_error(http)) {
^
thin.c:338:8: note: did you mean 'http_parser_has_error'?
./parser.h:44:5: note: 'http_parser_has_error' declared here
int http_parser_has_error(http_parser *parser);
^
thin.c:359:10: error: implicit declaration of function 'thin_http_parser_has_error' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_has_error(http) ? Qtrue : Qfalse;
^
thin.c:374:10: error: implicit declaration of function 'thin_http_parser_is_finished' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return thin_http_parser_is_finished(http) ? Qtrue : Qfalse;
^
9 errors generated.
make: *** [thin.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/XXX/.gem/ruby/2.7.1/gems/thin-1.7.2 for inspection.
Results logged to /Users/XXX/.gem/ruby/2.7.1/extensions/x86_64-darwin-19/2.7.0-static/thin-1.7.2/gem_make.out
I didn't read the stack trace properly...
It looks like this flag is basically telling the compiler to ignore where functions are implicitly declared rather than erroring out when this happens.
Why is my lex build failing on Macos?
This is the error:
lex_yy.c:71:6: error: implicit declaration of function 'yywrap' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (yywrap()) return(0); break;
lex_yy.c:68:14: error: implicit declaration of function 'yylook' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
while( (nstr = yylook()) >= 0)
and
lex_yy.c:874:12: error: implicit declaration of function 'yyback' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
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 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
I am trying to solve an integer linear program using SCIP. The beta version that I require (for exact solving) is given at:
http://scip.zib.de/#exact
As linked there, the source code is at:
http://scip.zib.de/download.php?fname=scip-3.0.0-ex.tgz
I followed the INSTALL file. It requires the installation of EGlib 2.6.20. However, this installation fails during 'make' with the following error:
phani#OptiPlex-9030-AIO ~/EGlib-2.6.20 $ make
make[1]: Entering directory '/home/phani/EGlib-2.6.20'
make[1]: Leaving directory '/home/phani/EGlib-2.6.20'
make[1]: Entering directory '/home/phani/EGlib-2.6.20'
Building include/EGlib.h
Compiling src/eg_bit.c
Compiling src/eg_compare.c
Compiling src/eg_io.c
src/eg_io.c: In function ‘EGioGets’:
src/eg_io.c:618:7: warning: unused variable ‘b’ [-Wunused-variable]
char*b = buf;
^
src/eg_io.c: In function ‘EGioEof’:
src/eg_io.c:648:6: warning: unused variable ‘err’ [-Wunused-variable]
int err;
^
src/eg_io.c: In function ‘EGmvar’:
src/eg_io.c:42:2: warning: second parameter of ‘va_start’ not last named argument [-Wvarargs]
va_start (largs, nind);
^
Compiling src/eg_lpnum.c
Compiling src/eg_net.c
Compiling src/eg_random.c
Compiling src/eg_macros.c
Compiling src/eg_ehash.c
Compiling src/eg_perm_it.c
Compiling src/eg_symtab.c
Compiling src/eg_keytab.c
Compiling src/eg_simula.c
In file included from src/eg_simula.c:25:0:
src/eg_simula.h:227:2: error: unknown type name ‘dbl_EGeHeapCn_t’
dbl_EGeHeapCn_t heap_cn;/**< connector in the heap containing the agent */
^
src/eg_simula.h:240:2: error: unknown type name ‘dbl_EGeHeap_t’
dbl_EGeHeap_t hp; /**< Heap containing events to be processed */
^
src/eg_simula.c: In function ‘EGsimExp’:
src/eg_simula.c:29:30: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimExp(const double t, void*const data)
^
src/eg_simula.c: In function ‘EGsimUniform’:
src/eg_simula.c:40:34: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimUniform(const double t, void*const data)
^
src/eg_simula.c: In function ‘EGsimNormal’:
src/eg_simula.c:51:33: warning: unused parameter ‘t’ [-Wunused-parameter]
double EGsimNormal(const double t, void*const data)
^
In file included from src/eg_simula.c:25:0:
src/eg_simula.c: In function ‘EGsimNewEvent’:
src/eg_simula.h:277:2: warning: implicit declaration of function ‘dbl_EGeHeapCnInit’ [-Wimplicit-function-declaration]
dbl_EGeHeapCnInit(&(__EGsimA->heap_cn));\
^
src/eg_simula.c:73:2: note: in expansion of macro ‘EGsimSetAgent’
EGsimSetAgent(la,sim->cur_time + gen->gen(sim->cur_time,gen->data));
^
src/eg_simula.c:74:13: error: request for member ‘val’ in something not a structure or union
la->heap_cn.val = la->last_time;
^
src/eg_simula.c:77:12: error: request for member ‘sz’ in something not a structure or union
if(sim->hp.sz == sim->hp.max_sz)
^
src/eg_simula.c:77:26: error: request for member ‘max_sz’ in something not a structure or union
if(sim->hp.sz == sim->hp.max_sz)
^
src/eg_simula.c:78:3: warning: implicit declaration of function ‘dbl_EGeHeapResize’ [-Wimplicit-function-declaration]
dbl_EGeHeapResize(&(sim->hp),sim->hp.sz*2);
^
src/eg_simula.c:78:39: error: request for member ‘sz’ in something not a structure or union
dbl_EGeHeapResize(&(sim->hp),sim->hp.sz*2);
^
src/eg_simula.c:80:9: warning: implicit declaration of function ‘dbl_EGeHeapAdd’ [-Wimplicit-function-declaration]
rval = dbl_EGeHeapAdd(&(sim->hp),&(la->heap_cn));
^
In file included from src/eg_simula.h:47:0,
from src/eg_simula.c:25:
src/eg_simula.c:85:55: error: request for member ‘val’ in something not a structure or union
MESSAGE(EG_SIM_VERBOSE,"new Agent at %lf",la->heap_cn.val);
^
src/eg_macros.h:246:18: note: in definition of macro ‘MESSAGE’
fprintf(stderr,__VA_ARGS__);\
^
In file included from src/eg_simula.h:47:0,
from src/eg_simula.c:25:
src/eg_simula.c: In function ‘EGsim’:
src/eg_simula.c:284:22: warning: implicit declaration of function ‘dbl_EGeHeapGetMin’ [-Wimplicit-function-declaration]
ca = EGcontainerOf(dbl_EGeHeapGetMin(&(sim->hp)), EGsimAgent_t,heap_cn);
^
src/eg_macros.h:134:56: note: in definition of macro ‘EGcontainerOf’
typeof(((__type *)0)->__member) *const __EGcOf_ptr = (__ptr);\
^
src/eg_macros.h:134:55: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
typeof(((__type *)0)->__member) *const __EGcOf_ptr = (__ptr);\
^
src/eg_simula.c:284:8: note: in expansion of macro ‘EGcontainerOf’
ca = EGcontainerOf(dbl_EGeHeapGetMin(&(sim->hp)), EGsimAgent_t,heap_cn);
^
src/eg_simula.c:285:30: error: request for member ‘val’ in something not a structure or union
sim->cur_time = ca->heap_cn.val;
^
src/eg_simula.c:327:17: error: request for member ‘val’ in something not a structure or union
na->heap_cn.val = sim->cur_time + cn->gen(sim->cur_time,cn->data);
^
src/eg_simula.c:328:6: warning: implicit declaration of function ‘dbl_EGeHeapSiftUp’ [-Wimplicit-function-declaration]
dbl_EGeHeapSiftUp(&(sim->hp),&(na->heap_cn));
^
src/eg_simula.c:365:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time;
^
src/eg_simula.c:371:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time + nn->gen(sim->cur_time,nn->data);
^
src/eg_simula.c:377:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = DBL_MAX;
^
src/eg_simula.c:381:12: warning: implicit declaration of function ‘dbl_EGeHeapSiftDown’ [-Wimplicit-function-declaration]
rval = dbl_EGeHeapSiftDown(&(sim->hp),&(ca->heap_cn));
^
src/eg_simula.c:388:5: warning: implicit declaration of function ‘dbl_EGeHeapDel’ [-Wimplicit-function-declaration]
dbl_EGeHeapDel(&(sim->hp),&(ca->heap_cn));
^
src/eg_simula.c:429:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time;
^
src/eg_simula.c:433:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = sim->cur_time + nn->gen(sim->cur_time,nn->data);
^
src/eg_simula.c:441:17: error: request for member ‘val’ in something not a structure or union
ca->heap_cn.val = DBL_MAX;
^
Makefile.library:38: recipe for target 'obj/eg_simula.o' failed
make[1]: *** [obj/eg_simula.o] Error 1
make[1]: Leaving directory '/home/phani/EGlib-2.6.20'
Makefile:23: recipe for target 'library' failed
make: *** [library] Error 2
After some searching, I have noticed that dbl_EGeHeap_t is not defined in the source code, and that seems to be throwing errors.
On searching online, it seems to be the case that it was defined in EGlib 2.6.15 (https://conexo.dii.uchile.cl/SVN/EGlib/EGlib2/tags/EGlib-2.6.15/TEmplate/dbl_eg_eheap.h), but the corresponding file in 2.6.20 does not have the definition.
Has anybody else experienced this? I badly need a solution to this.