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

Bug 835659

Summary: sci-libs/vtk-9.*[cuda] fails to configure: CMake Error at ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake:224 (message): Error detecting architecture flags for CUDA. Please set VTKm_CUDA_Architecture manually.
Product: Gentoo Linux Reporter: Miroslav Šulc <fordfrog>
Component: Current packagesAssignee: Bernd <waebbl-gentoo>
Status: RESOLVED FIXED    
Severity: normal CC: bugzilla, dan, egor-gl, fgroups, ilovekiruna, kkrizka, leonchik1976, proxy-maint, sci
Priority: Normal Keywords: PullRequest, UPSTREAM
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://gitlab.kitware.com/vtk/vtk-m/-/issues/693
See Also: https://gitlab.kitware.com/vtk/vtk-m/-/issues/693
https://github.com/gentoo/gentoo/pull/29200
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Miroslav Šulc gentoo-dev 2022-03-20 13:18:52 UTC
Created attachment 767443 [details]
build.log

CMake Error at ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmDeviceAdapters.cmake:224 (message):
  Error detecting architecture flags for CUDA.  Please set
  VTKm_CUDA_Architecture manually.
Call Stack (most recent call first):
  ThirdParty/vtkm/vtkvtkm/vtk-m/CMake/VTKmWrappers.cmake:13 (include)
  ThirdParty/vtkm/vtkvtkm/vtk-m/CMakeLists.txt:148 (include)


# emerge --info '=sci-libs/vtk-9.0.3-r4::gentoo'
Portage 3.0.30 (python 3.9.11-final-0, default/linux/amd64/17.1/hardened, gcc-11.2.1, glibc-2.34-r10, 5.16.16-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.16.16-gentoo-x86_64-Intel-R-_Core-TM-_i7-10875H_CPU_@_2.30GHz-with-glibc2.34
KiB Mem:    32652772 total,   5811808 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sun, 20 Mar 2022 10:00:01 +0000
Head commit of repository gentoo: 1eba47e37b1652288e36eead49460ad997b728b4
sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.8.13::gentoo, 3.9.11::gentoo, 3.10.3::gentoo
dev-lang/rust:             1.59.0::gentoo
dev-util/cmake:            3.22.3::gentoo
dev-util/meson:            0.61.3::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo, 2.38-r1::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo
sys-devel/gcc:             11.2.1_p20220115::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.1::gentoo
sys-devel/llvm:            13.0.1::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.16::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r10::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

brother-overlay
    location: /var/lib/layman/brother-overlay
    masters: gentoo
    priority: 50

ceamac
    location: /var/lib/layman/ceamac
    masters: gentoo
    priority: 50

flavour
    location: /var/lib/layman/flavour
    masters: gentoo
    priority: 50

fordfrog
    location: /var/lib/layman/fordfrog
    masters: gentoo
    priority: 50

waebbl
    location: /var/lib/layman/waebbl
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/brother/scanner/brscan4/brsanenetdevice4.cfg /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.8/conf"
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 -frecord-gcc-switches"
DISTDIR="/var/db/repos/gentoo/distfiles"
EMERGE_DEFAULT_OPTS="--misspell-suggestions n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="cs_CZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="cs cs_CZ en en_US en_UK"
MAKEOPTS="-j17"
PKGDIR="/var/db/repos/gentoo/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"
SHELL="/bin/bash"
USE="X a52 aac aacplus acl alsa amd64 aubio bluetooth bzip2 cdda cddb cdr color-management colord crypt cuda cups dbus dia dssi dvb dvd elogind exif ffmpeg flac gegl gif gphoto2 gsm gtk gtk3 hardened hddtemp http2 ibus iconv icu id3tag ipv6 jack jack-dbus jacksession javafx jpeg ladspa lastfm latex lcms libass libglvnd libnotify libproxy libsamplerate libtirpc lilypond lm-sensors lv2 mad modplug mp3 mpeg mpi mtp multilib musepack ncurses nls nptl ocr ogg openexr opengl openmp opus osc pam pcre pdf pie png policykit pulseaudio qt5 raw readline rubberband samba scanner screencast seccomp sf2 sndfile soundio speex spell split-usr ssl ssp startup-notification svg svg2 taglib theora tiff timidity tk tray truetype udev unicode usb vamp visio vorbis vpx vst vulkan wavpack webp widevine wmf x264 x265 xattr xinerama xmp xtpax xv xvid zlib" ABI_X86="32 64" ADA_TARGET="gnat_2020" APACHE2_MODULES="alias auth_basic authn_core authn_file authz_core authz_host authz_user cgi cgid deflate dir expires filter headers http2 include info log_config mime mime_magic negotiation proxy proxy_ajp rewrite setenvif socache_shmcb status unixd vhost_alias" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev libinput synaptics wacom" KERNEL="linux" L10N="cs cs-CZ en en-US en-UK" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="NVPTX" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_6 python3_7 python3_8 python3_9" RUBY_TARGETS="ruby26 ruby27 ruby30" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

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

sci-libs/vtk-9.0.3-r4::gentoo was built with the following:
USE="X boost ffmpeg json mpi openmp python qt5 rendering theora tk -all-modules -cuda -doc -examples -gdal -imaging -java -kits -mysql -odbc -offscreen -pegtl -postgres -tbb -test -views -web" ABI_X86="(64)" PYTHON_SINGLE_TARGET="python3_9 -python3_8" VIDEO_CARDS="nvidia"
FEATURES="xattr userpriv binpkg-multi-instance unknown-features-warn protect-owned distlocks config-protect-if-modified ipc-sandbox parallel-fetch userfetch pid-sandbox unmerge-logs assume-digests usersandbox merge-sync multilib-strict unmerge-orphans fixlafiles sfperms preserve-libs binpkg-dostrip network-sandbox usersync binpkg-docompress qa-unresolved-soname-deps news sandbox ebuild-locks binpkg-logs strict buildpkg-live"


# emerge -pqv '=sci-libs/vtk-9.0.3-r4::gentoo'
[ebuild   R   ] sci-libs/vtk-9.0.3-r4  USE="X boost cuda* ffmpeg json mpi openmp python qt5 rendering theora tk -all-modules -doc -examples -gdal -imaging -java -kits -mysql -odbc -offscreen -pegtl -postgres -tbb -test -views -web" PYTHON_SINGLE_TARGET="python3_9 -python3_8" VIDEO_CARDS="nvidia"
Comment 1 Bernd 2022-03-20 21:54:26 UTC
Thanks for the report Miroslav.

 * If auto detection fails for you, please try and export the
 * VTK_CUDA_ARCH environment variable to one of the common arch
 * names: kepler, maxwell, pascal, volta, turing, ampere or all.
 * Using CUDA architecture 'native'

Could you try, whether setting the proper architecture in make.conf or your environment workds?
Comment 2 Miroslav Šulc gentoo-dev 2022-03-20 22:25:29 UTC
i tried your suggestion, and as i have this card:

01:00.0 VGA compatible controller: NVIDIA Corporation TU104M [GeForce RTX 2080 SUPER Mobile / Max-Q] (rev a1)

i set it to:

VTK_CUDA_ARCH="turing"

it configured fine, but the compilation failed:

/var/tmp/portage/sci-libs/vtk-9.0.3-r4/work/VTK-9.0.3/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/brigand.hpp:1061:131: error: expected class-name before ‘{’ token
 1061 |         struct find<true, false, L1, L2, Ls...> : find<true, F<Ts..., L2>::value, L2, Ls...>
      |                                                                                                                                   ^
/var/tmp/portage/sci-libs/vtk-9.0.3-r4/work/VTK-9.0.3/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/internal/brigand.hpp:1067:160: error: expected class-name before ‘{’ token
 1067 |         struct find<false, false, L0, L1, L2, L3, L4, L5, L6, L7, L8, Ls...>

which i guess is a bug #820593
Comment 3 Bernd 2022-03-22 07:26:31 UTC
So it seems, their autodetection isn't working properly.
The bug you encounter without autodetection is correct.
Comment 4 Leonid Kopylov 2022-09-27 15:34:12 UTC
just hit the same issue
Comment 5 Larry the Git Cow gentoo-dev 2022-12-12 06:09:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=588025882a58b613f5ef08e02b96efbb7d4c7445

commit 588025882a58b613f5ef08e02b96efbb7d4c7445
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2022-09-29 05:18:39 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-12-12 06:08:29 +0000

    sci-libs/vtk: add 9.2.2
    
    - add a new function to check memory and disk space requirements
    - don't drop bundled external libraries, it's only a few MB which are freed
            through this and upstream does a good job to avoid automagic deps
    - request more modules to build explicitly depending on USE flag settings
    - don't export CC and friends with USE=mpi, package builds fine with gcc and still
            links to MPI libraries
    - add USE flag to build vtk-m optional
    
    Bug: https://bugs.gentoo.org/793221
    Bug: https://bugs.gentoo.org/835659
    Bug: https://bugs.gentoo.org/880759
    Closes: https://bugs.gentoo.org/820593
    Closes: https://bugs.gentoo.org/827310
    Closes: https://bugs.gentoo.org/846374
    Closes: https://bugs.gentoo.org/874798
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/28250
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 sci-libs/vtk/Manifest                              |   6 +
 .../vtk-9.2.2-VTKm-respect-user-CXXFLAGS.patch     |  81 +++
 ...9.2.2-link-with-glut-library-for-freeglut.patch |  18 +
 ...metryFilter-add-missing-mutex-header-file.patch |  20 +
 sci-libs/vtk/metadata.xml                          |  11 +-
 sci-libs/vtk/vtk-9.2.2.ebuild                      | 728 +++++++++++++++++++++
 6 files changed, 863 insertions(+), 1 deletion(-)
Comment 6 Bernd 2023-01-22 09:29:07 UTC
Until this is fixed upstream, I will drop the native arch from the code and error out if VTK_CUDA_ARCH is not set.
Comment 7 Bernd 2023-01-22 09:29:28 UTC
*** Bug 891597 has been marked as a duplicate of this bug. ***
Comment 8 Larry the Git Cow gentoo-dev 2023-01-23 09:36:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e4ccd369ca6972fe56b606d3e3885249a1d4362

commit 2e4ccd369ca6972fe56b606d3e3885249a1d4362
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2023-01-22 09:46:06 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2023-01-23 09:32:37 +0000

    sci-libs/vtk: drop native CUDA arch
    
    Backport from 9.2.5, until detection is fixed upstream, don't allow the use of
    VTK_CUDA_ARCH=native.
    
    Bug: https://bugs.gentoo.org/835659
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Closes: https://github.com/gentoo/gentoo/pull/29200
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 sci-libs/vtk/vtk-9.0.3-r7.ebuild | 12 ++++++++++++
 sci-libs/vtk/vtk-9.1.0-r6.ebuild | 12 ++++++++++++
 sci-libs/vtk/vtk-9.2.2-r1.ebuild | 32 ++++++++++++++++++++++++++------
 3 files changed, 50 insertions(+), 6 deletions(-)

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

commit bacca5d7ff16b9a1b280edb47ed6b57dc09c2913
Author:     Bernd Waibel <waebbl-gentoo@posteo.net>
AuthorDate: 2023-01-21 09:31:32 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan@gentoo.org>
CommitDate: 2023-01-23 09:32:13 +0000

    sci-libs/vtk: add 9.2.5
    
    - Add Python 3.11 support.
    - Simplifiy test logic. The VTK_FORBID_DOWNLOADS option now also works
      when testing is enabled, if all data files are downloaded and
      regenerated before testing.
    - Drop native CUDA arch as long as detection isn't fixed upstream.
    
    Bug: https://gitlab.kitware.com/vtk/vtk-m/issues/693
    Bug: https://bugs.gentoo.org/835659
    Closes: https://bugs.gentoo.org/890269
    Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
    Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

 sci-libs/vtk/Manifest         |   6 +
 sci-libs/vtk/vtk-9.2.5.ebuild | 743 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 749 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2024-01-10 12:41:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0167fc77186716079471d895b32b2283ca8b7fc4

commit 0167fc77186716079471d895b32b2283ca8b7fc4
Author:     Paul Zander <negril.nx+gentoo@gmail.com>
AuthorDate: 2023-07-06 14:26:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-10 12:41:01 +0000

    sci-libs/vtk: add 9.3.0
    
    Closes: https://bugs.gentoo.org/918898
    Closes: https://bugs.gentoo.org/909520
    Closes: https://bugs.gentoo.org/909380
    Closes: https://bugs.gentoo.org/908874
    Closes: https://bugs.gentoo.org/906264
    Closes: https://bugs.gentoo.org/906075
    Closes: https://bugs.gentoo.org/887505
    Closes: https://bugs.gentoo.org/840776
    Closes: https://bugs.gentoo.org/835659
    
    Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/34432
    Signed-off-by: Sam James <sam@gentoo.org>

 sci-libs/vtk/Manifest                              |   6 +
 sci-libs/vtk/files/vtk-9.2.5-pegtl-3.x.patch       | 136 +++
 ...ix-Java-error-with-integer-enum-overloads.patch |  51 ++
 sci-libs/vtk/files/vtk-9.3.0-java.patch            |  11 +
 sci-libs/vtk/files/vtk-9.3.0-opencascade.patch     |  17 +
 sci-libs/vtk/files/vtk-9.3.0-pdal-2.6.0.patch      |  77 ++
 .../vtk-9.3.0-too-many-initializer-values.patch    |  20 +
 sci-libs/vtk/metadata.xml                          |   1 +
 sci-libs/vtk/vtk-9.3.0.ebuild                      | 909 +++++++++++++++++++++
 9 files changed, 1228 insertions(+)