qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

Build Fails with XCode 6.3 #243

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using XCode 6.3
2.  ./iosbuild.sh > build.log
3.

What is the expected output? What do you see instead?
Expected:
webp to compile
Actual:
configure: WARNING: gif library not available - no gif_lib.h
+ set +x
lossless_neon.c:276:22: error: implicit declaration of function 'vtbl1q_u8' is 
invalid in C99 [-Werror,-Wimplicit-function-declaration]
  return vcombine_u8(vtbl1q_u8(argb, vget_low_u8(shuffle)),
                     ^
lossless_neon.c:276:22: error: passing 'int' to parameter of incompatible type 
'uint8x8_t' (vector of 8 'uint8_t' values)
  return vcombine_u8(vtbl1q_u8(argb, vget_low_u8(shuffle)),
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolch
ain/usr/bin/../lib/clang/6.1.0/include/arm_neon.h:4039:39: note:
      passing argument to parameter '__p0' here
__ai uint8x16_t vcombine_u8(uint8x8_t __p0, uint8x8_t __p1) {
                                      ^
2 errors generated.
make[1]: *** [libwebpdsp_la-lossless_neon.lo] Error 1
make: *** [all-recursive] Error 1

What version of the product are you using? On what operating system?
master
OS X 10.10.2 
XCode 6.3

Please provide any additional information below.

I understand XCode 6.3 is not release but I saw this same regression in past 
change logs so it's something that might make it out of beta.

Original issue reported on code.google.com by aaroncre...@gmail.com on 18 Feb 2015 at 9:26

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This isn't related to issue #230, that was an incorrect prototype in arm_neon.h 
under gcc-4.8.

Until now Apple's clang has used non-standard 'vtbl?q_*' functions rather than 
'vtbl?_*'. If this sticks we'll need to adjust the workaround [1]. What's the 
build version with Xcode 6.3? Do you happen to have 6.2 installed to check the 
behavior there?

$ clang -E -dM - </dev/null |grep __apple_build_version__

[1] 
https://gerrit.chromium.org/gerrit/gitweb?p=webm/libwebp.git;a=blob;f=src/dsp/lo
ssless_neon.c;h=17dce9ab22b636e1db445820469999d82687c973;hb=496615555c2c324f9e09
ced858ef44a06b0b2d7d#l262

Original comment by jz...@google.com on 19 Feb 2015 at 3:12

GoogleCodeExporter commented 8 years ago
It does compile under 6.2, see versions.txt for version numbers
I can restore the build by adding [1] to the two places where non standard 
functions where used

So it seems the standard functions have been marked available for now.
I tried searching for a better way to check support than checking version 
numbers but I didn't see anything that stuck out to me see env.diff 

    $ clang -E -dM - </dev/null
    $ diff -wurp -N xcode6.3.txt xcode6.2.txt > env.diff

[1] defined(__apple_build_version__) && (__apple_build_version__< 6020037)

Original comment by aaroncre...@gmail.com on 19 Feb 2015 at 3:04

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for looking into this. I think the version check is the best you can do 
with the available defines. We can shift this to a configure check if it causes 
more problems.
Note from [1][2], it seems like this will be in the final version.

[1] 
http://adcdownload.apple.com//Developer_Tools/Xcode_6.3_beta/Xcode_6.3_beta_Rele
ase_Notes.pdf
[2] Apple LLVM Compiler Version 6.1
• Xcode 6.3 updates the Apple LLVM compiler to version 6.1.0. This new 
compiler includes full support for the
C++14 language standard, a wide range of enhanced warning diagnostics, and new 
optimizations. Support
for the arm64 architecture has been significantly revised to align with ARM’s 
implementation, where the most
visible impact is that a few of the vector intrinsics have changed to match 
ARM’s specifications.

Original comment by jz...@google.com on 19 Feb 2015 at 8:00

GoogleCodeExporter commented 8 years ago
The fix has been merged. Thanks again for the report!

https://gerrit.chromium.org/gerrit/#/c/73807/
602a00f fix iOS arm64 build with Xcode 6.3

Original comment by jz...@google.com on 20 Feb 2015 at 12:11