vaginessa / smali

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

Can't build on Mac OS X #209

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm trying to build smali on Mac OS X 10.9.2, JDK 1.8. This is what I got:

bogon:smali XiNGRZ$ ./gradlew build
:util:compileJava UP-TO-DATE
:util:processResources UP-TO-DATE
:util:classes UP-TO-DATE
:util:jar
:dexlib2:compileJava
/Users/XiNGRZ/Projects/Thirdparty/smali/dexlib2/src/main/java/org/jf/dexlib2/wri
ter/builder/BuilderClassDef.java:83: 错误: 对于copyOf(Iterable<CAP#1>), 
找不到合适的方法
        this.staticFields = ImmutableSortedSet.copyOf(Iterables.filter(fields, FieldUtil.FIELD_IS_STATIC));
                                              ^
    方法 ImmutableSet.<E#1>copyOf(E#1[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#1[]一致)
    方法 ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>)不适用
      (无法推断类型变量 E#2,T
        (参数不匹配; Iterable<CAP#2>无法转换为Iterable<? extends CAP#2>))
    方法 ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#3>一致)
    方法 ImmutableSet.<E#4>copyOf(Collection<? extends E#4>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#4>一致)
    方法 ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#5[]一致)
    方法 ImmutableSortedSet.<E#6>copyOf(E#6[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#6[]一致)
    方法 ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>)不适用
      (无法推断类型变量 E#7,T
        (参数不匹配; Iterable<CAP#3>无法转换为Iterable<? extends CAP#3>))
    方法 ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#8>一致)
    方法 ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#9>一致)
    方法 ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)不适用
      (无法推断类型变量 E#10
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)不适用
      (无法推断类型变量 E#11
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)不适用
      (无法推断类型变量 E#12
        (实际参数列表和形式参数列表长度不同))
  其中, E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12是类型变量:
    E#1扩展已在方法 <E#1>copyOf(E#1[])中声明的Object
    T扩展已在方法 <T>filter(Iterable<T>,Predicate<? super T>)中声明的Object
    E#2扩展已在方法 <E#2>copyOf(Iterable<? extends E#2>)中声明的Object
    E#3扩展已在方法 <E#3>copyOf(Iterator<? extends E#3>)中声明的Object
    E#4扩展已在方法 <E#4>copyOf(Collection<? extends E#4>)中声明的Object
    E#5扩展已在方法 <E#5>copyOf(E#5[])中声明的Object
    E#6扩展已在方法 <E#6>copyOf(E#6[])中声明的Comparable<? super E#6>
    E#7扩展已在方法 <E#7>copyOf(Iterable<? extends E#7>)中声明的Object
    E#8扩展已在方法 <E#8>copyOf(Collection<? extends E#8>)中声明的Object
    E#9扩展已在方法 <E#9>copyOf(Iterator<? extends E#9>)中声明的Object
    E#10扩展已在方法 <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)中声明的Object
    E#11扩展已在方法 <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)中声明的Object
    E#12扩展已在方法 <E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)中声明的Object
  其中, CAP#1,CAP#2,CAP#3是新类型变量:
    CAP#1从? extends BuilderField的捕获扩展BuilderField
    CAP#2从? extends BuilderField的捕获扩展BuilderField
    CAP#3从? extends BuilderField的捕获扩展BuilderField
/Users/XiNGRZ/Projects/Thirdparty/smali/dexlib2/src/main/java/org/jf/dexlib2/wri
ter/builder/BuilderClassDef.java:84: 错误: 对于copyOf(Iterable<CAP#1>), 
找不到合适的方法
        this.instanceFields = ImmutableSortedSet.copyOf(Iterables.filter(fields, FieldUtil.FIELD_IS_INSTANCE));
                                                ^
    方法 ImmutableSet.<E#1>copyOf(E#1[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#1[]一致)
    方法 ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>)不适用
      (无法推断类型变量 E#2,T
        (参数不匹配; Iterable<CAP#2>无法转换为Iterable<? extends CAP#2>))
    方法 ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#3>一致)
    方法 ImmutableSet.<E#4>copyOf(Collection<? extends E#4>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#4>一致)
    方法 ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#5[]一致)
    方法 ImmutableSortedSet.<E#6>copyOf(E#6[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#6[]一致)
    方法 ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>)不适用
      (无法推断类型变量 E#7,T
        (参数不匹配; Iterable<CAP#3>无法转换为Iterable<? extends CAP#3>))
    方法 ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#8>一致)
    方法 ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#9>一致)
    方法 ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)不适用
      (无法推断类型变量 E#10
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)不适用
      (无法推断类型变量 E#11
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)不适用
      (无法推断类型变量 E#12
        (实际参数列表和形式参数列表长度不同))
  其中, E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12是类型变量:
    E#1扩展已在方法 <E#1>copyOf(E#1[])中声明的Object
    T扩展已在方法 <T>filter(Iterable<T>,Predicate<? super T>)中声明的Object
    E#2扩展已在方法 <E#2>copyOf(Iterable<? extends E#2>)中声明的Object
    E#3扩展已在方法 <E#3>copyOf(Iterator<? extends E#3>)中声明的Object
    E#4扩展已在方法 <E#4>copyOf(Collection<? extends E#4>)中声明的Object
    E#5扩展已在方法 <E#5>copyOf(E#5[])中声明的Object
    E#6扩展已在方法 <E#6>copyOf(E#6[])中声明的Comparable<? super E#6>
    E#7扩展已在方法 <E#7>copyOf(Iterable<? extends E#7>)中声明的Object
    E#8扩展已在方法 <E#8>copyOf(Collection<? extends E#8>)中声明的Object
    E#9扩展已在方法 <E#9>copyOf(Iterator<? extends E#9>)中声明的Object
    E#10扩展已在方法 <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)中声明的Object
    E#11扩展已在方法 <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)中声明的Object
    E#12扩展已在方法 <E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)中声明的Object
  其中, CAP#1,CAP#2,CAP#3是新类型变量:
    CAP#1从? extends BuilderField的捕获扩展BuilderField
    CAP#2从? extends BuilderField的捕获扩展BuilderField
    CAP#3从? extends BuilderField的捕获扩展BuilderField
/Users/XiNGRZ/Projects/Thirdparty/smali/dexlib2/src/main/java/org/jf/dexlib2/wri
ter/builder/BuilderClassDef.java:85: 错误: 对于copyOf(Iterable<CAP#1>), 
找不到合适的方法
        this.directMethods = ImmutableSortedSet.copyOf(Iterables.filter(methods, MethodUtil.METHOD_IS_DIRECT));
                                               ^
    方法 ImmutableSet.<E#1>copyOf(E#1[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#1[]一致)
    方法 ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>)不适用
      (无法推断类型变量 E#2,T
        (参数不匹配; Iterable<CAP#2>无法转换为Iterable<? extends CAP#2>))
    方法 ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#3>一致)
    方法 ImmutableSet.<E#4>copyOf(Collection<? extends E#4>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#4>一致)
    方法 ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#5[]一致)
    方法 ImmutableSortedSet.<E#6>copyOf(E#6[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#6[]一致)
    方法 ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>)不适用
      (无法推断类型变量 E#7,T
        (参数不匹配; Iterable<CAP#3>无法转换为Iterable<? extends CAP#3>))
    方法 ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#8>一致)
    方法 ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#9>一致)
    方法 ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)不适用
      (无法推断类型变量 E#10
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)不适用
      (无法推断类型变量 E#11
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)不适用
      (无法推断类型变量 E#12
        (实际参数列表和形式参数列表长度不同))
  其中, E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12是类型变量:
    E#1扩展已在方法 <E#1>copyOf(E#1[])中声明的Object
    T扩展已在方法 <T>filter(Iterable<T>,Predicate<? super T>)中声明的Object
    E#2扩展已在方法 <E#2>copyOf(Iterable<? extends E#2>)中声明的Object
    E#3扩展已在方法 <E#3>copyOf(Iterator<? extends E#3>)中声明的Object
    E#4扩展已在方法 <E#4>copyOf(Collection<? extends E#4>)中声明的Object
    E#5扩展已在方法 <E#5>copyOf(E#5[])中声明的Object
    E#6扩展已在方法 <E#6>copyOf(E#6[])中声明的Comparable<? super E#6>
    E#7扩展已在方法 <E#7>copyOf(Iterable<? extends E#7>)中声明的Object
    E#8扩展已在方法 <E#8>copyOf(Collection<? extends E#8>)中声明的Object
    E#9扩展已在方法 <E#9>copyOf(Iterator<? extends E#9>)中声明的Object
    E#10扩展已在方法 <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)中声明的Object
    E#11扩展已在方法 <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)中声明的Object
    E#12扩展已在方法 <E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)中声明的Object
  其中, CAP#1,CAP#2,CAP#3是新类型变量:
    CAP#1从? extends BuilderMethod的捕获扩展BuilderMethod
    CAP#2从? extends BuilderMethod的捕获扩展BuilderMethod
    CAP#3从? extends BuilderMethod的捕获扩展BuilderMethod
/Users/XiNGRZ/Projects/Thirdparty/smali/dexlib2/src/main/java/org/jf/dexlib2/wri
ter/builder/BuilderClassDef.java:86: 错误: 对于copyOf(Iterable<CAP#1>), 
找不到合适的方法
        this.virtualMethods = ImmutableSortedSet.copyOf(Iterables.filter(methods, MethodUtil.METHOD_IS_VIRTUAL));
                                                ^
    方法 ImmutableSet.<E#1>copyOf(E#1[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#1[]一致)
    方法 ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>)不适用
      (无法推断类型变量 E#2,T
        (参数不匹配; Iterable<CAP#2>无法转换为Iterable<? extends CAP#2>))
    方法 ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#3>一致)
    方法 ImmutableSet.<E#4>copyOf(Collection<? extends E#4>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#4>一致)
    方法 ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#5[]一致)
    方法 ImmutableSortedSet.<E#6>copyOf(E#6[])不适用
      (不存在类型变量T的实例, 以使Iterable<T>与E#6[]一致)
    方法 ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>)不适用
      (无法推断类型变量 E#7,T
        (参数不匹配; Iterable<CAP#3>无法转换为Iterable<? extends CAP#3>))
    方法 ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Collection<? extends E#8>一致)
    方法 ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>)不适用
      (不存在类型变量T的实例, 以使Iterable<T>与Iterator<? extends E#9>一致)
    方法 ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)不适用
      (无法推断类型变量 E#10
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)不适用
      (无法推断类型变量 E#11
        (实际参数列表和形式参数列表长度不同))
    方法 ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)不适用
      (无法推断类型变量 E#12
        (实际参数列表和形式参数列表长度不同))
  其中, E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12是类型变量:
    E#1扩展已在方法 <E#1>copyOf(E#1[])中声明的Object
    T扩展已在方法 <T>filter(Iterable<T>,Predicate<? super T>)中声明的Object
    E#2扩展已在方法 <E#2>copyOf(Iterable<? extends E#2>)中声明的Object
    E#3扩展已在方法 <E#3>copyOf(Iterator<? extends E#3>)中声明的Object
    E#4扩展已在方法 <E#4>copyOf(Collection<? extends E#4>)中声明的Object
    E#5扩展已在方法 <E#5>copyOf(E#5[])中声明的Object
    E#6扩展已在方法 <E#6>copyOf(E#6[])中声明的Comparable<? super E#6>
    E#7扩展已在方法 <E#7>copyOf(Iterable<? extends E#7>)中声明的Object
    E#8扩展已在方法 <E#8>copyOf(Collection<? extends E#8>)中声明的Object
    E#9扩展已在方法 <E#9>copyOf(Iterator<? extends E#9>)中声明的Object
    E#10扩展已在方法 <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>)中声明的Object
    E#11扩展已在方法 <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>)中声明的Object
    E#12扩展已在方法 <E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>)中声明的Object
  其中, CAP#1,CAP#2,CAP#3是新类型变量:
    CAP#1从? extends BuilderMethod的捕获扩展BuilderMethod
    CAP#2从? extends BuilderMethod的捕获扩展BuilderMethod
    CAP#3从? extends BuilderMethod的捕获扩展BuilderMethod
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
4 个错误
:dexlib2:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexlib2:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED

Total time: 5.144 secs
bogon:smali XiNGRZ$

Original issue reported on code.google.com by chenxingyu92@gmail.com on 28 Apr 2014 at 11:25

GoogleCodeExporter commented 9 years ago
Can you try it with java 1.6 or 1.7 and see if that works? If so, then it's an 
issue with java 1.8 which I'll need to look into. Otherwise, if it doesn't work 
with 1.6 or 1.7, then it's likely an issue with your environment, although I 
don't have any idea why in that case.

Original comment by jesusfreke@jesusfreke.com on 28 Apr 2014 at 6:15

GoogleCodeExporter commented 9 years ago
Hi Freke,

I've switched to JDK 1.7 and it works. So it may be an issue with JDK 1.8

Original comment by chenxingyu92@gmail.com on 28 Apr 2014 at 6:49

GoogleCodeExporter commented 9 years ago
Great, thanks. At least you have a workaround for now. But I do plan on taking 
a look at why it won't compile with 1.8.

Original comment by jesusfreke@jesusfreke.com on 28 Apr 2014 at 7:39

GoogleCodeExporter commented 9 years ago
Have same problem on Windows. Jdk version 1.8.0_25

Original comment by android....@gmail.com on 11 Dec 2014 at 12:01

GoogleCodeExporter commented 9 years ago
You should be able to compile with jdk 1.8 now, as of 
https://code.google.com/p/smali/source/detail?r=d83c439ce21af246800f6ca4b184e3a3
dee1f08c

Original comment by jesusfreke@jesusfreke.com on 28 Dec 2014 at 10:16

GoogleCodeExporter commented 9 years ago

Original comment by jesusfreke@jesusfreke.com on 28 Dec 2014 at 10:19