-DEXPORT_C_API:bool=off causes build failures with certain options

Issue #146 resolved
Former user created an issue

To preface: the normal shared-multilib works, but I'm testing the static-multilib process. And both of these are arguably marginal, but there's still a discrepancy between shared and static multilib concerning these.

Problem No.1: -DEXPORT_C_API:bool=off + -DWINXP_SUPPORT:bool=on = failure

[10bit:$] cmake ../x265/source -G "Ninja" -DCMAKE_INSTALL_PREFIX="$HOME/x265_build" \
>      -DCMAKE_TOOLCHAIN_FILE="/usr/i686-w64-mingw32/toolchain-i686-w64-mingw32.cmake" \
>      -DCMAKE_CXX_FLAGS="-mfpmath=sse -march=pentium3 -msse -mtune=pentium3" \
>      -DHIGH_BIT_DEPTH:bool=on -DENABLE_ASSEMBLY:bool=off -DEXPORT_C_API:bool=off \
>      -DENABLE_CLI:bool=off -DWINXP_SUPPORT:bool=on
-- cmake version 3.0.2
-- The C compiler identification is GNU 5.1.0
-- The CXX compiler identification is GNU 5.1.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected x86 target processor
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW - Success
-- Performing Test CC_HAS_NO_NARROWING
-- Performing Test CC_HAS_NO_NARROWING - Success
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS - Success
-- Performing Test CC_HAS_FAST_MATH
-- Performing Test CC_HAS_FAST_MATH - Success
-- Performing Test CC_HAS_STACK_REALIGN
-- Performing Test CC_HAS_STACK_REALIGN - Success
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Found yasm: /usr/local/bin/yasm (found version "1.3.0") 
-- Found Yasm 1.3.0 to build assembly primitives
-- hg found at /usr/bin/hg
-- x265 version 1.7+201-44b6b2df7016
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/qyot27/x265-build/10bit
[10bit:$] ninja && ninja install
[4/51] Building CXX object encoder/CMakeFiles/encoder.dir/analysis.cpp.obj
FAILED: /usr/bin/i686-w64-mingw32-g++   -DEXPORT_C_API=0 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=1 -DX265_ARCH_X86=1 -DX265_NS=x265_10bpp -D_WIN32_WINNT=_WIN32_WINNT_WINXP -D_WIN32_WINNT_WIN7=0x0601 -D__STDC_LIMIT_MACROS=1 -mfpmath=sse -march=pentium3 -msse -mtune=pentium3 -O3 -DNDEBUG -I/home/qyot27/x265-build/x265/source/. -I/home/qyot27/x265-build/x265/source/common -I/home/qyot27/x265-build/x265/source/encoder -I.    -Wall -Wextra -Wshadow -march=i686 -Wno-array-bounds -ffast-math -mstackrealign -fno-exceptions -Wno-uninitialized -MMD -MT encoder/CMakeFiles/encoder.dir/analysis.cpp.obj -MF encoder/CMakeFiles/encoder.dir/analysis.cpp.obj.d -o encoder/CMakeFiles/encoder.dir/analysis.cpp.obj -c /home/qyot27/x265-build/x265/source/encoder/analysis.cpp
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/winxp.h:52:37: error: 'x265' does not name a type
 #define CONDITION_VARIABLE          x265::ConditionVariable
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:211:5: note: in expansion of macro 'CONDITION_VARIABLE'
     CONDITION_VARIABLE m_cv;
     ^
/home/qyot27/x265-build/x265/source/common/threading.h: In constructor 'x265_10bpp::ThreadSafeInteger::ThreadSafeInteger()':
/home/qyot27/x265-build/x265/source/common/winxp.h:53:37: error: 'x265' has not been declared
 #define InitializeConditionVariable x265::cond_init
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:158:9: note: in expansion of macro 'InitializeConditionVariable'
         InitializeConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h:158:38: error: 'm_cv' was not declared in this scope
         InitializeConditionVariable(&m_cv);
                                      ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h: In destructor 'x265_10bpp::ThreadSafeInteger::~ThreadSafeInteger()':
/home/qyot27/x265-build/x265/source/common/winxp.h:57:37: error: 'x265' has not been declared
 #define XP_CONDITION_VAR_FREE       x265::cond_destroy
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:164:9: note: in expansion of macro 'XP_CONDITION_VAR_FREE'
         XP_CONDITION_VAR_FREE(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h:164:32: error: 'm_cv' was not declared in this scope
         XP_CONDITION_VAR_FREE(&m_cv);
                                ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'int x265_10bpp::ThreadSafeInteger::waitForChange(int)':
/home/qyot27/x265-build/x265/source/common/winxp.h:54:37: error: 'x265' has not been declared
 #define SleepConditionVariableCS    x265::cond_wait
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:171:13: note: in expansion of macro 'SleepConditionVariableCS'
             SleepConditionVariableCS(&m_cv, &m_cs, INFINITE);
             ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h:171:39: error: 'm_cv' was not declared in this scope
             SleepConditionVariableCS(&m_cv, &m_cs, INFINITE);
                                       ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'void x265_10bpp::ThreadSafeInteger::set(int)':
/home/qyot27/x265-build/x265/source/common/winxp.h:56:37: error: 'x265' has not been declared
 #define WakeAllConditionVariable    x265::cond_broadcast
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:188:9: note: in expansion of macro 'WakeAllConditionVariable'
         WakeAllConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h:188:35: error: 'm_cv' was not declared in this scope
         WakeAllConditionVariable(&m_cv);
                                   ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'void x265_10bpp::ThreadSafeInteger::poke()':
/home/qyot27/x265-build/x265/source/common/winxp.h:56:37: error: 'x265' has not been declared
 #define WakeAllConditionVariable    x265::cond_broadcast
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:196:9: note: in expansion of macro 'WakeAllConditionVariable'
         WakeAllConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h:196:35: error: 'm_cv' was not declared in this scope
         WakeAllConditionVariable(&m_cv);
                                   ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'void x265_10bpp::ThreadSafeInteger::incr()':
/home/qyot27/x265-build/x265/source/common/winxp.h:56:37: error: 'x265' has not been declared
 #define WakeAllConditionVariable    x265::cond_broadcast
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:204:9: note: in expansion of macro 'WakeAllConditionVariable'
         WakeAllConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/encoder/analysis.cpp:26:
/home/qyot27/x265-build/x265/source/common/threading.h:204:35: error: 'm_cv' was not declared in this scope
         WakeAllConditionVariable(&m_cv);
                                   ^
[4/51] Building CXX object encoder/CMakeFiles/encoder.dir/search.cpp.obj
FAILED: /usr/bin/i686-w64-mingw32-g++   -DEXPORT_C_API=0 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=1 -DX265_ARCH_X86=1 -DX265_NS=x265_10bpp -D_WIN32_WINNT=_WIN32_WINNT_WINXP -D_WIN32_WINNT_WIN7=0x0601 -D__STDC_LIMIT_MACROS=1 -mfpmath=sse -march=pentium3 -msse -mtune=pentium3 -O3 -DNDEBUG -I/home/qyot27/x265-build/x265/source/. -I/home/qyot27/x265-build/x265/source/common -I/home/qyot27/x265-build/x265/source/encoder -I.    -Wall -Wextra -Wshadow -march=i686 -Wno-array-bounds -ffast-math -mstackrealign -fno-exceptions -Wno-uninitialized -MMD -MT encoder/CMakeFiles/encoder.dir/search.cpp.obj -MF encoder/CMakeFiles/encoder.dir/search.cpp.obj.d -o encoder/CMakeFiles/encoder.dir/search.cpp.obj -c /home/qyot27/x265-build/x265/source/encoder/search.cpp
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/winxp.h:52:37: error: 'x265' does not name a type
 #define CONDITION_VARIABLE          x265::ConditionVariable
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:211:5: note: in expansion of macro 'CONDITION_VARIABLE'
     CONDITION_VARIABLE m_cv;
     ^
/home/qyot27/x265-build/x265/source/common/threading.h: In constructor 'x265_10bpp::ThreadSafeInteger::ThreadSafeInteger()':
/home/qyot27/x265-build/x265/source/common/winxp.h:53:37: error: 'x265' has not been declared
 #define InitializeConditionVariable x265::cond_init
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:158:9: note: in expansion of macro 'InitializeConditionVariable'
         InitializeConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h:158:38: error: 'm_cv' was not declared in this scope
         InitializeConditionVariable(&m_cv);
                                      ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h: In destructor 'x265_10bpp::ThreadSafeInteger::~ThreadSafeInteger()':
/home/qyot27/x265-build/x265/source/common/winxp.h:57:37: error: 'x265' has not been declared
 #define XP_CONDITION_VAR_FREE       x265::cond_destroy
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:164:9: note: in expansion of macro 'XP_CONDITION_VAR_FREE'
         XP_CONDITION_VAR_FREE(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h:164:32: error: 'm_cv' was not declared in this scope
         XP_CONDITION_VAR_FREE(&m_cv);
                                ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'int x265_10bpp::ThreadSafeInteger::waitForChange(int)':
/home/qyot27/x265-build/x265/source/common/winxp.h:54:37: error: 'x265' has not been declared
 #define SleepConditionVariableCS    x265::cond_wait
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:171:13: note: in expansion of macro 'SleepConditionVariableCS'
             SleepConditionVariableCS(&m_cv, &m_cs, INFINITE);
             ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h:171:39: error: 'm_cv' was not declared in this scope
             SleepConditionVariableCS(&m_cv, &m_cs, INFINITE);
                                       ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'void x265_10bpp::ThreadSafeInteger::set(int)':
/home/qyot27/x265-build/x265/source/common/winxp.h:56:37: error: 'x265' has not been declared
 #define WakeAllConditionVariable    x265::cond_broadcast
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:188:9: note: in expansion of macro 'WakeAllConditionVariable'
         WakeAllConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h:188:35: error: 'm_cv' was not declared in this scope
         WakeAllConditionVariable(&m_cv);
                                   ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'void x265_10bpp::ThreadSafeInteger::poke()':
/home/qyot27/x265-build/x265/source/common/winxp.h:56:37: error: 'x265' has not been declared
 #define WakeAllConditionVariable    x265::cond_broadcast
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:196:9: note: in expansion of macro 'WakeAllConditionVariable'
         WakeAllConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h:196:35: error: 'm_cv' was not declared in this scope
         WakeAllConditionVariable(&m_cv);
                                   ^
In file included from /home/qyot27/x265-build/x265/source/common/threading.h:32:0,
                 from /home/qyot27/x265-build/x265/source/common/frame.h:29,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h: In member function 'void x265_10bpp::ThreadSafeInteger::incr()':
/home/qyot27/x265-build/x265/source/common/winxp.h:56:37: error: 'x265' has not been declared
 #define WakeAllConditionVariable    x265::cond_broadcast
                                     ^
/home/qyot27/x265-build/x265/source/common/threading.h:204:9: note: in expansion of macro 'WakeAllConditionVariable'
         WakeAllConditionVariable(&m_cv);
         ^
In file included from /home/qyot27/x265-build/x265/source/common/frame.h:29:0,
                 from /home/qyot27/x265-build/x265/source/common/predict.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.h:28,
                 from /home/qyot27/x265-build/x265/source/encoder/search.cpp:29:
/home/qyot27/x265-build/x265/source/common/threading.h:204:35: error: 'm_cv' was not declared in this scope
         WakeAllConditionVariable(&m_cv);
                                   ^
ninja: build stopped: subcommand failed.

Problem No.2: -DEXPORT_C_API:bool=off + -DENABLE_ASSEMBLY:bool=off = failure (even though the WINXP example above also had assembly disabled, the error was much earlier, and only happened when turning on XP support; and while 32-bit HIGH_BIT_DEPTH builds aren't officially 'sanctioned' this does in fact work as intended for regular shared-multilib builds and provide access to the hbd paths).

[10bit:$] cmake ../x265/source -G "Ninja" -DCMAKE_INSTALL_PREFIX="$HOME/x265_build"      -DCMAKE_TOOLCHAIN_FILE="/usr/i686-w64-mingw32/toolchain-i686-w64-mingw32.cmake"      -DCMAKE_CXX_FLAGS="-mfpmath=sse -march=pentium3 -msse -mtune=pentium3"      -DHIGH_BIT_DEPTH:bool=on -DENABLE_ASSEMBLY:bool=off -DEXPORT_C_API:bool=off      -DENABLE_CLI:bool=off && ninja && ninja install
-- cmake version 3.0.2
-- The C compiler identification is GNU 5.1.0
-- The CXX compiler identification is GNU 5.1.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detected x86 target processor
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW - Success
-- Performing Test CC_HAS_NO_NARROWING
-- Performing Test CC_HAS_NO_NARROWING - Success
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS - Success
-- Performing Test CC_HAS_FAST_MATH
-- Performing Test CC_HAS_FAST_MATH - Success
-- Performing Test CC_HAS_STACK_REALIGN
-- Performing Test CC_HAS_STACK_REALIGN - Success
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Found yasm: /usr/local/bin/yasm (found version "1.3.0") 
-- Found Yasm 1.3.0 to build assembly primitives
-- hg found at /usr/bin/hg
-- x265 version 1.7+201-44b6b2df7016
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/qyot27/x265-build/10bit
[28/51] Building CXX object common/CMakeFiles/common.dir/cpu.cpp.obj
FAILED: /usr/bin/i686-w64-mingw32-g++   -DEXPORT_C_API=0 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=1 -DX265_ARCH_X86=1 -DX265_NS=x265_10bpp -D_WIN32_WINNT=_WIN32_WINNT_WIN7 -D__STDC_LIMIT_MACROS=1 -mfpmath=sse -march=pentium3 -msse -mtune=pentium3 -O3 -DNDEBUG -I/home/qyot27/x265-build/x265/source/. -I/home/qyot27/x265-build/x265/source/common -I/home/qyot27/x265-build/x265/source/encoder -I.    -Wall -Wextra -Wshadow -march=i686 -Wno-array-bounds -ffast-math -mstackrealign -fno-exceptions -Wno-narrowing -MMD -MT common/CMakeFiles/common.dir/cpu.cpp.obj -MF common/CMakeFiles/common.dir/cpu.cpp.obj.d -o common/CMakeFiles/common.dir/cpu.cpp.obj -c /home/qyot27/x265-build/x265/source/common/cpu.cpp
/home/qyot27/x265-build/x265/source/common/cpu.cpp: In function 'uint32_t x265_10bpp::cpu_detect()':
/home/qyot27/x265-build/x265/source/common/cpu.cpp:128:30: error: 'x265_cpu_cpuid_test' was not declared in this scope
     if (!x265_cpu_cpuid_test())
                              ^
[28/51] Building CXX object common/CMakeFiles/common.dir/ipfilter.cpp.obj
ninja: build stopped: subcommand failed.

Comments (2)

  1. Ma0

    In source file source/common/threading.cpp there is:

    // x265 private namespace
    
    #if X265_ARCH_X86 && !defined(X86_64) && ENABLE_ASSEMBLY && defined(__GNUC__)
    extern "C" intptr_t x265_stack_align(void (*func)(), ...);
    #define x265_stack_align(func, ...) x265_stack_align((void (*)())func, __VA_ARGS__)
    #else
    #define x265_stack_align(func, ...) func(__VA_ARGS__)
    #endif
    
    /* C shim for forced stack alignment */ 
    

    should be

    // x265 private namespace
    
    #define x265_stack_align(func, ...) func(__VA_ARGS__)
    
    /* C shim for forced stack alignment */
    
  2. Log in to comment