Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with new version of OJ when installing the plugins on centos 7 #188

Open
gvdb1967 opened this issue Aug 12, 2021 · 0 comments
Open

Comments

@gvdb1967
Copy link

OS: CentOS Linux release 7.9.2009 (Core)
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

# /usr/bin/sensu-install --plugin http
[SENSU-INSTALL] installing Sensu plugins ...
[SENSU-INSTALL] determining if Sensu gem 'sensu-plugins-http' is already installed ...
false
[SENSU-INSTALL] Sensu plugin gems to be installed: ["sensu-plugins-http"]
[SENSU-INSTALL] installing Sensu gem 'sensu-plugins-http'
Building native extensions.  This could take a while...
ERROR:  Error installing sensu-plugins-http:
	ERROR: Failed to build gem native extension.

    current directory: /opt/sensu-plugins-ruby/embedded/lib/ruby/gems/2.4.0/gems/oj-3.13.1/ext/oj
/opt/sensu-plugins-ruby/embedded/bin/ruby -r ./siteconf20210812-10300-130cbet.rb extconf.rb
>>>>> Creating Makefile for ruby version 2.4.10 on x86_64-linux <<<<<
checking for rb_time_timespec()... yes
checking for rb_ivar_count()... yes
checking for rb_ivar_foreach()... yes
checking for rb_gc_mark_movable()... no
checking for stpcpy()... yes
checking for pthread_mutex_init()... yes
checking for rb_enc_associate()... yes
checking for rb_ext_ractor_safe() in ruby.h... no
checking for rb_hash_bulk_insert() in ruby.h... no
creating Makefile

current directory: /opt/sensu-plugins-ruby/embedded/lib/ruby/gems/2.4.0/gems/oj-3.13.1/ext/oj
make "DESTDIR=" clean

current directory: /opt/sensu-plugins-ruby/embedded/lib/ruby/gems/2.4.0/gems/oj-3.13.1/ext/oj
make "DESTDIR="
compiling cache.c
cache.c: In function ‘rehash’:
cache.c:115:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (Slot *sp = c->slots; sp < end; sp++) {
     ^
cache.c:115:5: note: use option -std=c99 or -std=gnu99 to compile your code
cache.c: In function ‘cache_free’:
cache.c:133:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (uint32_t i = 0; i < c->size; i++) {
     ^
cache.c:135:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for (Slot s = c->slots[i]; NULL != s; s = next) {
         ^
cache.c: In function ‘cache_mark’:
cache.c:146:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for (uint32_t i = 0; i < c->size; i++) {
         ^
cache.c:147:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
             for (Slot s = c->slots[i]; NULL != s; s = s->next) {
             ^
make: *** [cache.o] Error 1

make failed, exit code 2

Gem files will remain installed in /opt/sensu-plugins-ruby/embedded/lib/ruby/gems/2.4.0/gems/oj-3.13.1 for inspection.
Results logged to /opt/sensu-plugins-ruby/embedded/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0/oj-3.13.1/gem_make.out
[SENSU-INSTALL] failed to install Sensu gem 'sensu-plugins-http'
[SENSU-INSTALL] you can run the sensu-install command again with --verbose for more info
[SENSU-INSTALL] please take note of any failure messages above
[SENSU-INSTALL] make sure you have build tools installed (e.g. gcc)
[SENSU-INSTALL] trying to determine the Sensu plugin homepage for sensu-plugins-http ...
homepage: https://github.com/sensu-plugins/sensu-plugins-http

See also: ohler55/oj#689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant