Build broken with 1.4.0 on ancient Ubuntu in Travis
pkopac opened this issue · comments
Petr Kopac commented
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/home/travis/build/chartmogul/platform/vendor/bundle/ruby/2.4.0/gems/ruby-prof-1.4.0/ext/ruby_prof
/home/travis/.rvm/rubies/ruby-2.4.10/bin/ruby -r
./siteconf20200514-9228-1wo2pmv.rb extconf.rb
checking for rb_tracearg_callee_id() in ruby.h... no
creating Makefile
current directory:
/home/travis/build/chartmogul/platform/vendor/bundle/ruby/2.4.0/gems/ruby-prof-1.4.0/ext/ruby_prof
make "DESTDIR=" clean
current directory:
/home/travis/build/chartmogul/platform/vendor/bundle/ruby/2.4.0/gems/ruby-prof-1.4.0/ext/ruby_prof
make "DESTDIR="
compiling rp_aggregate_call_tree.c
compiling rp_allocation.c
rp_allocation.c: In function ‘prof_allocate_increment’:
rp_allocation.c:64:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
VALUE klass = rb_obj_class(object);
^
rp_allocation.c: In function ‘prof_allocation_mark’:
rp_allocation.c:119:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
prof_allocation_t* allocation = (prof_allocation_t*)data;
^
rp_allocation.c: At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by
default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand"
[enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality"
[enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare"
[enabled by default]
compiling rp_call_tree.c
rp_call_tree.c: In function ‘prof_call_tree_mark’:
rp_call_tree.c:77:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
prof_call_tree_t* call_tree = (prof_call_tree_t*)data;
^
rp_call_tree.c: In function ‘prof_call_tree_load’:
rp_call_tree.c:325:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
VALUE measurement = rb_hash_aref(data, ID2SYM(rb_intern("measurement")));
^
rp_call_tree.c:335:5: warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
VALUE callees = rb_hash_aref(data, ID2SYM(rb_intern("children")));
^
rp_call_tree.c:336:5: error: ‘for’ loop initial declarations are only allowed in
C99 mode
for (int i = 0; i < rb_array_len(callees); i++)
^
rp_call_tree.c:336:5: note: use option -std=c99 or -std=gnu99 to compile your
code
rp_call_tree.c: At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by
default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand"
[enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality"
[enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare"
[enabled by default]
make: *** [rp_call_tree.o] Error 1
make failed, exit code 2
System:
Ubuntu 14.04.5 LTS
gcc version:
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
cmake version:
cmake version 3.9.2
default ruby version:
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
Petr Kopac commented
It's probably not necessary to support such old version, I'll just update the Travis image version.
Charlie Savage commented
In the dev branch I did remove Ruby 2.4 in the travis build. But that's an easy bug to fix, so I'll fix it.
Charlie Savage commented
Thanks for the report, this should now be fixed in version 1.4.1.
Petr Kopac commented
@cfis thanks for the super fast fix! Meanwhile I managed to update our config to 18.04, which should really have been done a while ago.