Skip to content

Use of C99 breaks gem install on CentOS 7 #11

@tas50

Description

@tas50

This gem uses C99 code that prevents the gem install on CentOS 7 unless people use pull in the backported development tools. Is there any way to use older style code here that would compile on CentOS 7 out of the box?

 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/io-wait-0.2.1/ext/io/wait /opt/chef/embedded/bin/ruby -I /opt/chef/embedded/lib/ruby/3.0.0 -r ./siteconf20220209-187-few2km.rb extconf.rb checking for rb_io_wait()... yes checking for sys/ioctl.h... yes checking for FIONREAD in sys/ioctl.h,sys/ioctl.h... yes creating Makefile current directory: /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/io-wait-0.2.1/ext/io/wait make DESTDIR\\= clean current directory: /opt/chef/embedded/lib/ruby/gems/3.0.0/gems/io-wait-0.2.1/ext/io/wait make DESTDIR\\= compiling wait.c wait.c: In function 'io_wait': wait.c:332:2: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < argc; i += 1) { ^ wait.c:332:2: note: use option -std=c99 or -std=gnu99 to compile your code make: *** [wait.o] Error 1 make failed, exit code 2 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions