<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>So, besides turning assembly off, changing '-miphoneos-version-min' to '-mmacosx-version-min' and changing 'IOS_PLATFORM_SDK=`xcrun --show-sdk-path --sdk iphoneos`' to 'IOS_PLATFORM_SDK=`xcrun --show-sdk-path --sdk macosx`', what should I do?</div><div>When I change <span style="line-height: 23.8px;">'-miphoneos-version-min' to '-mmacosx-version-min' </span><span style="line-height: 23.8px;">and changed 'IOS_PLATFORM_SDK=`xcrun --show-sdk-path --sdk iphoneos`' to 'IOS_PLATFORM_SDK=`xcrun --show-sdk-path --sdk macosx`'</span><span style="line-height: 23.8px;">, the cmake stopped with some errors:</span></div><br>







<p class="p1"><span class="s1">-- cmake version 3.6.0-rc3</span></p>
<p class="p1"><span class="s1">-- The C compiler identification is AppleClang 7.3.0.7030031</span></p>
<p class="p1"><span class="s1">-- The CXX compiler identification is AppleClang 7.3.0.7030031</span></p>
<p class="p1"><span class="s1">-- Check for working C compiler: /usr/bin/clang</span></p>
<p class="p1"><span class="s1">-- Check for working C compiler: /usr/bin/clang -- broken</span></p>
<p class="p1"><span class="s1">CMake Error at /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):</span></p>
<p class="p1"><span class="s1">  The C compiler "/usr/bin/clang" is not able to compile a simple test</span></p>
<p class="p1"><span class="s1">  program.</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  It fails with the following output:</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">   Change Dir: /Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeTmp</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  Run Build Command:"/usr/bin/make" "cmTC_dadc6/fast"</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/usr/bin/make -f</span></p>
<p class="p1"><span class="s1">  CMakeFiles/cmTC_dadc6.dir/build.make CMakeFiles/cmTC_dadc6.dir/build</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  Building C object CMakeFiles/cmTC_dadc6.dir/testCCompiler.c.o</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  /usr/bin/clang -arch armv7 -mfpu=neon -pthread -mmacosx-version-min=10.10</span></p>
<p class="p1"><span class="s1">  -Qunused-arguments -isysroot</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</span></p>
<p class="p1"><span class="s1">  -o CMakeFiles/cmTC_dadc6.dir/testCCompiler.c.o -c</span></p>
<p class="p1"><span class="s1">  /Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeTmp/testCCompiler.c</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  Linking C executable cmTC_dadc6</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script</span></p>
<p class="p1"><span class="s1">  CMakeFiles/cmTC_dadc6.dir/link.txt --verbose=1</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  /usr/bin/clang -arch armv7 -mfpu=neon -pthread -mmacosx-version-min=10.10</span></p>
<p class="p1"><span class="s1">  -Qunused-arguments -isysroot</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</span></p>
<p class="p1"><span class="s1">  -Wl,-headerpad_max_install_names</span></p>
<p class="p1"><span class="s1">  CMakeFiles/cmTC_dadc6.dir/testCCompiler.c.o -o cmTC_dadc6</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  ld: warning: ld: warning: ignoring file</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin/libclang_rt.osx.a,</span></p>
<p class="p1"><span class="s1">  missing required architecture armv7 in file</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib/darwin/libclang_rt.osx.a</span></p>
<p class="p1"><span class="s1">  (2 slices)ignoring file</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libSystem.tbd,</span></p>
<p class="p1"><span class="s1">  missing required architecture armv7 in file</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libSystem.tbd</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  ld: dynamic main executables must link with libSystem.dylib for</span></p>
<p class="p1"><span class="s1">  architecture armv7</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  clang: error: linker command failed with exit code 1 (use -v to see</span></p>
<p class="p1"><span class="s1">  invocation)</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  make[1]: *** [cmTC_dadc6] Error 1</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  make: *** [cmTC_dadc6/fast] Error 2</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  CMake will not be able to correctly generate this project.</span></p>
<p class="p1"><span class="s1">Call Stack (most recent call first):</span></p>
<p class="p1"><span class="s1">  CMakeLists.txt:19 (project)</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">-- Configuring incomplete, errors occurred!</span></p>
<p class="p1"><span class="s1">See also "/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeOutput.log".</span></p>
<div><span class="s1">See also "/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeError.log".</span></div><div><span class="s1"><br></span></div><div><span class="s1"><b>BTW, do you know what cause the problem in the other compiling environment?(Since the other compiling environment using gcc as assembly compiler)</b><br></span></div><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br>At 2016-06-29 10:55:31, "chen" <chenm003@163.com> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">1. Please turn Assembly off, we use gcc syntax.<div>2. -<span style="font-family: Arial; line-height: 23.8px;">miphoneos-version-min is not compatible to MacOSX, so you have to change it to -mmacosx-version-min, the </span><span style="font-family: Arial; line-height: 23.8px;">IOS_PLATFORM_SDK also mistake</span><br><div></div><div></div><br>At 2016-06-29 10:48:44,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>First, thanks for your reply and new patch!</div><div>I've tried your new patch, the '<span style="font-family: arial; line-height: 23.8px;">CMAKE_OSX_DEPLOYMENT_TARGET</span><span style="line-height: 1.7;">' settings seems take effect, the warnings disappeared, but I still have two problems in two compiling environments:</span></div><div><br></div><div><b>1.The first environment is OS X 10.11.5 with Xcode7.3.1(which has clang 7.3.0) and cmake </b><span style="line-height: 1.7;"><b>3.6.0-rc3</b>, on which I completely use your new patch and get the problem:</span></div><div>







<p class="p1"><span class="s1">[ 54%] Built target common</span></p><p class="p2"><span class="s2">[ 55%] </span><span class="s1"><b>Generating dct-a.S.o</b></span></p><p class="p1"><span class="s1"><b>/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/source/common/arm/asm.S:28:1: </b></span><span class="s3"><b>error: </b></span><span class="s1"><b>unknown directive</b></span></p><p class="p1"><span class="s1">.syntax unified</span></p><p class="p3"><span class="s1"><b>^</b></span></p><p class="p1"><span class="s1"><b>/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/source/common/arm/asm.S:38:1: </b></span><span class="s3"><b>error: </b></span><span class="s1"><b>unknown directive</b></span></p><p class="p1"><span class="s1">.fpu neon</span></p><p class="p3"><span class="s1"><b>^</b></span></p><p class="p1"><span class="s1"><b>/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/source/common/arm/dct-a.S:26:17: </b></span><span class="s3"><b>error: </b></span><span class="s1"><b>unexpected token in '.section' directive</b></span></p><p class="p1">
















</p><p class="p1"><span class="s1">.section .rodata</span></p>
<p class="p3"><span class="s2"><b>...</b>(omit many errors here)</span></p><p class="p1"><span class="s1">make[2]: *** [dct-a.S.o] Error 1</span></p><p class="p1"><span class="s1">make[1]: *** [CMakeFiles/x265-static.dir/all] Error 2</span></p><p class="p3"><span class="s2">









</span></p><p class="p1"><span class="s1">make: *** [all] Error 2</span></p><p class="p3"><b>CONCLUSION: It seems that clang dose not support syntax of *.S assembly files(I mentioned that in an earlier mail).</b></p><p class="p3"><span style="line-height: 1.7;"><b>2.The second environment is OS X 10.9.5 with Xcode4.6.3(which has llvm-gcc-4.2 for iOS platform) and </b></span><b style="line-height: 23.8px;">cmake </b><span style="line-height: 1.7;"><b>3.6.0-rc3</b>, on which I <b>changed ios.cmake</b> and <b>make-Makefiles.bash</b> properly to be </span><span style="line-height: 1.7;">suitable to llvm-gcc-4.2</span><span style="line-height: 1.7;">:</span></p><p class="p3"><span style="line-height: 1.7;"><b>ios.cmake</b>:</span></p><p class="p3"># CMake toolchain file for cross compiling x265 for ARM arch</p><p class="p3"># This feature is only supported as experimental. Use with caution.</p><p class="p3"># Please report bugs on bitbucket</p><p class="p3"># Run cmake with: cmake -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" ../../source && ccmake ../../source</p><p class="p3"><br></p><p class="p3">set(CROSS_COMPILE_ARM 1)</p><p class="p3">set(CMAKE_SYSTEM_NAME Darwin)</p><p class="p3">set(CMAKE_SYSTEM_PROCESSOR armv7l)</p><p class="p3">set(CMAKE_OSX_DEPLOYMENT_TARGET 0)</p><p class="p3"><br></p><p class="p3"># specify the cross compiler</p><p class="p3">set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)</p><p class="p3">set(CMAKE_CXX_COMPILER <span style="line-height: 23.8px;">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2</span><span style="line-height: 1.7;">)</span></p><p class="p3"><span style="line-height: 1.7;"># specify the target environment</span></p><p class="p3"></p><p class="p3">set(CMAKE_FIND_ROOT_PATH /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk)</p><p class="p3"><b>make-Makefiles.bash:</b><br></p><p class="p3">IOS_PLATFORM_SDK=<span style="line-height: 23.8px;">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk</span></p><p class="p3"><span style="line-height: 23.8px;">IOS_FLAGS="-march=armv7 -mcpu=cortex-a8 -mfpu=neon -pthread -miphoneos-version-min=4.0 -Qunused-arguments"</span></p><p class="p3">cmake -DCMAKE_TOOLCHAIN_FILE=ios.cmake -DCMAKE_C_FLAGS="$IOS_CFLAGS" -DCMAKE_CXX_FLAGS="$IOS_CFLAGS" -DCMAKE_OSX_SYSROOT="$IOS_PLATFORM_SDK" -DIOS_PLATFORM_SDK="$IOS_PLATFORM_SDK" -G "Unix Makefiles" ../../source && ccmake ../../source</p><p class="p3"><b>and the problem is:</b></p>







<div style="line-height: 23.8px;"><div style="line-height: 23.8px;">[ 34%] Built target common</div><div style="line-height: 23.8px;">Scanning dependencies of target encoder</div><div style="line-height: 23.8px;">[ 35%] Building CXX object encoder/CMakeFiles/encoder.dir/analysis.cpp.o</div><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/analysis.cpp: In member function 'void x265::Analysis::checkBidir2Nx2N(x265::Mode&, x265::Mode&, const x265::CUGeom&)':</div><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/analysis.cpp:2190: error: invalid use of incomplete type 'class x265::MotionReference'</div><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/reference.h:38: error: forward declaration of 'class x265::MotionReference'</div><div style="line-height: 23.8px;"><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/analysis.cpp:2190: error: invalid use of incomplete type 'class x265::MotionReference'</div><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/reference.h:38: error: forward declaration of 'class x265::MotionReference'</div><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/analysis.cpp:2190: error: invalid use of incomplete type 'class x265::MotionReference'</div><div style="line-height: 23.8px;">/Users/shiyi/Desktop/x265_dev/source/encoder/reference.h:38: error: forward declaration of 'class x265::MotionReference'</div><div style="line-height: 23.8px;">make[2]: *** [encoder/CMakeFiles/encoder.dir/<span style="line-height: 23.8px;">analysis.cpp.o] Error 1</span></div><div style="line-height: 23.8px;">make[1]: *** [encoder/CMakeFiles/encoder.dir/all] Error 2</div><div style="line-height: 23.8px;">make: *** [all] Error 2</div></div></div></div>







<br><div><b style="line-height: 23.8px;">CONCLUSION: It seems that the gcc contained in Xcode4.6.3 does not support the syntax of 'analysis.cpp'.</b></div><div><b style="line-height: 23.8px;"><br></b></div><div><b style="line-height: 23.8px;">You mentioned that you can't reproduce my problem, so what's your compling environment like?Did you disabled assembly in cmake configure?</b></div><br><br><div style="position:relative;zoom:1"></div><div></div><br>At 2016-06-29 01:37:06, "chen" <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>Sorry for delay, I am working on other high-priority patch.</div>I still can't reproduce your problem, but after read cmake source, I guess the problem on CMAKE_OSX_DEPLOYMENT_TARGET<div>Could you try this new patch?<br><div></div><div></div><br>At 2016-06-28 17:18:14,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>If I disable assembly in my cmake configure, I successfully compiled the 'libx265.a' library.But I found that the library without assembly optimization do encoding more slowly than expected.So I need the assembly version of 'libx265.a'!Then I installed Xcode4.6.3 which has llvm gcc 4.2 for iOS platform.</div><div><b>I changed the 'ios.cmake' under 'build/arm-ios' to:</b></div><div>set(CROSS_COMPILE_ARM 1)</div><div>set(CMAKE_SYSTEM_NAME Darwin<span style="line-height: 1.7;">)</span></div><div><span style="line-height: 1.7;">set(CMAKE_SYSTEM_PROCESSOR armv7l)</span></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)</span></div><div><span style="line-height: 1.7;">set(CMAKE _CXX_COMPILER </span><span style="line-height: 23.8px;">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-g++-4.2</span><span style="line-height: 1.7;">)</span></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">set(CMAKE_FIND_ROOT_PATH /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk)</span></div><div><span style="line-height: 1.7;"><br></span></div><div># Skip the platform compiler checks for cross compiling</div><div><span style="line-height: 1.7;">set(CMAKE_C_COMPILER_WORKS TRUE)</span></div><div><span style="line-height: 1.7;">set(</span><span style="line-height: 23.8px;">CMAKE_CXX_COMPILER_WORKS TRUE</span><span style="line-height: 1.7;">)</span></div><div><span style="line-height: 1.7;"><br></span></div><div><b>and 'make-Makefiles.bash' under 'build/arm-ios' to:</b></div><div>IOS_PLATFORM_SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk</div><div><br></div><div>IOS_FLAGS="-march=armv7 -mcpu=cortex-a8 -mfpu=neon -pthread -isysroot $IOS_PLATFORM_SDK -I$IOS_PLATFORM_SDK/usr/include -I$IOS_PLATFORM_SDK/usr/include/c++/4.2.1 -miphoneos-version-min=4.0 -Qunused-arguments -DHAVE_STRTOK_R"</div><div><br></div><div>cmake -DCMAKE_TOOLCHAIN_FILE=ios.cmake -DCMAKE_C_FLAGS="$IOS_FLAGS" -DCMAKE_CXX_FLAGS="$IOS_FLAGS" -DIOS_PLATFORM_SDK="$IOS_PLATFORM_SDK" -G "Unix Makefiles" ../../source && cmake ../../source</div><div><br></div><div><br></div><div>I can generate the 'Makefile' by run 'make-Makefiles.bash', but when<span style="line-height: 1.7;"> I run 'make' to compile the codes, it <b>reports many warnings</b> like:</span></div><div>In file included from /Applications/Xcode.app/Contents/Developer/Playforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/semaphore.h:27,</div><div>from .../source/common/threading.h:36,</div><div>from .../source/common/frame.h:29,</div><div>from .../source/common/analysis.cpp:27,</div><div>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/sys/fcntl.h:493: warning: 'int flock(int, int)' hides constructor for 'struck flock'</div><div><br></div><div>In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSDK6.1.sdk/usr/include/sys/proc.h:78,</div><div>from <span style="line-height: 23.8px;">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSDK6.1.sdk/usr/include/sys/sysctl.h:84,</span></div><div><span style="line-height: 23.8px;">from .../source/common/threading.h:43,</span></div><div><span style="line-height: 23.8px;">from .../source/common/frame.h:29,</span></div><div><span style="line-height: 23.8px;">from .../source/encoder/analysis.cpp:27:</span></div><div><span style="line-height: 23.8px;">/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneSDK6.1.sdk/usr/include/sys/event.h:317: warning:'int kevent(int, const kevent*, int, kevent*, int, const timesspec*)' hides the constructor for 'struct kevent'</span></div><br><div><b>and finally stopped at the error</b>:</div><div><br></div><div>.../source/encoder/analysis.cpp: In member function 'void x265::Analysis::checkBidir2Nx2N(x265::Mode&, x265::Mode&, const x265::CUGeom&)':</div><div>.../source/encoder/analysis.cpp:2190:error:invalid use of incomplete type 'class x265::MotionReference'</div><div>.../source/encoder/reference.h:38:error:forward declaration of 'class x265::MotionReference'</div><div><div style="line-height: 23.8px;">.../source/encoder/analysis.cpp:2190:error:invalid use of incomplete type 'class x265::MotionReference'</div><div style="line-height: 23.8px;">.../source/encoder/reference.h:38:error:forward declaration of 'class x265::MotionReference'</div></div><div style="line-height: 23.8px;"><div style="line-height: 23.8px;">.../source/encoder/analysis.cpp:2190:error:invalid use of incomplete type 'class x265::MotionReference'</div><div style="line-height: 23.8px;">.../source/encoder/reference.h:38:error:forward declaration of 'class x265::MotionReference'</div></div><div>make[2]: *** [encoder/CMakeFiles/encoder.dir/analysis.cpp.o] Error 1</div><div>make[1]: *** [encoder/CMakeFiles/encoder.dir/all] Error 2</div><div>make: *** [all] Error 2</div><div><br></div><div>What's the problem?Did I configure settings right?</div><div style="position:relative;zoom:1"></div><div></div><br>在 2016-06-24 22:44:51,"chen" <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">We use gcc <span style="line-height: 23.8px;">assembly </span>syntax, so you have to disable assembly in your cmake configure.<br><div></div><div></div><br>At 2016-06-24 13:55:15,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">I move <b>'-arch armv7 -mfpu=neon -pthread -isysroot $IOS_PLATFORM_SDK -miphoneos-version-min=7.0 -Qunused-arguments' </b>to CMakeLists.txt under '<b>source</b>' diretory, and I can get through cmake command to Makefile.But when I run 'make', the compiling failed when the compiler(Clang or yasm?Since I installed yasm on my Mac and I saw it detected it) try to compile file '<br>







<div><b style="line-height: 1.7;">source/common/arm/asm.S</b>'.Error info is:</div><div><br></div><div>







<p class="p1"><span class="s1">[ 55%] </span><span class="s2"><b>Generating dct-a.S.o</b></span></p>
<p class="p2"><span class="s2"><b>/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/source/common/arm/asm.S:38:1: </b></span><span class="s3"><b>error: </b></span><span class="s2"><b>unknown directive</b></span></p>
<p class="p2"><span class="s2">.fpu neon</span></p>
<p class="p3"><span class="s2"><b>^</b></span></p>
<p class="p2"><span class="s2"><b>/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/source/common/arm/dct-a.S:26:17: </b></span><span class="s3"><b>error: </b></span><span class="s2"><b>unexpected token in '.section' directive</b></span></p>
<p class="p2"><span class="s2">.section .rodata</span></p>
<p class="p3"><span class="s2"><b>                ^</b></span></p>
<p class="p2"><span class="s2">make[2]: *** [dct-a.S.o] Error 1</span></p>
<p class="p2"><span class="s2">make[1]: *** [CMakeFiles/x265-static.dir/all] Error 2</span></p>
<p class="p2"><span class="s2">make: *** [all] Error 2</span></p><p class="p2"><span class="s2">Seems like the asm compiler dosen't support such syntax!</span></p></div><br><br><br><div style="position:relative;zoom:1"></div><div></div><br>在 2016-06-24 12:14:47,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">Thank you very much!<br><br><br><br><br><div style="position:relative;zoom:1"></div><div></div><br>在 2016-06-24 11:58:41,"chen" <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">I see your cmake generate two of <span style="font-family: Arial; line-height: 23.8px;">-isysroot, the second one for native, I will take a look tomorrow.</span><div><br>At 2016-06-24 11:55:26,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">I tried cmake 3.5.2 and 3.6.0 rc3(I used rc2 just now), the same problem occured!I used Xcode 7.3.1(Version 7.3.1 (7D1014)).<br><br><br><br><br><div style="position:relative;zoom:1"></div><div></div><br>At 2016-06-24 11:43:51, "chen" <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">I take a look, my cmake is brew 3.5.2 version<div>In your message, there are <span style="font-family: Arial; line-height: 23.8px;">AppleClang otherthan my Clang, I guess the problem in cmake</span></div><div><br></div><div><br>在 2016-06-24 11:31:15,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">I'm using cmake 3.6.0, that's the highest version I can find yet.Which version of cmake do you use?<br><br><br><br><br><div style="position:relative;zoom:1"></div><div></div><br>在 2016-06-24 11:27:22,"chen" <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">No, it is native compiler, we need cross-compiler</div><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">try with upgrade your cmake<br><div></div><div></div><br>At 2016-06-24 11:26:01,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>'Your system' means Mac OS X?I'm using Max OS X 10.11.5.</div><div>If remove '<b style="line-height: 23.8px;">-DCMAKE_C_FLAGS="$IOS_CFLAGS" -DCMAKE_CXX_FLAGS="$IOS_CFLAGS" -DIOS_PLATFORM_SDK="$IOS_PLATFORM_SDK"</b>' in <span style="line-height: 23.8px;">make-Makefiles.bash, the C comiler check will succeed!</span></div><div><span style="line-height: 23.8px;">I found that there is '</span><span style="line-height: 23.8px;"><b>-isysroot </b></span><span style="line-height: 23.8px;"><b>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</b></span><span style="line-height: 23.8px;">' in the compiling command, is it that cause the problem?</span></div><br><br><br><br><div style="position:relative;zoom:1"></div><div></div><br>在 2016-06-24 11:10:38,"chen" <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">You clang version same as me, but your cmake is lower, and looks your system can't support armv7, are you use ARM64?<div><br><div></div><div></div><br>At 2016-06-24 11:07:05,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>I've tried your patch, but there is a new problem.When I run 'make-Makefiles.bash' under 'build/arm-ios/' the errors occured:</div><div>







<p class="p1"><span class="s1">-- cmake version 3.6.0-rc2</span></p>
<p class="p1"><span class="s1">-- The C compiler identification is AppleClang 7.3.0.7030031</span></p>
<p class="p1"><span class="s1">-- The CXX compiler identification is AppleClang 7.3.0.7030031</span></p>
<p class="p1"><span class="s1">-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang</span></p>
<p class="p1"><span class="s1">-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- broken</span></p>
<p class="p1"><span class="s1">CMake Error at /Applications/CMake.app/Contents/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):</span></p>
<p class="p1"><span class="s1">  The C compiler</span></p>
<p class="p1"><span class="s1">  "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"</span></p>
<p class="p1"><span class="s1">  is not able to compile a simple test program.</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  It fails with the following output:</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">   Change Dir: /Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeTmp</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  Run Build Command:"/usr/bin/make" "cmTC_83901/fast"</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/usr/bin/make -f</span></p>
<p class="p1"><span class="s1">  CMakeFiles/cmTC_83901.dir/build.make CMakeFiles/cmTC_83901.dir/build</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  Building C object CMakeFiles/cmTC_83901.dir/testCCompiler.c.o</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang</span></p>
<p class="p1"><span class="s1">  -arch armv7 -mfpu=neon -pthread -isysroot</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk</span></p>
<p class="p1"><span class="s1">  -miphoneos-version-min=7.0 -Qunused-arguments -isysroot</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</span></p>
<p class="p1"><span class="s1">  -o CMakeFiles/cmTC_83901.dir/testCCompiler.c.o -c</span></p>
<p class="p1"><span class="s1">  /Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeTmp/testCCompiler.c</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  Linking C executable cmTC_83901</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  /Applications/CMake.app/Contents/bin/cmake -E cmake_link_script</span></p>
<p class="p1"><span class="s1">  CMakeFiles/cmTC_83901.dir/link.txt --verbose=1</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang</span></p>
<p class="p1"><span class="s1">  -arch armv7 -mfpu=neon -pthread -isysroot</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk</span></p>
<p class="p1"><span class="s1">  -miphoneos-version-min=7.0 -Qunused-arguments -isysroot</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</span></p>
<p class="p1"><span class="s1">  -Wl,-headerpad_max_install_names</span></p>
<p class="p1"><span class="s1">  CMakeFiles/cmTC_83901.dir/testCCompiler.c.o -o cmTC_83901</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  ld: warning: ignoring file</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libSystem.tbd,</span></p>
<p class="p1"><span class="s1">  missing required architecture armv7 in file</span></p>
<p class="p1"><span class="s1">  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libSystem.tbd</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  ld: dynamic main executables must link with libSystem.dylib for</span></p>
<p class="p1"><span class="s1">  architecture armv7</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  clang: error: linker command failed with exit code 1 (use -v to see</span></p>
<p class="p1"><span class="s1">  invocation)</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  make[1]: *** [cmTC_83901] Error 1</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  make: *** [cmTC_83901/fast] Error 2</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1">  </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">  CMake will not be able to correctly generate this project.</span></p>
<p class="p1"><span class="s1">Call Stack (most recent call first):</span></p>
<p class="p1"><span class="s1">  CMakeLists.txt:19 (project)</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">-- Configuring incomplete, errors occurred!</span></p>
<p class="p1"><span class="s1">See also "/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeOutput.log".</span></p>
<p class="p1"><span class="s1">See also "/Users/huhai/dev/sources/video_opensource/x265_new/x265_dev/build/arm-ios/CMakeFiles/CMakeError.log".</span></p></div><br><br><br><div><b>The C compiler check failed!And I found that it's the '-DCMAKE_C_FLAGS="$IOS_CFLAGS" -DCMAKE_CXX_FLAGS="$IOS_CFLAGS" -DIOS_PLATFORM_SDK="$IOS_PLATFORM_SDK"' cause the problem!</b></div><div><b>How I can fix it, do you have some ideas?</b></div><div style="position:relative;zoom:1"></div><div></div><br>在 2016-06-24 07:49:20,"huhai" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> 写道:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div>Thank you!Sure,I'll have a try!<br><br>发自我的 iPhone</div><div><br>在 2016年6月24日,06:44,chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>> 写道:<br><br></div><blockquote type="cite"><div><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Could you try my new patch?<br><div></div><div></div><br>At 2016-06-23 11:20:02,"steven.Hu" <<a href="mailto:huhai8274@163.com">huhai8274@163.com</a>> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>I found 'arm-linux' directory under 'build' directory, and I changed the 'crosscompile.cmake' to the following:</div><div><br></div><div><div># CMake toolchain file for cross compiling x265 for ARM arch</div><div># This feature is only supported as experimental. Use with caution.</div><div># Please report bugs on bitbucket</div><div># Run cmake with: cmake -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" ../../source && ccmake ../../source</div><div><br></div><div>set(CROSS_COMPILE_ARM 1)</div><div>set(CMAKE_SYSTEM_NAME Darwin)</div><div>set(CMAKE_SYSTEM_PROCESSOR armv7l)</div><div><br></div><div># specify the cross compiler</div><div>set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang)</div><div>set(CMAKE_CXX_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++)</div><div><br></div><div># specify the target environment</div><div>SET(CMAKE_FIND_ROOT_PATH  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/)</div></div><div><br></div><div>Then I run '<span style="line-height: 23.8px;">cmake -DCMAKE_TOOLCHAIN_FILE=crosscompile.cmake -G "Unix Makefiles" ../../source && ccmake ../../source</span><span style="line-height: 1.7;">' from the arm-linux directory, and I got the'Makefile' without any error info.</span></div><div><span style="line-height: 1.7;">But when run 'make', it reported many errors, which may be caused by incorrect headers including.I found the compiler uses the headers under '</span><b style="line-height: 1.7;">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</b><span style="line-height: 1.7;">', instead, it should use the headers under '</span>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/<span style="line-height: 1.7;">'.</span></div><div><span style="line-height: 1.7;">How can I fix it? Any suggestion would be appreciated!</span></div>







</div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>x265-devel mailing list</span><br><span><a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a></span><br><span><a href="https://mailman.videolan.org/listinfo/x265-devel">https://mailman.videolan.org/listinfo/x265-devel</a></span><br><span></span><br></div></blockquote></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span></blockquote></div></div></div></blockquote></div><br><br><span title="neteasefooter"><p> </p></span>