Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 828144 - media-libs/opensubdiv-3.4.4-r2 USE=cuda - /usr/include/stdio.h(183): error: attribute "__malloc__" does not take arguments
Summary: media-libs/opensubdiv-3.4.4-r2 USE=cuda - /usr/include/stdio.h(183): error: a...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Adrian
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-04 21:09 UTC by Bernd
Modified: 2021-12-06 07:03 UTC (History)
2 users (show)

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


Attachments
opensubdiv-3.4.4-r2:20211204-130639.log (opensubdiv-3.4.4-r2:20211204-130639.log,263.02 KB, text/plain)
2021-12-04 21:10 UTC, Bernd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2021-12-04 21:09:43 UTC
The build fails with a cuda related error.

#$ cicc --c++17 --gnu_version=110201 --orig_src_file_name "/var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/wor
k/OpenSubdiv-3_4_4/opensubdiv/osd/cudaKernel.cu" --allow_managed   -arch compute_35 -m64 --no-version-ident -f
tz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "tmpxft_000001ca_00000000-3_cudaKernel.fatbin.c" -tu
sed --gen_module_id_file --module_id_file_name "/var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/temp/tmpxft_00
0001ca_00000000-4_cudaKernel.module_id" --gen_c_file_name "/var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/tem
p/tmpxft_000001ca_00000000-6_cudaKernel.cudafe1.c" --stub_file_name "/var/tmp/portage/media-libs/opensubdiv-3.
4.4-r2/temp/tmpxft_000001ca_00000000-6_cudaKernel.cudafe1.stub.c" --gen_device_file_name "/var/tmp/portage/med
ia-libs/opensubdiv-3.4.4-r2/temp/tmpxft_000001ca_00000000-6_cudaKernel.cudafe1.gpu"  "/var/tmp/portage/media-l
ibs/opensubdiv-3.4.4-r2/temp/tmpxft_000001ca_00000000-7_cudaKernel.cpp1.ii" -o "/var/tmp/portage/media-libs/op
ensubdiv-3.4.4-r2/temp/tmpxft_000001ca_00000000-6_cudaKernel.ptx"
/usr/include/stdio.h(183): error: attribute "__malloc__" does not take arguments

The last line repeated 12 more times, then:

13 errors detected in the compilation of "/var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/work/OpenSubdiv-3_4_4/opensubdiv/osd/cudaKernel.cu".
# --error 0x1 --
-- Removing /var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/work/OpenSubdiv-3_4_4_build/opensubdiv/CMakeFiles/osd_dynamic_gpu.dir/osd/./osd_dynamic_gpu_generated_cudaKernel.cu.o
/usr/bin/cmake -E rm -f /var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/work/OpenSubdiv-3_4_4_build/opensubdiv/CMakeFiles/osd_dynamic_gpu.dir/osd/./osd_dynamic_gpu_generated_cudaKernel.cu.o
CMake Error at osd_dynamic_gpu_generated_cudaKernel.cu.o.RelWithDebInfo.cmake:280 (message):
  Error generating file
  /var/tmp/portage/media-libs/opensubdiv-3.4.4-r2/work/OpenSubdiv-3_4_4_build/opensubdiv/CMakeFiles/osd_dynamic_gpu.dir/osd/./osd_dynamic_gpu_generated_cudaKernel.cu.o


make[2]: *** [opensubdiv/CMakeFiles/osd_dynamic_gpu.dir/build.make:84: opensubdiv/CMakeFiles/osd_dynamic_gpu.dir/osd/osd_dynamic_gpu_generated_cudaKernel.cu.o] Error 1


Reproducible: Always




emerge --info opensubdiv:

Portage 3.0.28 (python 3.9.9-final-0, default/linux/amd64/17.1/systemd, gcc-11.2.1, glibc-2.34-r3, 5.15.6-gentoo-0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.6-gentoo-0-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-glibc2.34
KiB Mem:    16292304 total,   2977976 free
KiB Swap:   16777208 total,  14722904 free
Head commit of repository guru: 35c8a0995fde74ddfd92a2d312b85b97ed156cc2

Timestamp of repository sage-on-gentoo: Thu, 04 Nov 2021 23:06:25 +0000
Head commit of repository sage-on-gentoo: 7628ac7bd2c23204690228f6c11ea3eed2581142

Timestamp of repository torbrowser: Mon, 15 Nov 2021 18:36:28 +0000
Head commit of repository torbrowser: ca3bf06665fb5ed0d866fa2ca9c9245290537ff3

Head commit of repository cg: 8ad5fa36dc7a25ea156edf2483c61b52613884c9

Timestamp of repository gamerlay: Thu, 02 Dec 2021 16:51:39 +0000
Head commit of repository gamerlay: 819bea19e7c4b714c8df1cb5836c1e4a272d528a

Timestamp of repository steam-overlay: Tue, 09 Nov 2021 10:53:07 +0000
Head commit of repository steam-overlay: b21d724e69a176a398cae2db70172cb9dfede48a

Head commit of repository qt: 36b75f925c082a01ab9c0d20226bd2c73bcc8a16

Head commit of repository science: 7d85f8b46bafbba14fc9fe866630fc78b6ee5d33

Head commit of repository enlightenment-live: d01b7983447ad1ae544263139d5de54fbdd934ad

Timestamp of repository fem-overlay: Sun, 21 Nov 2021 21:36:36 +0000
Head commit of repository fem-overlay: 807e5dd5df901de9a5b2f8adc53452fd20a98943

Head commit of repository gentoo-git: 17193b1faaf23b13139006c0c758467d640ff240

Head commit of repository waebbl: 5ea1f89f0097fcf431fc3c8f8437a28916c4c882

Timestamp of repository gentoo: Sat, 04 Dec 2021 10:36:39 +0000
Head commit of repository gentoo: 8dd2aad836afbd5d6bce81cce3970ce1cdecebd7

sh bash 5.1_p12
ld GNU ld (Gentoo 2.37_p1 p1) 2.37
app-shells/bash:          5.1_p12::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r5::gentoo
dev-lang/python:          2.7.18_p13::gentoo, 3.9.9::gentoo, 3.10.0_p1::gentoo
dev-lang/rust-bin:        1.56.1::gentoo
dev-util/cmake:           3.22.0::gentoo
sys-apps/baselayout:      2.8::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-r1::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo, 11.2.1_p20211127::gentoo
sys-devel/gcc-config:     2.5-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.15-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.34-r3::gentoo
Repositories:

guru
    location: /mnt/data/code/github/portage-overlays/guru
    sync-type: git
    sync-uri: git@git.gentoo.org:repo/proj/guru.git
    masters: gentoo
    priority: -1000

sage-on-gentoo
    location: /mnt/data/code/github/portage-overlays/sage-on-gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/sage-on-gentoo.git
    masters: gentoo

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

cg
    location: /mnt/data/code/github/portage-overlays/cg
    sync-type: git
    sync-uri: https://github.com/waebbl/cg.git
    masters: gentoo
    priority: 30

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

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    priority: 50

qt
    location: /mnt/data/code/github/portage-overlays/qt
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/qt.git
    masters: gentoo
    priority: 60

science
    location: /mnt/data/code/github/portage-overlays/sci
    sync-type: git
    sync-uri: git://github.com/waebbl/sci.git
    masters: gentoo
    priority: 60

enlightenment-live
    location: /mnt/data/code/github/portage-overlays/enlightenment-live
    sync-type: git
    sync-uri: git://github.com/waebbl/enlightenment-live.git
    masters: gentoo
    priority: 61

fem-overlay
    location: /var/db/repos/fem-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/fem-overlay.git
    masters: gentoo
    priority: 70

gentoo-git
    location: /mnt/data/code/github/portage-overlays/gentoo-git
    sync-type: git
    sync-uri: https://github.com/waebbl/gentoo.git
    masters: gentoo
    priority: 99

waebbl
    location: /mnt/data/code/github/portage-overlays/waebbl
    sync-type: git
    sync-uri: https://github.com/waebbl/waebbl-gentoo.git
    masters: gentoo
    priority: 99

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

Installed sets: @3D, @XWindow, @adm-tools, @android, @base, @benchmarking, @bgeedeps, @desktop, @dev-tools, @doc-tools, @docs, @emacs, @fonts, @fun, @games, @infinity, @kde, @keep, @kernel-dep, @langs, @lxqt-live, @media, @my_latex, @netz, @nvidia, @office, @python, @qt, @sci, @sec, @server, @steam, @themes, @vcs, @virt, @xfce, @zip
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=bdver2 -frecord-gcc-switches -fstack-protector-strong -fstack-check"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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="-O2 -pipe -march=bdver2 -frecord-gcc-switches -fstack-protector-strong -fstack-check"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--complete-graph --keep-going --fail-clean --buildpkg --usepkg --buildpkg-exclude='x11-drivers/nvidia-drivers virtual/* acct-user/* acct-group/* app-eselect/*' --autounmask=n --binpkg-respect-use=y --binpkg-changed-deps=y"
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="-O2 -pipe -march=bdver2 -frecord-gcc-switches -fstack-protector-strong -fstack-check"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildsyspkg cgroup clean-logs config-protect-if-modified distlocks downgrade-backup ebuild-locks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign split-elog split-log strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=bdver2 -frecord-gcc-switches -fstack-protector-strong -fstack-check"
GENTOO_MIRRORS="https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/    https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/   https://mirror.netcologne.de/gentoo/    https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/"
INSTALL_MASK="/usr/share/locale -/usr/share/locale/de* -/usr/share/locale/en*"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
MAKEOPTS="-j2"
PKGDIR="/mnt/data/cache/binpkgs/desktop"
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 acl alsa amd64 branding bzip2 cli crypt dbus dri egl fortran gdbm gif gnome iconv ipv6 jpeg jpeg2k kde libglvnd libinput libtirpc multilib ncurses networkmanager nls nptl offensive ogg opengl openmp pam pcre pic png policykit postgres pulseaudio python qt5 readline seccomp sound split-usr ssl svg systemd tga theora threads tiff udev unicode vorbis wayland wifi x264 x265 xattr xpm zlib" ABI_X86="64" ADA_TARGET="gnat_2020" 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="karbon sheets words" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx f16c fma3 fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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" GRUB_PLATFORMS="pc multiboot qemu" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="de de-DE en en-GB en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LLVM_TARGETS="NVPTX WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" NGINX_MODULES_HTTP="access addition auth_basic auth_pam autoindex browser cache_purge charset dav dav_ext echo empty_gif fancyindex fastcgi flv geo geoip2 gunzip gzip headers_more image_filter javascript limit_conn limit_req map memc memcached metrics mp4 naxsi proxy push_stream realip referer rewrite scgi secure_link slowfs_cache split_clients ssi sticky stub_status sub upload_progress userid uwsgi xslt" NGINX_MODULES_STREAM="access geo geoip2 javascript limit_conn map return split_clients" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 sparc sparc64 x86_64" QEMU_USER_TARGETS="aarch64 aarch64_be arm armeb i386 sparc sparc32plus sparc64 x86_64" RUBY_TARGETS="ruby26 ruby27" STEAMGAMES="witcher2" USERLAND="GNU" VIDEO_CARDS="dummy fbdev nvidia vesa" 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:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

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

media-libs/opensubdiv-3.4.4-r1::waebbl was built with the following:
USE="cuda opencl openmp ptex tbb -examples -test -tutorials" ABI_X86="(64)"
FEATURES="usersync cgroup news assume-digests buildsyspkg split-log sfperms ebuild-locks xattr parallel-fetch multilib-strict downgrade-backup binpkg-multi-instance protect-owned userfetch qa-unresolved-soname-deps buildpkg binpkg-dostrip fail-clean usersandbox merge-sync ipc-sandbox unknown-features-warn strict-keepdir network-sandbox config-protect-if-modified binpkg-logs strict userpriv unmerge-orphans sandbox split-elog clean-logs distlocks unmerge-logs fixlafiles pid-sandbox preserve-libs binpkg-docompress sign"

emerge -pqv opensubdiv:
[ebuild     U ] media-libs/opensubdiv-3.4.4-r2 [3.4.4-r1] USE="cuda opencl openmp ptex tbb -examples -test -tutorials"
Comment 1 Bernd 2021-12-04 21:10:57 UTC
Created attachment 757443 [details]
opensubdiv-3.4.4-r2:20211204-130639.log

build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-04 21:11:36 UTC
I think this is glibc-2.34 related. I thought it'd been fixed with the newer CUDA updates recently though...
Comment 3 Bernd 2021-12-04 21:13:32 UTC
Might be, I have glibc-2.34 installed actually, without the clone3 USE flag being set, because of some binary electron apps, I think.
Comment 4 Bernd 2021-12-04 21:14:29 UTC
I will test again, when I updated cuda to 11.5 tomorrow, maybe it's fixed there.
Comment 5 Bernd 2021-12-04 21:16:54 UTC
But I do have an opensubdiv, updated from the -r1 from ::gentoo at early November, which build successfully then. Haven't tested though if it still builds. My update of glibc was at the end of November.
Comment 6 Ionen Wolkens gentoo-dev 2021-12-05 05:42:13 UTC
The __malloc__ happened with every packages using nvcc if used some common headers like <stdio.h> combined with gcc11 and glibc-2.34 (gcc10, clang, and/or glibc-2.33 were not affected.

Couldn't even compile a hello world and such, so of course big packages like this would fail as well.

commit fb1cbae4ff83bc89bdd629c8ef90d405a6a56fd7
Author: David Seifert <soap@gentoo.org>
Date:   Fri Nov 26 21:16:48 2021 +0100

    dev-util/nvidia-cuda-toolkit: add 11.5.1
    
    * fixes issues with glibc 2.34:
      https://forums.developer.nvidia.com/t/cuda-11-5-samples-throw-multiple-error-attribute-malloc-does-not-take-arguments/192750
Comment 7 Ionen Wolkens gentoo-dev 2021-12-05 05:50:22 UTC
And cuda10 isn't affected given it can't use gcc11 either way (gcc8+glibc-2.34 doesn't trigger __malloc__ issues)

So I think this can be marked obsolete.
Comment 8 Bernd 2021-12-05 07:46:50 UTC
I understand. Using cuda-11.4, glibc-2.34 and gcc-11 here, so this combination triggers the issue.

Thanks for the feedback.
Comment 9 Ionen Wolkens gentoo-dev 2021-12-05 08:03:18 UTC
(In reply to Bernd from comment #8)
> I understand. Using cuda-11.4, glibc-2.34 and gcc-11 here, so this
> combination triggers the issue.
Yeah, now that cuda 11.5 restrictions were lowered hopefully 11.4 won't serve much of a purpose and just be due for cleanup.
Comment 10 Bernd 2021-12-06 07:03:42 UTC
It builds successfully using gcc-11 and cuda-11.5.1-r1