Created attachment 465318 [details] emerge --info app-admin/puppet After installing app-admin/puppet-4.9.1 and trying to execute `puppet -V` I get the following error: libfacter was not found. Please make sure it was installed to the expected location. Interesingly the command works correctly after I do `sudo -i` and execute it as root (`sudo puppet -V` and `sudo su` and then `puppet -V` results in error). A hack that I've found to work is to do: sudo mkdir /usr/lib64/lib64/ sudo ln -s /usr/lib64/libfacter.so /usr/lib64/lib64/ Result of `emerge --info app-admin/puppet` is attached to this report. I'll be happy to give any information that might be of help, but I'm not sure exactly what to look for.
That is definitely an odd hack to have to do, what are the permissions of facter? perhaps it's not finding it because of that.
The permissions are as follows: ls -lah /usr/lib64/ | grep libfacter lrwxrwxrwx 1 root root 18 Feb 26 01:27 libfacter.so -> libfacter.so.3.5.1 -rwxr-xr-x 1 root root 3.4M Feb 26 01:27 libfacter.so.3.5.1
Ok, so that doesn't look to be it. So maybe an ldd on the puppet binary? Not seeing anything in the ebuild that'd cause this on the puppet side.
Do you mean /usr/bin/puppet? It's a ruby script, so: ldd /usr/bin/puppet not a dynamic executable
ya, not that, there should be a file puppet installs that trys to link against it. qlist app-admin/puppet | grep libfacter that might find it
The output of the command you provided is empty. I think it loads the .so dynamically by some ruby's FFI voodoo.
I've just run into the same problem and it seems to be caused by a bug in dev-ruby/facter-3.1.8: following the setting of facter_dir in line 30 of /usr/lib/ruby/site_ruby/<ver>/facter.rb , line 36 of same attempts to load /usr/lib64/lib64/libfacter.so. Needs one more level of ../ .
That's odd, facter is installed correctly here (tested 3.6.2) image/usr image/usr/lib64 image/usr/lib64/libfacter.so image/usr/lib64/ruby image/usr/lib64/ruby/site_ruby image/usr/lib64/ruby/site_ruby/2.1.0 image/usr/lib64/ruby/site_ruby/2.1.0/facter.rb image/usr/lib64/libfacter.so.3.6.2
I'm getting this with puppet 4.9.1-r1 and facter 3.6.2. I confirm that adding an extra ../ to line 30 of /usr/lib64/ruby/site_ruby/2.1.0/facter.rb fixes it. This appears to be a facter bug, it happens just from loading facter.rb from irb, too.
Ya, see the problem now begin facter_dir = ENV['FACTERDIR'] || File.join(File.expand_path("#{File.dirname(__FILE__)}"), '../../../') # # This is a cmake pre-processor check. On *nix it will end up '' == '1' # On windows, where we want the changes it will be '1' == '1' # # Facter requires the extra inclusion of puppet/bin as the libfacter.so # lib requires libraries and executables from that directory if '' == '1' ENV['PATH'] = "#{File.join(facter_dir, 'bin')}#{File::PATH_SEPARATOR}#{File.join(facter_dir, '../puppet/bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}" end require "#{facter_dir}/lib64/libfacter.so" The directory is fine, as that's /usr/lib64 (on my system). the facter_dir variable is also used in the PATH section. So it probably shouldn't change. The problem actually seems to come from the actual require hardcoding whatever the libdir ends up being. sed -i 's/\${LIBFACTER_INSTALL_DESTINATION}\///g' lib/facter.rb.in || die in src_prepare seems to fix it will be fixed in r1
*** Bug 613680 has been marked as a duplicate of this bug. ***
After a rebuild due to new gcc, this broke for me (again). What I don't understand is that /etc/env.d/00facterdir defines: FACTERDIR=/usr and that makes facter_dir = ENV['FACTERDIR'] || File.join(File.expand_path("#{File.dirname(__FILE__)}"), '../../../') resolve to /usr and in my copy of the code, the next thing is require "#{facter_dir}/libfacter.so" obviously /usr/libfacter.so doesn't exist.
fixed in 3.6.3-r1 some unneeded libdir things should be fixed now too