Opened 6 weeks ago

Closed 6 weeks ago

Last modified 6 weeks ago

#6648 closed defect (invalid)

Compile error with glibc 2.26

Reported by: bermond Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: glibc
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Compiling with the newly released gblic 2.26 gives me the following error:

CC      libavfilter/vf_sab.o
CC      libavfilter/vf_scale.o
CC      libavfilter/vf_scale_cuda.o
NVCC    libavfilter/vf_scale_cuda.ptx
CC      libavfilter/vf_scale_npp.o
/usr/include/bits/floatn.h(61): error: invalid argument to attribute "__mode__"

/usr/include/bits/floatn.h(73): error: identifier "__float128" is undefined

CC      libavfilter/vf_scale_qsv.o
CC      libavfilter/vf_scale_vaapi.o
2 errors detected in the compilation of "/tmp/tmpxft_000034b7_00000000-7_vf_scale_cuda.cpp1.ii".
make: *** [ffbuild/common.mak:95: libavfilter/vf_scale_cuda.ptx] Error 2
make: *** Waiting for unfinished jobs....
libavfilter/vf_paletteuse.c: In function ‘load_apply_palette’:
libavfilter/vf_paletteuse.c:970:14: warning: ‘main’ is usually a function [-Wmain]
     AVFrame *main, *second, *out;
              ^~~~

How to reproduce:

$ ./configure \
        --prefix='/usr' \
        --extra-cflags='-I/opt/cuda/include' \
        --extra-ldflags='-L/opt/cuda/lib64 -Wl,-rpath -Wl,/opt/intel/mediasdk/lib64' \
        \
        --cpu='native' \
        \
        --enable-rpath \
        --enable-gpl \
        --enable-version3 \
        --enable-nonfree \
        --enable-shared \
        --disable-static \
        --enable-gray \
        --enable-avresample \
        \
        --enable-alsa \
        --enable-avisynth \
        --enable-bzlib \
        --enable-chromaprint \
        --enable-frei0r \
        --enable-gcrypt \
        --enable-gmp \
        --enable-gnutls \
        --enable-iconv \
        --enable-jack \
        --enable-ladspa \
        --enable-libass \
        --enable-libbluray \
        --enable-libbs2b \
        --enable-libcaca \
        --enable-libcelt \
        --enable-libcdio \
        --enable-libdc1394 \
        --enable-libfdk-aac \
        --enable-libflite \
        --enable-fontconfig \
        --enable-libfreetype \
        --enable-libfribidi \
        --enable-libgme \
        --enable-libgsm \
        --enable-libiec61883 \
        --enable-libilbc \
        --enable-libkvazaar \
        --enable-libmodplug \
        --enable-libmp3lame \
        --enable-libopencore-amrnb \
        --enable-libopencore-amrwb \
        --enable-libopencv \
        --enable-libopenh264 \
        --enable-libopenjpeg \
        --enable-libopenmpt \
        --enable-libopus \
        --enable-libpulse \
        --enable-librsvg \
        --enable-librubberband \
        --enable-librtmp  \
        --enable-libshine \
        --enable-libsmbclient \
        --enable-libsnappy \
        --enable-libsoxr \
        --enable-libspeex \
        --enable-libssh \
        --enable-libtesseract \
        --enable-libtheora \
        --enable-libtwolame \
        --enable-libv4l2 \
        --enable-libvidstab \
        --enable-libvmaf \
        --enable-libvo-amrwbenc \
        --enable-libvorbis \
        --enable-libvpx \
        --enable-libwavpack \
        --enable-libwebp \
        --enable-libx264 \
        --enable-libx265 \
        --enable-libxavs \
        --enable-libxcb \
        --enable-libxcb-shm \
        --enable-libxcb-xfixes \
        --enable-libxcb-shape \
        --enable-libxvid \
        --enable-libzimg \
        --enable-libzmq \
        --enable-libzvbi \
        --enable-lzma \
        --enable-decklink \
        --enable-libndi_newtek \
        --enable-libmysofa \
        --enable-openal \
        --enable-opencl \
        --enable-opengl \
        --enable-openssl \
        --enable-sndio \
        --enable-sdl2 \
        --enable-xlib \
        --enable-zlib \
        \
        --enable-cuda \
        --enable-cuda-sdk \
        --enable-cuvid \
        --enable-libmfx \
        --enable-libnpp \
        --enable-nvenc \
        --enable-omx \
        --enable-omx-rpi \
        --enable-vaapi \
        --enable-vdpau
$ make -j6

When downgrading glibc to 2.25 it compiles fine.

System information:
OS: Arch Linux x86_64
FFmpeg: git master (currently at N-87251: 3.4.r87251.ga918f16f7c)
Compiler: gcc 7.2.0
glibc: 2.26
CUDA: 8.0.61

Relevant system-wide environmet variables:
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt"
CXXFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"

Change History (3)

comment:1 Changed 6 weeks ago by bermond

A temporary workaround is to use --disable-cuda-sdk.

comment:2 Changed 6 weeks ago by oromit

  • Resolution set to invalid
  • Status changed from new to closed

That error is coming from nvcc, not ffmpeg or any of ffmpegs code.
Nothing we could possibly do about it. Ask nvidia to update their CUDA compiler for compatibility with the new glibc.
Maybe try SDK 9.

comment:3 Changed 6 weeks ago by bermond

@oromit
Thank you for the reply and clarification.

Note: See TracTickets for help on using tickets.