Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error on recent Arch #533

Closed
norbusan opened this issue Nov 5, 2023 · 13 comments
Closed

Compile error on recent Arch #533

norbusan opened this issue Nov 5, 2023 · 13 comments

Comments

@norbusan
Copy link
Contributor

norbusan commented Nov 5, 2023

Hi
thanks for your work on nvencc! I am the maintainer of nvenc in Arch.
A recent change (my guess is the update of CUDA) breaks compiling nvencc:

/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

Do you have any suggestion to resolved this?

Thanks

@rigaya
Copy link
Owner

rigaya commented Nov 6, 2023

It's difficult to solve from the log, full compile log might help.

Which version of gcc and CUDA have you used?

I've tested that NVEnc did compile fine with gcc 12.3 + CUDA 12.3, but not with gcc 13, as CUDA 12.3 support is up to gcc12.

@norbusan
Copy link
Contributor Author

norbusan commented Nov 6, 2023

Thanks for your answer, I'll send log and system details when I'm back at the machine.
よろしくお願いいたします。

@norbusan
Copy link
Contributor Author

norbusan commented Nov 6, 2023

gcc (GCC) 13.2.1 20230801
cuda 12.3.0

I checked that I correctly build with gcc-12 --cxx=g++-12 so it seems this is the way to go.

I think we can close this issue, sorry for the noise.

For completeness, here the build log error with gcc 13.2:

checking for g++...checking for g++...OK
egrep: warning: egrep is obsolescent; using grep -E
checking for cuda (CUDA_PATH=/opt/cuda)...nvcc=/opt/cuda/bin/nvcc
checking for cuda...OK, CUDA 12.3
checking for pthread...OK
checking for c++17...OK
checking for -msse2...OK
checking for __rdtscp()...yes
checking for -fPIE...configuring for speed...
checking for -mfpmath=sse...yes
checking for -ffast-math...yes
checking for -fomit-frame-pointer...yes
checking for pkg-config...OK
checking libavcodec with pkg-config...OK
checking for libavutil...yes
checking for libavcodec...yes
checking for libavformat...yes
checking for libavfilter...yes
checking for AVChannelLayout...yes
checking for libswresample...yes
checking vapoursynth with pkg-config...OK
checking for VapourSynth.h...yes
checking for VSScript.h...yes
checking avisynth with pkg-config...OK
checking for avisynth_c.h...yes
checking libass with pkg-config...OK
checking for ass/ass.h...yes
checking for dtl/dtl.hpp...checking for dtl/dtl.hpp...no

Creating config.mak, rgy_config.h...
SRCDIR = .
CXX = g++
NVCC = /opt/cuda/bin/nvcc
LD = g++
PROGRAM = nvencc
ENABLE_DEBUG = 0
CXXFLAGS = -Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -std=c++17 -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -I/opt/cuda/include -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread
NVCCFLAGS = --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread "
LDFLAGS = -L. -ldl -lstdc++ -lstdc++fs -m64 -pthread -L/opt/cuda/lib64 -lnppif_static -lnppig_static -lnppc_static -lcudart_static -lculibos -lcuda -lrt -lswresample -lavutil -lavcodec -lavformat -lavfilter -lavdevice -lass
PREFIX = /usr
X86_64 = 1
#define ENCODER_REV "2612"
#define ENABLE_AVI_READER 0
#define ENABLE_AVISYNTH_READER 1
#define ENABLE_VAPOURSYNTH_READER 1
#define ENABLE_AVSW_READER 1
#define ENABLE_SM_READER 0
#define ENABLE_LIBASS_SUBBURN 1
#define ENABLE_VMAF 0
#define ENABLE_AVCODEC_OUT_THREAD 1
#define AV_CHANNEL_LAYOUT_STRUCT_AVAIL 1
#define ENABLE_CPP_REGEX 1
#define ENABLE_DTL 0
#define ENABLE_PERF_COUNTER 0
successfully generated config.mak, rgy_config.h
generate .depend...
/opt/cuda/bin/nvcc -c --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread " -o NVEncCore/NVEncFilterAfsAnalyze.o NVEncCore/NVEncFilterAfsAnalyze.cu
/opt/cuda/bin/nvcc -c --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread " -o NVEncCore/NVEncFilterAfsFilter.o NVEncCore/NVEncFilterAfsFilter.cu
/opt/cuda/bin/nvcc -c --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread " -o NVEncCore/NVEncFilterAfsMerge.o NVEncCore/NVEncFilterAfsMerge.cu
/opt/cuda/bin/nvcc -c --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread " -o NVEncCore/NVEncFilterAfsSynthesize.o NVEncCore/NVEncFilterAfsSynthesize.cu
/opt/cuda/bin/nvcc -c --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread " -o NVEncCore/NVEncFilterConvolution3d.o NVEncCore/NVEncFilterConvolution3d.cu
/opt/cuda/bin/nvcc -c --generate-code arch=compute_50,code=[compute_50,sm_50] --generate-code arch=compute_61,code=[compute_61,sm_61] --generate-code arch=compute_75,code=[compute_75,sm_75] --generate-code arch=compute_86,code=[compute_86,sm_86] -Wno-deprecated-gpu-targets --cudart=static -std=c++14 -Xcudafe "--display_error_number --diag_suppress=108" -std=c++14 -ccbin g++ -I/opt/cuda/include -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -I. -I./NVEncSDK/Common/inc -I./NVEncCore -I./jitify -I./tinyxml2 -I./cppcodec -I./ttmath -DLINUX64 -m64 -Xcompiler "-Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -I/usr/include/vapoursynth -I/usr/include/python3.11 -I/usr/include/avisynth -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/fribidi -pthread " -o NVEncCore/NVEncFilterCrop.o NVEncCore/NVEncFilterCrop.cu
/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

/usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers
  typedef double _Float64;
                 ^

/usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
  typedef double _Float32x;
                 ^

/usr/include/bits/floatn-common.h(285): error: invalid combination of type specifiers
  typedef long double _Float64x;
                      ^

/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

/usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers
  typedef double _Float64;
                 ^

/usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
  typedef double _Float32x;
                 ^

/usr/include/bits/floatn-common.h(285): error: invalid combination of type specifiers
  typedef long double _Float64x;
                      ^

/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

/usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers
  typedef double _Float64;
                 ^

/usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
  typedef double _Float32x;
                 ^

/usr/include/bits/floatn-common.h(285): error: invalid combination of type specifiers
  typedef long double _Float64x;
                      ^

/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

/usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers
  typedef double _Float64;
                 ^

/usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
  typedef double _Float32x;
                 ^

/usr/include/bits/floatn-common.h(285): error: invalid combination of type specifiers
  typedef long double _Float64x;
                      ^

/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

/usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers
  typedef double _Float64;
                 ^

/usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
  typedef double _Float32x;
                 ^

/usr/include/bits/floatn-common.h(285): error: invalid combination of type specifiers
  typedef long double _Float64x;
                      ^

/usr/include/bits/floatn.h(86): error: invalid combination of type specifiers
  typedef __float128 _Float128;
                     ^

/usr/include/bits/floatn-common.h(214): error: invalid combination of type specifiers
  typedef float _Float32;
                ^

/usr/include/bits/floatn-common.h(251): error: invalid combination of type specifiers
  typedef double _Float64;
                 ^

/usr/include/bits/floatn-common.h(268): error: invalid combination of type specifiers
  typedef double _Float32x;
                 ^

/usr/include/bits/floatn-common.h(285): error: invalid combination of type specifiers
  typedef long double _Float64x;
                      ^

5 errors detected in the compilation of "NVEncCore/NVEncFilterAfsSynthesize.cu".
make: *** [makefile:40: NVEncCore/NVEncFilterAfsSynthesize.o] Error 2
make: *** Waiting for unfinished jobs....
5 errors detected in the compilation of "NVEncCore/NVEncFilterConvolution3d.cu".
make: *** [makefile:40: NVEncCore/NVEncFilterConvolution3d.o] Error 2
5 errors detected in the compilation of "NVEncCore/NVEncFilterAfsAnalyze.cu".
make: *** [makefile:40: NVEncCore/NVEncFilterAfsAnalyze.o] Error 2
5 errors detected in the compilation of "NVEncCore/NVEncFilterAfsMerge.cu".
make: *** [makefile:40: NVEncCore/NVEncFilterAfsMerge.o] Error 2
5 errors detected in the compilation of "NVEncCore/NVEncFilterAfsFilter.cu".
make: *** [makefile:40: NVEncCore/NVEncFilterAfsFilter.o] Error 2
5 errors detected in the compilation of "NVEncCore/NVEncFilterCrop.cu".
make: *** [makefile:40: NVEncCore/NVEncFilterCrop.o] Error 2
==> ERROR: A failure occurred in build().

@norbusan norbusan closed this as completed Nov 6, 2023
@rigaya
Copy link
Owner

rigaya commented Nov 6, 2023

Nice to hear it works fine with gcc 12.

I'll try adding gcc13 support when future CUDA version supports it.

@norbusan
Copy link
Contributor Author

norbusan commented Mar 3, 2024

Unfortunately, for now I have to put nvenc updates in Arch on ice: the current nvenc requires highway/libhwy via ffmpeg, and that is now compiled with gcc13 on Arch, and when compiling nvenc with gcc12 the link stage fails.

Do you have any idea when a gcc13 compatible cuda comes out?

@rigaya
Copy link
Owner

rigaya commented Mar 5, 2024

I've understood the situation.

Do you have any idea when a gcc13 compatible cuda comes out?

I think that only NVIDIA knows, but might be possible after GTC 2024 on Mar19-22(JST), next CUDA 12.4 might come out.

@norbusan
Copy link
Contributor Author

norbusan commented Mar 5, 2024

Thanks!

@rigaya
Copy link
Owner

rigaya commented Mar 12, 2024

CUDA 12.4 seems to come out. Although I haven't tested myself as I'm testing on Ubuntu 22.04, the document states that it supports up to gcc13.2.
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#host-compiler-support-policy

@norbusan
Copy link
Contributor Author

Thanks @rigaya
I tried building on Arch which has already cuda 12.4 (and gcc13.2.1), but it cannot find ffmpeg due to the following error:

int main(void){ avfilter_version();; std::cout << "Hello World!" << std::endl; return 0;}
---------------------------
In file included from /usr/include/libavutil/avutil.h:301,
                 from /usr/include/libavfilter/avfilter.h:41,
                 from cxx_check.c:3:
/usr/include/libavutil/common.h:30:2: error: #error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS
   30 | #error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS
      |  ^~~~~

@norbusan
Copy link
Contributor Author

Ahh, passing --extra-cxxflags=-D__STDC_CONSTANT_MACROS to configure fixed that.

Compiling now works, bug gives lots of warnings

nvcc warning : incompatible redefinition for option 'compiler-bindir', the last value of this option was used

Final link step also worked besides a bunch of errors, and compiled binary at least works for nvencc --check-features.

Thanks

@rigaya
Copy link
Owner

rigaya commented Mar 13, 2024

Thank you for testing, and also sharing to set the macro. I’ll change to add the macro by default in the next version.

I’ve now also tested with Ubuntu 22.04 + CUDA12.4 + gcc13.2 and was able to build successfully. I didn’t get the warnings you’ve had, so I’m not sure of the warnings you’ve had.

Anyway, nice to hear compile works with CUDA 12.4.

@norbusan
Copy link
Contributor Author

Thanks for testing.

I saw in your last release the following change

--- a/configure
+++ b/configure
@@ -299,7 +299,7 @@ else
 fi
 
 CXXINC=" \
-  -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS \
+  -DLINUX -DUNIX -D_FILE_OFFSET_BITS=64 -D__USE_LARGEFILE64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_FORMAT_MACROS \
   -I${SRCDIR} -I${SRCDIR}/NVEncSDK/Common/inc -I${SRCDIR}/NVEncCore -I${SRCDIR}/NVEncNVOFFRUC \
   -I${SRCDIR}/jitify -I${SRCDIR}/tinyxml2 -I${SRCDIR}/cppcodec -I${SRCDIR}/ttmath \
 "

but that only duplicated an already present flag, and still fails in my case.

The reason is that these -D are not passed to cxx_check which tests for ffmpeg. In the Arch case I see:

g++ -w cxx_check.c -Wall -Wno-unknown-pragmas -Wno-unused -Wno-missing-braces -pthread -msse2 -fPIE -O3 -DNDEBUG=1 -mfpmath=sse -ffast-math -fomit-frame-pointer -L. -ldl -lstdc++ -lstdc++fs -m64 -pthread -lswresample -lavutil -lavcodec -lavformat -lavfilter -lavdevice -o cxx_check
------ test ---------------
#include <iostream>
extern "C" {
#include <libavfilter/avfilter.h>
}
int main(void){ avfilter_version();; std::cout << "Hello World!" << std::endl; return 0;}
---------------------------
In file included from /usr/include/libavutil/avutil.h:301,
                 from /usr/include/libavfilter/avfilter.h:41,
                 from cxx_check.c:3:
/usr/include/libavutil/common.h:30:2: error: #error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS
   30 | #error missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS
      |  ^~~~~

which shows that the check in configure fails.

Without the check the compilation would already succeed, because the -D__STDC_CONSTANT_MACROS is already included in the list of flags.
which

rigaya added a commit that referenced this issue Mar 14, 2024
@rigaya
Copy link
Owner

rigaya commented Mar 14, 2024

Thank you, that was a wrong commit. 396ca3f shall work without --extra-cxxflags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants