Closed GoogleCodeExporter closed 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
Hi,
Thanks for the response. Please be patient with me as I am new to this. I
decided to follow your instruction and download the source code and compile it
in Xcode. Here is what I did:
1) Download by svn checkout https://libyuv.googlecode.com/svn/trunk/ libyuv
2) Copy out the"source" and "include" folders and paste into an Xcode project
3) When I compile, it failed with error as reported in r1356. So I manually do
the change. My first question is : why isn't the change already in my current
revision, which is 1366?
4) Then I compile again and it skipped that first error. But then another bunch
came up on row_x86.asm:
CompileC
/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuv
iruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/te
stCompileLibyuv.build/Objects-normal/armv7/row_x86.o source/row_x86.asm normal
armv7 assembler-with-cpp com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/zekechan/Documents/Xcode/testCompileLibyuv
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x assembler-with-cpp -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fmodules -fmodules-cache-path=/Users/zekechan/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -fstrict-aliasing -Wdeprecated-declarations -g -Wno-sign-conversion -miphoneos-version-min=8.2 -iquote /Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/testCompileLibyuv-generated-files.hmap -I/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/testCompileLibyuv-own-target-headers.hmap -I/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/testCompileLibyuv-all-target-headers.hmap -iquote /Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/testCompileLibyuv-project-headers.hmap -iquoteinclude -iquoteinclude/libyuv -I/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/DerivedSources/armv7 -I/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/DerivedSources -F/Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Products/Debug-iphoneos -MMD -MT dependencies -MF /Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/Objects-normal/armv7/row_x86.d --serialize-diagnostics /Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/Objects-normal/armv7/row_x86.dia -c /Users/zekechan/Documents/Xcode/testCompileLibyuv/source/row_x86.asm -o /Users/zekechan/Library/Developer/Xcode/DerivedData/testCompileLibyuv-grteznkiuviruldloyrpccfctfcw/Build/Intermediates/testCompileLibyuv.build/Debug-iphoneos/testCompileLibyuv.build/Objects-normal/armv7/row_x86.o
/Users/zekechan/Documents/Xcode/testCompileLibyuv/source/row_x86.asm:2:18:
error: unexpected token in argument list
; Copyright 2012 The LibYuv Project Authors. All rights reserved.
....
Do you have a version that has been tested to compile on Xcode with ARM64? Any
help will be much appreciated.
Many thanks,
Zeke
Original comment by z...@integrityanalysis.com
on 13 Apr 2015 at 10:18
dont compile row_x86.asm. Thats intel assembly for yasm, which is not
supported... especially on Arm.
walking thru the normal procedure
create a .gclient for ios
solutions = [
{ "name" : "trunk",
"url" : "https://libyuv.googlecode.com/svn/trunk",
"deps_file" : "DEPS",
"managed" : True,
"custom_deps" : {
},
"safesync_url": "",
},
];target_os=['ios'];
note the target_os. then gclient sync
from src folder
a regular 32 bit build is
GYP_DEFINES="OS=ios target_arch=armv7" GYP_CROSSCOMPILE=1
GYP_GENERATOR_FLAGS="output_dir=out_ios" ./build/gyp_chromium -f ninja
--depth=. libyuv_test.gyp
ninja -j8 -C out_ios/Debug-iphoneos
ninja -j8 -C out_ios/Release-iphoneos
and a 64 bit build is
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
I do get warnings on 64 bit, but it builds okay.
I used r1366 thats current head version.
I noticed OSX for chrome has a build error, while it works okay for libyuv, so
thats likely a newer xcode/clang. Will file a bug and have a fix for that in
about an hour
Original comment by phthor...@gmail.com
on 13 Apr 2015 at 11:01
r1368 fixes osx build error - unused variable.
Original comment by fbarch...@chromium.org
on 14 Apr 2015 at 2:51
Hi, Many thanks for the prompt response, which enabled me to finally compile
iOS for ARM64 using Xcode 6.2 directly on the source code. Much much
appreciated! Here are the steps in case anyone else might find beneficial:
1) Download by svn checkout https://libyuv.googlecode.com/svn/trunk/ libyuv
2) Copy the"source" and "include" folders and paste into an Xcode project
3) Delete the two .asm files in source - they will not compile
4) Apply the change as reported in r1356 - now it should compile:
===================================================================
--- source/scale_neon.cc (revision 1355)
+++ source/scale_neon.cc (working copy)
@@ -920,7 +920,7 @@
// the x/dx stepping
#define LOAD1_DATA32_LANE(dn, n) \
"lsr %5, %3, #16 \n" \
- "add %6, %1, %5, lsl 2 \n" \
+ "add %6, %1, %5, lsl #2 \n" \
"add %3, %3, %4 \n" \
MEMACCESS(6) \
"vld1.32 {"#dn"["#n"]}, [%6] \n"
Thanks
Original comment by z...@integrityanalysis.com
on 14 Apr 2015 at 3:19
r1369 fixes the 2 issues you raised.
1. source/scale_neon64.cc does not have the fix applied. scale_neon.cc does.
// TODO(Yang Zhang): Investigate less load instructions for
// the x/dx stepping
#define LOAD1_DATA32_LANE(vn, n) \
"lsr %5, %3, #16 \n" \
"add %6, %1, %5, lsl 2 \n" \
"add %3, %3, %4 \n" \
MEMACCESS(6) \
"ld1 {"#vn".s}["#n"], [%6] \n"
2. the .asm files are not buildable.
all other source files are ifdefed so they can be compiled unconditionally.
If you have time, sync up and confirm it builds without changes.
Original comment by fbarch...@google.com
on 14 Apr 2015 at 8:11
Fixed in r1369. Thanks for the report!
Original comment by fbarch...@chromium.org
on 16 Apr 2015 at 7:52
Hi, I've downloaded the latest build (revision 1372) and I can confirm it
builds without changes. Please keep up with the good work! Thanks
Original comment by z...@integrityanalysis.com
on 16 Apr 2015 at 10:06
Original issue reported on code.google.com by
z...@integrityanalysis.com
on 9 Apr 2015 at 9:57