Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 570304

Summary: dev-ruby/facter-3.1.3 fails to build with SYMLINK_LIB=no
Product: Gentoo Linux Reporter: Georgi Georgiev <chutz+bugs.gentoo.org>
Component: Current packagesAssignee: Matthew Thode ( prometheanfire ) <prometheanfire>
Status: RESOLVED FIXED    
Severity: normal CC: ruby, sysadmin
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 506276    

Description Georgi Georgiev 2015-12-30 19:43:11 UTC
dev-ruby/facter-3.1.3 fails to build with SYMLINK_LIB=no profile with an error that libblkid.so.1 is in the wrong format. Turns out that cmake finds and links against /usr/lib/libblkid.so.1 while it should have used /lib64/libblkid.so.1 instead.

I am not sure what the right way to fix this is. The problem should probably be fixed here: https://github.com/puppetlabs/facter/blob/master/cmake/FindBLKID.cmake

but I opted for this hack instead (not sure where this would be installed on other architectures; on my machine I have /lib64/libblkid.so.1 and /usr/lib/libblkid.so.1).

--- a/dev-ruby/facter/facter-3.1.3.ebuild
+++ b/dev-ruby/facter/facter-3.1.3.ebuild
@@ -46,6 +46,7 @@ src_configure() {
                -DCMAKE_INSTALL_SYSCONFDIR=/etc
                -DCMAKE_INSTALL_LOCALSTATEDIR=/var
                -DUSE_JRUBY_SUPPORT=FALSE
+               -DBLKID_LIBRARY=/lib64/libblkid.so.1
        )
        if use debug; then
                mycmakeargs+=(
Comment 1 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-01-05 15:20:56 UTC
can you run this so we can find out what package installed the files?  I only have the one in /lib64.

qfile /usr/lib/libblkid.so.1
qfile /lib64/libblkid.so.1
Comment 2 Georgi Georgiev 2016-01-05 19:08:30 UTC
(In reply to Matthew Thode ( prometheanfire ) from comment #1)
> can you run this so we can find out what package installed the files?  I
> only have the one in /lib64.
> 
> qfile /usr/lib/libblkid.so.1
> qfile /lib64/libblkid.so.1

They are both installed by sys-apps/util-linux, but my profile builds 32-bit binaries, too with abi_x86_32 and abi_x86_64 use flags. I also have SYMLINK_LIB=no, so 32-bit binaries go in /usr/lib and /lib, though apparently not very consistently.

> qfile /usr/lib/libblkid.* /usr/lib64/libblkid.* /lib64/libblkid.*
sys-apps/util-linux (/usr/lib/libblkid.so.1)
sys-apps/util-linux (/usr/lib/libblkid.so)
sys-apps/util-linux (/usr/lib/libblkid.a)
sys-apps/util-linux (/usr/lib/libblkid.so.1.1.0)
sys-apps/util-linux (/usr/lib64/libblkid.a)
sys-apps/util-linux (/usr/lib64/libblkid.so)
sys-apps/util-linux (/lib64/libblkid.so.1)
sys-apps/util-linux (/lib64/libblkid.so.1.1.0)

> cave show util-linux::installed
* sys-apps/util-linux::installed
    ::installed               2.27.1 {:0}
    sys-apps/util-linux-2.27.1:0::installed (system)
    Description               Various useful Linux utilities
    Homepage                  https://www.kernel.org/pub/linux/utils/util-linux/
    From repositories         gentoo gg3-desktop-bin
    Installed time            Fri Dec 18 23:21:29 JST 2015
    Installed using           paludis-2.4.0
    License                   GPL-2 LGPL-2.1 BSD-4 MIT public-domain
    Use flags                 
        USE                   
            (caps)            
            (cramfs)          
            (-fdformat)       
            (-kill)           
            (ncurses)         
            (nls)             
            (pam)             
            (python)          
            (-selinux)        
            (slang)           
            (static-libs)     
            (suid)            
            (systemd)         
            (-tty-helpers)    
            (udev)            
            (unicode)         
            (-test)           
        abi_x86               
            (32)              
            (64)              
            (-x32)            
        python_single_target  
            (python2_7)       
            (-python3_3)      
            (-python3_4)      
        python_targets        
            (python2_7)       
            (-python3_3)      
            (python3_4)       
        Build Options         
            -trace            Trace actions executed by the package (very noisy, for debugging broken builds only)
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-01-05 19:15:52 UTC
maybe this is more of a problem of being inconsistent?
Comment 4 Georgi Georgiev 2016-01-26 16:59:02 UTC
Had to apply the following to 3.1.4 as it is still failing to build the same way:

diff --git a/dev-ruby/facter/facter-3.1.4.ebuild b/dev-ruby/facter/facter-3.1.4.ebuild
index 8034d1e..f0b275b 100644
--- a/dev-ruby/facter/facter-3.1.4.ebuild
+++ b/dev-ruby/facter/facter-3.1.4.ebuild
@@ -47,6 +47,7 @@ src_configure() {
                -DCMAKE_INSTALL_SYSCONFDIR=/etc
                -DCMAKE_INSTALL_LOCALSTATEDIR=/var
                -DUSE_JRUBY_SUPPORT=FALSE
+               -DBLKID_LIBRARY=/$(get_libdir)/libblkid.so.1
        )
        if use debug; then
                mycmakeargs+=(
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2016-01-26 20:07:51 UTC
fixed in 3.1.4-r1