Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 612258 - dev-libs/libclc-0.2.0_pre20160209 fails to build - ./ptx-nvidiacl/lib/workitem/get_group_id.cl:5:19: error: use of unknown builtin '__builtin_ptx_read_ctaid_x' [-Wimplicit-function-declaration]
Summary: dev-libs/libclc-0.2.0_pre20160209 fails to build - ./ptx-nvidiacl/lib/workite...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 614476 618928 (view as bug list)
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2017-03-10 21:53 UTC by Graham Young
Modified: 2019-07-14 12:51 UTC (History)
10 users (show)

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


Attachments
result of broken off compilation (failed-compile.txt,4.73 KB, text/plain)
2017-03-10 21:53 UTC, Graham Young
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Young 2017-03-10 21:53:09 UTC
Created attachment 466628 [details]
result of broken off compilation

Portage 2.3.3 (python 3.4.5-final-0, default/linux/amd64/13.0/systemd, gcc-4.9.4, glibc-2.23-r3, 4.9.6-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.6-gentoo-r1-x86_64-AMD_Athlon-tm-_II_X2_270_Processor-with-gentoo-2.3
KiB Mem:     6096756 total,   3280676 free
KiB Swap:    1535996 total,   1442432 free
Timestamp of repository gentoo: Fri, 10 Mar 2017 20:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
Followning from computer "info"
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y"
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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.qubenet.net/mirror/gentoo/  http://mirror.qubenet.net/mirror/gentoo/ rsync://rsync.mirrorservice.org/www.ibiblio.org/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
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="/var/tmp"
USE="3dnow 3dnowext 3dnowprefetch X \ aac acl alsa amd64 av avi berkdb bluetooth bzip2 cairo cdrom cli cracklib crypt cxx dbus divx dri dv dvb dvd egl encode exif extras ffmpeg firewire flac flash flv fontconfig fortran gbm gdbm gif gimp glamor graphics_card_amdgpu gstreamer gui html5 httpd iconv iee1394 imagemagick iplayer ipv6 jack java jpeg lame libass lirc lua mad mkv mmx mmxext modules mp2 mp3 mp4 mpeg mpg multilib ncurses nfs nls nptl ogg opengl openmp pam pcre pdf perl png popcnt python qt3support readline scanner sdl seccomp session sse sse2 sse4a ssl systemd tcpd theora threads tiff truetype ts udev udisks unicode usb v4l2 vaapi vdpau video-cards_radeonsi vorbis wayland x264 x265 xattr xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="C-Media CMI8x38 PCI" APACHE2_MODULES="cgid mime dir authz_host" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext 3dnowprefetch mmx mmxext popcnt sse sse2 sse4a" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="uc-logic_tablet logitech_C170_webcam keyboard evdev kbd v4l2 mouse" KERNEL="linux" L10N="en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" SANE_BACKENDS="mustek_usb2" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XFCE_PLUGINS="menu" 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, USE_PYTHON

info.txt lines 22-60/60 (END)
Comment 1 Martin McClure 2017-04-18 20:41:26 UTC
I am seeing an almost-identical set of errors on a current stable AMD64 system with GCC 5.4.0.
Comment 2 Michael Jones 2017-04-19 15:26:56 UTC
Same, 3 different machines, roughly speaking the same set of errors, encountered when updating to gcc 5.4.0
Comment 3 Oleg 2017-04-20 19:56:00 UTC
Same bug. gcc-5.4.0-r3
Comment 4 Peer 2017-04-22 17:51:09 UTC
Same here x86_64 kernel 4.9.16 - newly migrated to gcc 5.4.0.
Although the package is compiled with clang.
Comment 5 Emanuel Eriksson 2017-04-23 09:29:21 UTC
I am also getting this error on AMD64 and GCC 5.4.0-r3.
Seems to be fixed in dev-libs/libclc-0.2.0_pre20160921 though, because I can compile that without errors.
Comment 6 Laszlo Valko 2017-04-23 17:56:00 UTC
According to this:
https://github.com/voidlinux/void-packages/issues/4721
later versions should compile ok.

I tested with dev-libs/libclc-0.2.0_pre20160921, and it actually works. Since 0.2.0_pre20160209 is the latest stable, and it currently does not compile within the "latest stable" environment, I suggest to stabilize a newer release which does compile (eg: 0.2.0_pre20160921).
Comment 7 Graham Young 2017-04-24 16:53:55 UTC
If it helps to get moving on:--I masked the program and keyworded version *-0.2.0-pre20160921 which compliled OK
Comment 8 Jeff 2017-05-08 07:53:23 UTC
I agree with Lazlo's comments in "comment #6" regarding standardizing on the build version that he says works for him.

I have also tried that build as part of assembling a Gentoo-based "zoneminder" server. It got me past unresolved issues compiling "libclc" that prevented "zoneminder" from building for my specific setup.
Comment 9 ernsteiswuerfel archtester 2017-05-26 19:56:48 UTC
Same bug here with gcc 6.3.

I wonder how I got this built before... This system has been running on 5.x. for quite a while.

Like Emanuel said in comment #5 dev-libs/libclc-0.2.0_pre20160921 works.
Comment 10 Jan Vesely 2017-09-04 22:27:21 UTC
This has nothing to do with GCC version. libclc is always compiled using llvm/clang.

The ptx builtin names were changed in in clang r274770 (present in latest 3.9, 4.0, and 5.0).
you need libclc version that includes 3d39fb557be2e349ded2d2055211b2757627f40b ("ptx: Fix builtin names after clang r274770") in order to compile.
Comment 11 Matt Turner gentoo-dev 2017-09-04 22:54:12 UTC
(In reply to Jan Vesely from comment #10)
> This has nothing to do with GCC version. libclc is always compiled using
> llvm/clang.
> 
> The ptx builtin names were changed in in clang r274770 (present in latest
> 3.9, 4.0, and 5.0).
> you need libclc version that includes
> 3d39fb557be2e349ded2d2055211b2757627f40b ("ptx: Fix builtin names after
> clang r274770") in order to compile.

Thanks for the clarification Jan.

I'm maintaining Mesa by myself these days, and I don't have the hardware, time, or energy to maintain the OpenCL bits. Would you be interested in taking those portions (dev-libs/libclc most notably) on as a maintainer by proxy? I'd be happy to get something in tree that works. Pull requests on GitHub are easiest, but bugs with patches are most welcome as well.

I've been thinking of package.use.mask'ing Mesa's opencl USE flag and package.masking dev-libs/libclc unless someone can maintain it...
Comment 12 Jan Vesely 2017-09-08 06:22:38 UTC
(In reply to Matt Turner from comment #11)
> (In reply to Jan Vesely from comment #10)
> > This has nothing to do with GCC version. libclc is always compiled using
> > llvm/clang.
> > 
> > The ptx builtin names were changed in in clang r274770 (present in latest
> > 3.9, 4.0, and 5.0).
> > you need libclc version that includes
> > 3d39fb557be2e349ded2d2055211b2757627f40b ("ptx: Fix builtin names after
> > clang r274770") in order to compile.
> 
> Thanks for the clarification Jan.
> 
> I'm maintaining Mesa by myself these days, and I don't have the hardware,
> time, or energy to maintain the OpenCL bits. Would you be interested in
> taking those portions (dev-libs/libclc most notably) on as a maintainer by
> proxy? I'd be happy to get something in tree that works. Pull requests on
> GitHub are easiest, but bugs with patches are most welcome as well.
> 
> I've been thinking of package.use.mask'ing Mesa's opencl USE flag and
> package.masking dev-libs/libclc unless someone can maintain it...

I can try, but I'm not sure if I'm the right person for this. I don't know much about ebuilds, and I don't have a gentoo box that could use mesa opencl.

FWIW, the last commit that worked with llvm-3.9 is r282106.
starting from r309820 the build script works with python3.
other than that, latest master is always the best bet and it should work with llvm-4,5,6.
NVPTX/NVVM isn't really that useful, you can probably use it with clang to have OCL wrapper around CUDA, but I don't think anyone does that, at least not using the upstream componenets.
clover GCN needs libclc: amgcn-mesa-mesa3d if (LLVM >=4 && mesa>=13.0) else amdgcn--
clover r600 needs libclc: r600--
Comment 13 Larry the Git Cow gentoo-dev 2017-09-08 12:38:38 UTC
Bug has been referenced in the following commit:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87929d9f6bfe62770cb13547583425e6f2755a59

commit 87929d9f6bfe62770cb13547583425e6f2755a59
Author:     Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
AuthorDate: 2017-09-08 12:38:21 +0000
Commit:     Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
CommitDate: 2017-09-08 12:38:21 +0000

    dev-libs/libclc: depend on compatible llvm versions
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=612258
    
    Package-Manager: Portage-2.3.6, Repoman-2.3.1

 dev-libs/libclc/libclc-0.2.0_pre20160209.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Comment 14 Chí-Thanh Christopher Nguyễn gentoo-dev 2017-09-08 12:40:55 UTC
The commit which fixes the compile failure is present in 0.2.0_pre20160921 and later. The dependencies on 0.2.0_pre20160209 have been updated. Marking this bug as fixed.
Comment 15 Chí-Thanh Christopher Nguyễn gentoo-dev 2017-09-08 12:44:15 UTC
*** Bug 618928 has been marked as a duplicate of this bug. ***
Comment 16 Chí-Thanh Christopher Nguyễn gentoo-dev 2017-09-08 12:44:22 UTC
*** Bug 614476 has been marked as a duplicate of this bug. ***