<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 id="divNeteaseMailCard"></div><br>在 2016-06-24 12:14:47,"steven.Hu" <huhai8274@163.com> 写道:<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>