[ADM_vsProxy.cpp] build failure with glibc 2.23

Started by pingplug, March 05, 2016, 02:42:54 AM

Previous topic - Next topic

pingplug

Arch Linux 64bit, using PKGBUILD in https://aur.archlinux.org/pkgbase/avidemux-git/

I got an error while building vapoursynth plugin

In file included from /usr/include/math.h:83:0,
                 from /tmp/makepkg/avidemux-git/src/avidemux/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.cpp:24:
/usr/include/bits/mathcalls.h:200:22: Error: operator '||' has no right operand
       || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
                      ^
/usr/include/bits/mathcalls.h:238:22: Error: operator '||' has no right operand
       || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
                      ^
In file included from /usr/include/math.h:104:0,
                 from /tmp/makepkg/avidemux-git/src/avidemux/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.cpp:24:
/usr/include/bits/mathcalls.h:200:22: Error: operator '||' has no right operand
       || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
                      ^
/usr/include/bits/mathcalls.h:238:22: Error: operator '||' has no right operand
       || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
                      ^
In file included from /usr/include/math.h:151:0,
                 from /tmp/makepkg/avidemux-git/src/avidemux/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.cpp:24:
/usr/include/bits/mathcalls.h:200:22: Error: operator '||' has no right operand
       || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
                      ^
/usr/include/bits/mathcalls.h:238:22: Error: operator '||' has no right operand
       || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
                      ^
make[2]: *** [ADM_demuxers/VapourSynth/CMakeFiles/vsProxy.dir/ADM_vsProxy.cpp.o] Error 1
make[1]: *** [ADM_demuxers/VapourSynth/CMakeFiles/vsProxy.dir/all] Error 2
make: *** [all] Error 2


I found that in glibc 2.23, it will check the C++ version by "__cplusplus"
But in ADM_vsProxy.h:

extern "C"
{
#undef __cplusplus
#include "VSScript.h"
#include "VSHelper.h"
#define __cplusplus
}


There is no need to extern "C". There is no function in the header, they are function pointers.

This one should work:

#include "VSScript.h"
#include "VSHelper.h"