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

Bug 555012

Summary: =media-libs/x265-1.8-r2 keyword request
Product: Gentoo Linux Reporter: James Lee <jlee>
Component: [OLD] Keywording and StabilizationAssignee: Gentoo Media-video project <media-video>
Status: RESOLVED FIXED    
Severity: normal CC: axs
Priority: Normal Keywords: KEYWORDREQ
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: was: media-libs/x265 has automagic dependency on sys-process/numactl
Package list:
Runtime testing required: ---

Description James Lee 2015-07-15 20:48:01 UTC
numactl provides libnuma, which is automatically detected and linked into libx265 when it is installed.  You can see the detection in libx265's CMakeLists.txt:

    find_package(Numa)
    if(NUMA_FOUND)
        link_directories(${NUMA_LIBRARY_DIR})
        list(APPEND CMAKE_REQUIRED_LIBRARIES numa)
        check_symbol_exists(numa_node_of_cpu numa.h NUMA_V2)
        if(NUMA_V2)
            add_definitions(-DHAVE_LIBNUMA)
            message(STATUS "libnuma found, building with support for NUMA nodes")
            list(APPEND PLATFORM_LIBS numa)
            include_directories(${NUMA_INCLUDE_DIR})
        endif()
    endif()
    mark_as_advanced(LIBRT NUMA_FOUND)

The result is that when the resulting libx265 binary package is installed on another system without libnuma, the libx265 library is broken:

    > ldd /usr/lib64/libx265.so.59
        linux-vdso.so.1 (0x00007ffdae4bb000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc2ec89c000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fc2ec698000)
        libnuma.so.1 => not found
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libstdc++.so.6 (0x00007fc2ec38c000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fc2ec08b000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc2ebcf5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc2ececb000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libgcc_s.so.1 (0x00007fc2ebade000)

media-libs/x265 should depend on sys-process/numactl or a use flag should be added to the media-libs/x265 ebuild to toggle the numa detection and dependency.
Comment 1 Ian Stakenvicius (RETIRED) gentoo-dev 2015-09-10 15:25:50 UTC
I'll confirm this.  Note that media-libs/x265 also triggers @preserved-libs behaviour on libnuma.so.1
Comment 2 Alexis Ballier gentoo-dev 2015-10-15 14:42:15 UTC
fixed in 1.8-r1; had to drop hppa keywords

@hppa: please rekeyword it after either keywording numactl or masking numa useflag
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2015-10-16 05:17:51 UTC
Masked USE=numa, marked ~hppa.