Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 649334 - media-libs/vulkan-loader should depend on x11-proto/randrproto - .../work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/include/vulkan/vulkan.h:6176:10: fatal error: X11/extensions/Xrandr.h: No such file or directory
Summary: media-libs/vulkan-loader should depend on x11-proto/randrproto - .../work/Vul...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-02 09:11 UTC by Georgy Yakovlev
Modified: 2018-03-12 17:41 UTC (History)
0 users

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


Attachments
build.log (build.log,21.17 KB, text/plain)
2018-03-02 09:12 UTC, Georgy Yakovlev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2018-03-02 09:11:15 UTC
vulkan-loader fails to compile, seems it's missing a dep on libXrandr.

Reproducible: Always

Steps to Reproduce:
1. have system without libXrandr installed.
2. try to emerge vulkan-loader
Actual Results:  
cd /var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1-abi_x86_64.amd64/loader && /usr/bin/x86_64-pc-linux-gnu-gcc -DAPI_NAME=\"Vulkan\" -DFALLBACK_CONFIG_DIRS=\"/etc/xdg\" -DFALLBACK_DATA_DIRS=\"/usr/local/share:/usr/share\" -DSYSCONFDIR=\"/etc\" -DVK_USE_PLATFORM_WAYLAND_KHR -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_XLIB_XRANDR_EXT -I/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/include -I/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/loader -I/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1-abi_x86_64.amd64/loader -I/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1-abi_x86_64.amd64   -DNDEBUG -march=native -O2 -pipe -std=c99 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fno-builtin-memcmp -Wimplicit-fallthrough=0 -fvisibility=hidden -Wpointer-arith   -o CMakeFiles/asm_offset.dir/asm_offset.c.o -c /var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/loader/asm_offset.c
In file included from /var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/loader/loader.h:31:0,
                 from /var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/loader/asm_offset.c:24:
/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1/include/vulkan/vulkan.h:6176:10: fatal error: X11/extensions/Xrandr.h: No such file or directory
 #include <X11/extensions/Xrandr.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [loader/CMakeFiles/asm_offset.dir/build.make:63: loader/CMakeFiles/asm_offset.dir/asm_offset.c.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1-abi_x86_64.amd64'
make[1]: *** [CMakeFiles/Makefile2:258: loader/CMakeFiles/asm_offset.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/vulkan-loader-1.0.61.1/work/Vulkan-LoaderAndValidationLayers-sdk-1.0.61.1-abi_x86_64.amd64'
make: *** [Makefile:130: all] Error 2
 * ERROR: media-libs/vulkan-loader-1.0.61.1::gentoo failed (compile phase):
 *   emake failed

Expected Results:  
vulkan-loader compiles
Comment 1 Georgy Yakovlev archtester gentoo-dev 2018-03-02 09:12:15 UTC
Created attachment 521820 [details]
build.log
Comment 2 Georgy Yakovlev archtester gentoo-dev 2018-03-02 09:14:29 UTC
Portage 2.3.24 (python 3.5.4-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-7.3.0, glibc-2.26-r6, 4.15.6-gentoo-retpoline x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.15.6-gentoo-retpoline-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-gentoo-2.4.1
KiB Mem:    65883076 total,  52271332 free
KiB Swap:    8388600 total,   8388600 free
Timestamp of repository gentoo: Wed, 28 Feb 2018 17:47:14 +0000
Head commit of repository gentoo: f9589b6ead03d67ee837563d17380b04b0a52af4

sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p1) 2.30.0
app-shells/bash:          4.4_p19::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16-r1::gentoo
sys-devel/binutils:       2.30::gentoo
sys-devel/gcc:            7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r2::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --jobs=16  --load-average 32"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ http://mirrors.rit.edu/gentoo/ http://cosmos.illinois.edu/pub/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ http://lug.mtu.edu/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j32 -l32"
PKGDIR="/var/cache/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="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv icu idn introspection ipv6 jpeg lcms libnotify libsecret lzma mad mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support readline sdl seccomp spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vaapi vdpau vim-syntax vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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 fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Georgy Yakovlev archtester gentoo-dev 2018-03-02 16:34:11 UTC
I poked around cmake files, looks like if X support  is enabled it wants Xrandr.

elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    if (BUILD_WSI_XCB_SUPPORT)
        add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
    endif()

    if (BUILD_WSI_XLIB_SUPPORT)
       add_definitions(-DVK_USE_PLATFORM_XLIB_KHR -DVK_USE_PLATFORM_XLIB_XRANDR_EXT)
endif()


in the ebuild it's 

multilib_src_configure() {
	local mycmakeargs=(
.....
		-DBUILD_WSI_XCB_SUPPORT=$(usex X)
		-DBUILD_WSI_XLIB_SUPPORT=$(usex X)
	)

I believe adjusting
X? ( x11-libs/libX11:=[${MULTILIB_USEDEP}] )"

to something like

X? ( 
    x11-libs/libX11:=[${MULTILIB_USEDEP}]
    x11-libs/libXrandr:=[${MULTILIB_USEDEP}]
)"


should be what we want.
Comment 4 Larry the Git Cow gentoo-dev 2018-03-12 17:41:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94c586fe56ecaaacb1cf7399e6a5f19bb1c73813

commit 94c586fe56ecaaacb1cf7399e6a5f19bb1c73813
Author:     Georgy Yakovlev <ya@sysdump.net>
AuthorDate: 2018-03-02 16:49:07 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-03-12 17:41:02 +0000

    media-libs/vulkan-loader: fix missing dep on libXrandr
    
    Closes: https://bugs.gentoo.org/649334
    Closes: https://github.com/gentoo/gentoo/pull/7335

 media-libs/vulkan-loader/vulkan-loader-9999.ebuild | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)