Replies: 1 comment 1 reply
-
I would try ffi 1.15.5 as there are some issues with newer versions. Also recommend newer facter version too. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am running puppet 7.28 open source - trying to install version 4.5.2 facter on AIX, installed with ruby 2.7 gems.
We have been running facter version 2 historically, which does not use ffi.
There looks to be a major shift in the design of facter between version 2 and 4 - moving several facts from facter itself in to ffi. I am having trouble getting this facter to ffi integration to work on AIX.
As AIX doesn't have puppet, facter or ffi packaged, I installed these using gems. ffi actually runs compiles using gcc at this point, it is not a simple install.
After install using 64bit ruby, facter errors out with the following errors:
The invalid magic number error looks to point to a 32bit/64bit mismatch. The library it is looking for shr.o in /usr/lib/libc.a - this is the 32bit version of the library.
Line 23 of the file ffi_helper.rb here:
https://github.com/puppetlabs/facter/blob/main/lib/facter/resolvers/aix/ffi/ffi_helper.rb
seems to be hard coded to point to the 32bit AIX libc library.
ffi_lib 'libc.a(shr.o)'
The 64bit library on AIX is called shr_64.o .
I tried changing this line to refer to shr_64.o on my install, - it still did not work, but errors changed to:
so I expect something else needs to be done to get facter and ffi to work using 64bit ruby.
My troubleshooting got puppet, facter and ffi to work by running puppet and facter with 32bit ruby instead of the default 64bit ruby, and reinstalling ffi with 32bit ruby so it compiled the ffi components in 32bit mode.
I would like to know if it is expected that on AIX we run puppet and facter using 32bit ruby? The default is 64bit ruby which we have been using up until now.
If this is unexpected behaviour and facter with ffi should be working with 64bit ruby, I would appreciate any assistance in getting this to work in 64bit mode.
Thanks,
Alan
Beta Was this translation helpful? Give feedback.
All reactions