Author Topic: Compile error on Ubuntu 16.04 (patch)  (Read 1581 times)

AapoRantalainen

  • Newbie
  • *
  • Posts: 1
Compile error on Ubuntu 16.04 (patch)
« on: April 28, 2016, 08:18:39 PM »
Ubuntu 16.04, 64bit.
Happens with current git head: https://github.com/mean00/avidemux2/commit/3c835d4af2a7c7c9d965c2b7e2914b7066daffd3
and with 2.6.12.tar.gz (MD5 : 354d8ddf75d48d1f698786e8243ecc54 )

Steps:
 
Code: [Select]
bash bootStrap.bash --deb
Locally compiling log (/tmp/logbuildPluginsCommon) is the same than in Ubuntu's PPA building server:
https://launchpadlibrarian.net/253120173/buildlog_ubuntu-xenial-amd64.avidemux2.6_1%3A2.6.12-2~ppa+xenial3_BUILDING.txt.gz

Code: [Select]
make -f ADM_muxers/muxerDummy/CMakeFiles/ADM_mx_dummy.dir/build.make ADM_muxers/muxerDummy/CMakeFiles/ADM_mx_dummy.dir/depend
make[4]: Entering directory '/«PKGBUILDDIR»/avidemux_plugins/cmake-bin'
cd /«PKGBUILDDIR»/avidemux_plugins/cmake-bin && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /«PKGBUILDDIR»/avidemux_plugins /«PKGBUILDDIR»/avidemux_plugins/ADM_muxers/muxerDummy /«PKGBUILDDIR»/avidemux_plugins/cmake-bin /«PKGBUILDDIR»/avidemux_plugins/cmake-bin/ADM_muxers/muxerDummy /«PKGBUILDDIR»/avidemux_plugins/cmake-bin/ADM_muxers/muxerDummy/CMakeFiles/ADM_mx_dummy.dir/DependInfo.cmake --color=
In file included from /«PKGBUILDDIR»/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.cpp:24:
In file included from /usr/include/math.h:83:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:200:22: error: invalid token at start of a preprocessor expression
      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
                     ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:238:22: error: invalid token at start of a preprocessor expression
      || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
                     ^
In file included from /«PKGBUILDDIR»/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.cpp:24:
In file included from /usr/include/math.h:104:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:200:22: error: invalid token at start of a preprocessor expression
      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
                     ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:238:22: error: invalid token at start of a preprocessor expression
      || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
                     ^
Scanning dependencies of target ADM_mx_dummy
make[4]: Leaving directory '/«PKGBUILDDIR»/avidemux_plugins/cmake-bin'
make -f ADM_muxers/muxerDummy/CMakeFiles/ADM_mx_dummy.dir/build.make ADM_muxers/muxerDummy/CMakeFiles/ADM_mx_dummy.dir/build
In file included from /«PKGBUILDDIR»/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.cpp:24:
In file included from /usr/include/math.h:151:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:200:22: error: invalid token at start of a preprocessor expression
      || __cplusplus < 201103L /* isinf conflicts with C++11.  */ \
                     ^
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:238:22: error: invalid token at start of a preprocessor expression
      || __cplusplus < 201103L /* isnan conflicts with C++11.  */ \
                     ^
make[4]: Entering directory '/«PKGBUILDDIR»/avidemux_plugins/cmake-bin'
6 errors generated.

This is compiling with clang.


With gcc errors are:
Code: [Select]
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:200:22: error: operator '||' has no right operand
-----
Hint from http://avidemux.org/smif/index.php?topic=16649.0
Got it compiled with this patch:
Code: [Select]
diff --git a/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.h b/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.h
index 597be6a..33a6ddf 100644
--- a/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.h
+++ b/avidemux_plugins/ADM_demuxers/VapourSynth/ADM_vsProxy.h
@@ -16,14 +16,8 @@
  ***************************************************************************/
 #pragma once
 
-
-extern "C"
-{
-#undef __cplusplus
 #include "VSScript.h"
 #include "VSHelper.h"
-#define __cplusplus
-}
 #include "../../ADM_coreSocket/include/ADM_coreAvsProtocol.h"
 
 /**