Good day Chef community. I'm needing some assistance installing a Ruby gem into the Chef configured version of Ruby on the AIX platform. No matter which version of Chef i'm using (14.13.11 and Chef 15), I keep getting the following message when I try to install the gem
ruby-oci8
When I do the following:
gem install ruby-oci8
I get the following message error:
checking for cc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Error Message:
The compiler failed to generate an executable file.
You have to install development tools first.
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/opt/chef/embedded/lib/ruby/gems/2.7.0/extensions/powerpc-aix-7/2.7.0/ruby-oci8-2.2.8/mkmf.log
extconf failed, exit code 1
Below is the content in that log file:
"xlc_r -q64 -oconftest -I/opt/chef/embedded/include/ruby-2.7.0/powerpc-aix7.1.5.0 -I/opt/chef/embedded/include/ruby-2.7.0/ruby/backward -I/opt/chef/embedded/include/ruby-2.7.0 -I. -I/opt/ch ef/embedded/include/ruby-2.7.0 -I/opt/chef/embedded/include/ncurses -I/opt/chef/embedded/include -I/opt/chef/embedded/include/ncurses -I/opt/chef/embedded/include conftest.c -L. -L/opt/c hef/embedded/lib -L. -q64 -L/opt/chef/embedded/lib -Wl,-blibpath:/opt/chef/embedded/lib:/usr/lib:/lib -L/opt/chef/embedded/lib -lruby -lm -lc" checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return !!argv[argc]; 6: } /* end */
I'm unsure what development tools are missing but this isnt an issue with the Chef 14 or 15 on RHEL, or Oracle Linux (OEL). I do have gcc
installed
which gcc
/usr/bin/gcc
Any assistance is greatly appreciated. To reduplicate this situation please do the following.
- Use an AIX 7.1 or 7.2 node with "Oracle Database" or "Oracle Client" software installed
- Set the following environment variables (per instruction of Gem) before installing
export ORACLE_HOME=<oracle_software_directory>
export LIBPATH=$ORACLE_HOME/lib
gem install ruby-oci8-2.2.8.gem