bingerZhang / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Cannot build Libyuv ARM64 for iOS #423

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1) Visited this link:
https://sites.google.com/a/chromium.org/dev/developers/how-tos/depottools

then visited this link:
Howto: install the depot tools 
(https://sites.google.com/a/chromium.org/dev/developers/how-tos/install-depot-to
ols).

Then fetch depot_tools: 
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Add depot_tools to your PATH:
$ export PATH=`pwd`/depot_tools:"$PATH"

2) Went back to Getting Started Page 
(https://code.google.com/p/libyuv/wiki/GettingStarted)

Create a working directory, enter it, and run:
 gclient config http://libyuv.googlecode.com/svn/trunk 
 gclient sync

 This will take 1 hour to download the files. Then, I added:
 target_os=['ios']; 
 to .gclient (a hidden file)

 Then I run the following 2 times:
 gclient sync --nohooks 

 3) Then I follow the instruction at (http://www.chromium.org/developers/how-tos/build-instructions-ios)
 echo "{ 'GYP_DEFINES': 'OS=ios', 'GYP_GENERATORS': 'ninja,xcode-ninja', }" > chromium.gyp_env
 fetch ios
 (now it takes another 1.5 hour to download stuff)

 3) Now I move into the "trunk" directory:
 cd trunk

 Then enter:

 GYP_DEFINES="OS=ios target_arch=armv7 target_subarch=64" GYP_CROSSCOMPILE=1 GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv -f ninja --depth=. libyuv_test.gyp 
 ninja -j7 -C out_ios/Debug-iphoneos libyuv_unittest
 ninja -j7 -C out_ios/Release-iphoneos libyuv_unittest

 Then all errors came out
 ninja -j7 -C out_ios/Debug-iphoneos libyuv_unittest
ninja: Entering directory `out_ios/Debug-iphoneos'
[7/103] ACTION(host) Generating DVTiPhoneSimulatorRemoteClient.h
2015-04-09 21:45:50.407 class-dump[16565:4367335] Unknown load command: 
0x00000024
2015-04-09 21:45:50.408 class-dump[16565:4367335] Unknown load command: 
0x0000002a
2015-04-09 21:45:50.408 class-dump[16565:4367335] Unknown load command: 
0x00000026
2015-04-09 21:45:50.408 class-dump[16565:4367335] Unknown load command: 
0x00000029
2015-04-09 21:45:50.408 class-dump[16565:4367335] Unknown load command: 
0x0000002b
[8/103] ACTION(host) Generating CoreSimulator.h
2015-04-09 21:45:50.407 class-dump[16569:4367339] Unknown load command: 
0x00000024
2015-04-09 21:45:50.408 class-dump[16569:4367339] Unknown load command: 
0x0000002a
2015-04-09 21:45:50.408 class-dump[16569:4367339] Unknown load command: 
0x00000026
2015-04-09 21:45:50.408 class-dump[16569:4367339] Unknown load command: 
0x00000029
2015-04-09 21:45:50.408 class-dump[16569:4367339] Unknown load command: 
0x0000002b
[9/103] CXX obj/source/libyuv_neon.scale_neon.armv7.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF 
obj/source/libyuv_neon.scale_neon.armv7.o.d -DV8_DEPRECATION_WARNINGS 
-DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 
-DUSE_LIBJPEG_TURBO=1 -DENABLE_CONFIGURATION_POLICY 
-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY 
-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA 
-DCLD_VERSION=2 -DDISABLE_FTP_SUPPORT=1 -DUSE_LIBPCI=1 
-DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -Igen 
-I../../include -I../.. -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/SDKs/iPhoneOS8.2.sdk -O0 -gdwarf-2 -fvisibility=hidden -Wnewline-eof 
-miphoneos-version-min=7.0 -arch armv7 -Wendif-labels -Wno-unused-parameter 
-Wno-missing-field-initializers -Wno-selector-type-mismatch -Wheader-hygiene 
-Wno-char-subscripts -Wno-unneeded-internal-declaration 
-Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing 
-Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 
-stdlib=libc++ -fno-rtti -fno-exceptions -fvisibility-inlines-hidden 
-fno-threadsafe-statics -Xclang -load -Xclang 
/Users/documents/libyuvworkdir/trunk/third_party/llvm-build/Release+Asserts/lib/
libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs 
-Xclang -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order 
-Xclang -plugin-arg-find-bad-constructs -Xclang strict-virtual-specifiers 
-fcolor-diagnostics -fstack-protector-all -Wno-undefined-bool-conversion 
-Wno-tautological-undefined-compare  -c ../../source/scale_neon.cc -o 
obj/source/libyuv_neon.scale_neon.armv7.o
../../source/scale_neon.cc:935:5: error: expected immediate or register in 
shift operand
    LOAD1_DATA32_LANE(d0, 0)
    ^
../../source/scale_neon.cc:923:6: note: expanded from macro 'LOAD1_DATA32_LANE'
    "add        %6, %1, %5, lsl 2              \n"             \
     ^
<inline asm>:4:29: note: instantiated into assembly here
add        lr, r1, r12, lsl 2              

4) Now I try compiling only "libyuv" and not the unit test:
$ GYP_DEFINES="OS=ios target_arch=armv7 target_subarch=64" GYP_CROSSCOMPILE=1 
GYP_GENERATOR_FLAGS="output_dir=out_ios" ./gyp_libyuv -f ninja --depth=. 
libyuv.gyp 
Updating projects from gyp files...
$  ninja -j7 -C out_ios/Debug-iphoneos libyuv
ninja: Entering directory `out_ios/Debug-iphoneos'
[97/97] LIBTOOL-STATIC libyuv.a, POSTBUILDS
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.compare_posix.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.compare_win.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.convert_jpeg.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.mjpeg_decoder.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.rotate_mips.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.row_mips.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.row_posix.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.row_win.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.scale_mips.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.scale_posix.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7 file: 
arch/libyuv.armv7.a(libyuv.scale_win.armv7.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.compare_posix.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.compare_win.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.convert_jpeg.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.mjpeg_decoder.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.rotate_mips.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.row_mips.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.row_posix.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.row_win.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.scale_mips.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.scale_posix.armv7s.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/libtool: for architecture: armv7s file: 
arch/libyuv.armv7s.a(libyuv.scale_win.armv7s.o) has no symbols

What is the expected output? What do you see instead?
The unit test won't compile at all.  The one without unit test compiles but 
give errors with no symbols, and the final library is not usable.

What version of the product are you using? On what operating system?
xCode 6.2.  I am trying to build iOS

Please provide any additional information below.
I've tried the above procedure 3 times with no success... please help. Is it 
possible to just import a ready-made libyuv.a file that has all the necessary 
libraries for armv7,armv7s and arm64?  If so can you provide them so we don't 
have to do all the complex compilation?  arm64 is becoming compulsory for Apple 
app store submission so your urgent help will be greatly appreciated.

Original issue reported on code.google.com by z...@integrityanalysis.com on 9 Apr 2015 at 9:57

GoogleCodeExporter commented 9 years ago
This appears to be a duplicate of issue 420
https://code.google.com/p/libyuv/issues/detail?id=420
and should be fixed in r1356 and later.

The sync time is entirely chrome dependencies - the only actual code dependency 
is for jpeg - the rest is the build infrastructure and unittests.

You can very quickly get the source code:
svn checkout https://libyuv.googlecode.com/svn/trunk/ libyuv

if you dont need the build files or tests.  Then add it to your xcode project.
chrome infrastructure is switching to git, and libyuv will likely transition 
shortly. This will change a few things, no doubt.

The current site has binaries for the psnr tool.  Perhaps that can be expanded 
in the future.

Original comment by fbarch...@chromium.org on 13 Apr 2015 at 12:13