Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581488 - dev-ruby/facter-3.1.6: puppet fail with "cannot load such file -- facter"
Summary: dev-ruby/facter-3.1.6: puppet fail with "cannot load such file -- facter"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-28 21:46 UTC by Christer Ekholm
Modified: 2016-05-01 08:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christer Ekholm 2016-04-28 21:46:59 UTC
With dev-ruby/facter-3.1.6 puppet has stopped working.



 $ puppet --version
 cannot load such file -- facter

Downgrade facter to 3.1.4-r1 helps.


$ emerge --info facter puppet ruby
Portage 2.2.28 (python 3.4.3-final-0, default/linux/amd64/13.0/no-multilib, gcc-5.3.0, glibc-2.23-r2, 4.5.2 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.5.2-x86_64-Intel-R-_Xeon-R-_CPU_X5680_@_3.33GHz-with-gentoo-2.2
KiB Mem:    16435908 total,   1722636 free
KiB Swap:   12583416 total,  10547188 free
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.1::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo, 3.5.1-r2::gentoo
dev-util/cmake:           3.5.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: git://ender.chrekh.se/usr/portage
    priority: -1000

chrekh
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -march=native -fno-stack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -pipe -march=native -fno-stack-protector"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://mirror.mdfnet.se/gentoo http://ftp.df.lth.se/pub/gentoo/ http://de-mirror.org/gentoo/ http://mirror.netcologne.de/gentoo/ http://gentoo.bloodhost.ru/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://mirrors.linuxant.fr/distfiles.gentoo.org/ "
LANG="sv_SE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="3dnow 3dnowext X Xaw3d a52 aac acpi alsa amd64 ao aotuv apng audiofile augeas bonobo bzip2 cairo caps cddb cdparanoia cdrom chroot cli crypt curl cxx dba dbus diskio dri dts dvd dvdread emacs enca encode fam ffmpeg filecaps flac fluidsynth fontconfig ftp g3dvl garmin gcj gd gdbm gif glx gmp gps gtk gtk3 gtkhtml iconv icu imap innodb ipv6 ithreads jack jikes jpeg lastfm libkms libnotify libxml2 libzfs llvm-shared-libs lm_sensors lua mad matroska mbox mime mmx mmxext mng mono motif mozilla mp3 mp4 mpeg mpg123 mtp ncurses net network nls noamazon nptl nsplugin nvidia offensive ogg oggvorbis opengl openmp openrc opus pcre pda pdf perl plotutils png qt3support qt5 readline sasl sdl seamonkey seccomp session sndfile sox spell sqlite sse sse2 ssl startup-notification subversion svg system-qt tcpd threads timidity tk toolkit-scroll-bars truetype tty-helpers unicode usb userlocales utempter utf8 uvm visualization vorbis vpx webkit webstart win32codecs x246 x264 xanim xattr xinerama xml xosd xpdf-headers xpm xv xvid xvmc zfs zlib" ABI_X86="64" ALSA_CARDS="emu10k1x" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="se en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby21 ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="vesa nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-ruby/facter-3.1.6::gentoo was built with the following:
USE="-debug -test" RUBY_TARGETS="ruby21 ruby22 -ruby20"


app-admin/puppet-4.4.2::gentoo was built with the following:
USE="augeas diff doc emacs rrdtool shadow sqlite -ldap (-selinux) -test -vim-syntax -xemacs" RUBY_TARGETS="ruby21 -ruby20"


dev-lang/ruby-2.1.10::gentoo was built with the following:
USE="gdbm ipv6 ncurses rdoc readline ssl -berkdb -debug -doc -examples -rubytests -socks5 -xemacs"
CFLAGS="-O3 -pipe -march=native -fno-stack-protector -fno-strict-aliasing"
CXXFLAGS="-O3 -pipe -march=native -fno-stack-protector -fno-strict-aliasing"


dev-lang/ruby-2.2.5::gentoo was built with the following:
USE="gdbm ipv6 ncurses rdoc readline ssl -berkdb -debug -doc -examples -jemalloc -libressl -rubytests -socks5 -xemacs"
CFLAGS="-O3 -pipe -march=native -fno-stack-protector -fno-strict-aliasing"
CXXFLAGS="-O3 -pipe -march=native -fno-stack-protector -fno-strict-aliasing"


dev-lang/ruby-2.3.1::gentoo was built with the following:
USE="gdbm ipv6 ncurses rdoc readline ssl -berkdb -debug -doc -examples -jemalloc -libressl -rubytests -socks5 -xemacs"
CFLAGS="-O3 -pipe -march=native -fno-stack-protector -fno-strict-aliasing"
CXXFLAGS="-O3 -pipe -march=native -fno-stack-protector -fno-strict-aliasing"
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-04-29 14:42:59 UTC
The build system made it harder to build the rb file.  If you/I can figure it out I can re-add ruby support to it.
Comment 2 Christer Ekholm 2016-04-29 20:48:25 UTC
I think I have identified the problem.

In lib/CMakeLists.txt the code that generates facter.rb

    configure_file (
        "facter.rb.in"
        "${CMAKE_BINARY_DIR}/lib/facter.rb"
    )

has moved to inside the block if(RUBY_VENDORDIR)

And that block is disabled on gentoo with 

	# Remove the code that installs facter.rb to the wrong directory.
	sed -i 's/if(RUBY_VENDORDIR)/if(False)/g' lib/CMakeLists.txt || die
	sed -i '/RUBY_VENDORDIR/d' lib/CMakeLists.txt || die
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-04-30 00:50:57 UTC
Thanks for pointing that out, changed the line to not disable the build part of it.

fixed as r1
Comment 4 Christer Ekholm 2016-04-30 13:13:41 UTC
Unfortunately this isn't enough

$ puppet --version
libfacter was not found. Please make sure it was installed to the expected location.

Preliminary investigation suggest that not only CMakeLists.txt but
also facter.rb.in is changed.

/usr/lib64/ruby/site_ruby/2.1.0/facter.rb now has the following

 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'
   if '' == '1'
     ENV['PATH'] = "#{File.join(facter_dir, 'bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
   end
   require "#{facter_dir}/lib64/libfacter.so"
 rescue LoadError
   raise LoadError.new('libfacter was not found. Please make sure it was installed to the expected location.')
 end

And simply doing

 export FACTERDIR=/usr

helps for me.

$ puppet --version
4.4.2
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-05-01 01:31:21 UTC
I could install an env.d file that should fix this, just wish they'd quit breaking facter.
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-05-01 01:37:04 UTC
try r2
Comment 7 Christer Ekholm 2016-05-01 08:16:31 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #6)
> try r2

Works for me.