x265 fails to build with Clang 4.0

Issue #318 new
Brad Smith created an issue
[1/18] /home/ports/pobj/x265-2.2/bin/c++   -DEXPORT_C_API=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DX265_ARCH_X86=1 -DX265_DEPTH=8 -DX265_NS=x265 -DX86_64=1 -D__STDC_LIMIT_MACROS=1 -I/home/ports/pobj/x265-2.2/x265_2.2/source/. -I/home/ports/pobj/x265-2.2/x265_2.2/source/common -I/home/ports/pobj/x265-2.2/x265_2.2/source/encoder -I. -O2 -pipe -DNDEBUG   -Wall -Wextra -Wshadow -std=gnu++98 -fPIC -Wno-array-bounds -ffast-math -mstackrealign -fno-exceptions -MD -MT test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o -MF test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o.d -o test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o -c /home/ports/pobj/x265-2.2/x265_2.2/source/test/mbdstharness.cpp
FAILED: test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o 
/home/ports/pobj/x265-2.2/bin/c++   -DEXPORT_C_API=1 -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=0 -DX265_ARCH_X86=1 -DX265_DEPTH=8 -DX265_NS=x265 -DX86_64=1 -D__STDC_LIMIT_MACROS=1 -I/home/ports/pobj/x265-2.2/x265_2.2/source/. -I/home/ports/pobj/x265-2.2/x265_2.2/source/common -I/home/ports/pobj/x265-2.2/x265_2.2/source/encoder -I. -O2 -pipe -DNDEBUG   -Wall -Wextra -Wshadow -std=gnu++98 -fPIC -Wno-array-bounds -ffast-math -mstackrealign -fno-exceptions -MD -MT test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o -MF test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o.d -o test/CMakeFiles/TestBench.dir/mbdstharness.cpp.o -c /home/ports/pobj/x265-2.2/x265_2.2/source/test/mbdstharness.cpp
In file included from /home/ports/pobj/x265-2.2/x265_2.2/source/test/mbdstharness.cpp:28:
In file included from /home/ports/pobj/x265-2.2/x265_2.2/source/test/mbdstharness.h:30:
/home/ports/pobj/x265-2.2/x265_2.2/source/test/testharness.h:73:24: error: static declaration of '__rdtsc' follows non-static declaration
static inline uint32_t __rdtsc(void)
                       ^
/home/ports/pobj/x265-2.2/x265_2.2/source/test/testharness.h:73:24: note: previous implicit declaration is here
1 error generated.

Comments (6)

  1. Pradeep Ramachandran Account Deactivated

    What platform are you trying this on? None of our regressions that build x265 on Windows/linux/darwin with Intel CPUs have reported any issues.

  2. Brad Smith reporter

    Testing further I see 2.1 also failing in the same manner. This doesn't happen with Clang/LLVM 3.9.x but it does with Clang/LLVM HEAD or what is to be 4.0 freezing in a few weeks.

  3. Log in to comment