[Android] Joeisgood99:
Hi Guys.

When building omnirom I get this error

target Symbolic: libutils_32 (/home/ben/Android-TWRP-Factory-6.0/out/target/product/suzuran/symbols/system/lib/libutils.so)

Building with Jack: /home/ben/Android-TWRP-Factory-6.0/out/target/common/obj/APPS/BluetoothMidiService_intermediates/with-local/classes.dex

target Pack Relocations: libLLVM_32 (/home/ben/Android-TWRP-Factory-6.0/out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libLLVM_intermediates/PACKED/libLLVM.so)

frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/doze/ProximitySensorManager.java:25: error: package javax.annotation.concurrent does not exist

import javax.annotation.concurrent.GuardedBy;

^

frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/doze/ProximitySensorManager.java:82: error: cannot find symbol

[MENTION=1367841]guarde[/MENTION]dBy("this") private State mLastState;

^

symbol: class GuardedBy

location: class ProximitySensorEventListener

frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/doze/ProximitySensorManager.java:87: error: cannot find symbol

[MENTION=1367841]guarde[/MENTION]dBy("this") private boolean mWaitingForFarState;

^

symbol: class GuardedBy

location: class ProximitySensorEventListener

frameworks/base/packages/SystemUI/tests/../src/com/android/systemui/doze/ProximitySensorManager.java:178: error: cannot find symbol

[MENTION=1367841]guarde[/MENTION]dBy("this")

^

symbol: class GuardedBy

location: class ProximitySensorEventListener

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

4 errors

build/core/java.mk:394: recipe for target '/home/ben/Android-TWRP-Factory-6.0/out/target/common/obj/APPS/SystemUITests_intermediates/classes-full-debug.jar' failed

make: *** [/home/ben/Android-TWRP-Factory-6.0/out/target/common/obj/APPS/SystemUITests_intermediates/classes-full-debug.jar] Error 41

make: *** Waiting for unfinished jobs....

INFO: Compaction : 147456 bytes

DroidDoc took 16 sec. to write docs to /home/ben/Android-TWRP-Factory-6.0/out/target/common/docs/api-stubs

DroidDoc took 18 sec. to write docs to /home/ben/Android-TWRP-Factory-6.0/out/target/common/docs/system-api-stubs

#### make failed to build some targets (02:05:47 (hh:mm:ss)) ####

Iv checked in source/external/jar305/..../javax/annotation/concurrent/GuardedBy. Its there.

When building AOSP 6.0 I get this error

Install: out/target/product/suzuran/system/lib64/libdl.so

out/host/linux-x86/bin/checkseapp -p out/target/product/suzuran/obj/ETC/sepolicy_intermediates/sepolicy -o out/target/product/suzuran/obj/ETC/seapp_contexts_intermediates/seapp_contexts out/target/product/suzuran/obj/ETC/seapp_contexts_intermediates/seapp_contexts.tmp

libsepol.context_from_record: type sysfs_uio is not defined

libsepol.context_from_record: could not create context structure

libsepol.context_from_string: could not create context structure

libsepol.sepol_context_to_sid: could not convert u:object_r:sysfs_uio:s0 to sid

out/target/product/suzuran/obj/ETC/file_contexts_intermediates/file_contexts: line 792 has invalid context u:object_r:sysfs_uio:s0

Invalid context file found in out/target/product/suzuran/obj/ETC/file_contexts_intermediates/file_contexts

external/sepolicy/Android.mk:141: recipe for target 'out/target/product/suzuran/obj/ETC/file_contexts_intermediates/file_contexts' failed

make: *** [out/target/product/suzuran/obj/ETC/file_contexts_intermediates/file_contexts] Error 5

make: *** Deleting file 'out/target/product/suzuran/obj/ETC/file_contexts_intermediates/file_contexts'

make: *** Waiting for unfinished jobs....

Install: out/target/product/suzuran/root/sepolicy

warning: string 'gsm_alphabet_default_charset' has no default translation.

frameworks/base/core/res/res/values/public.xml:923: warning: No comment for public symbol android:anim/accelerate_decelerate_interpolator

frameworks/base/core/res/res/values/public.xml:1141: warning: No comment for public symbol android:anim/anticipate_interpolator

frameworks/base/core/res/res/values/public.xml:1143: warning: No comment for public symbol android:anim/anticipate_overshoot_interpolator

frameworks/base/core/res/res/values/public.xml:1144: warning: No comment for public symbol android:anim/bounce_interpolator

frameworks/base/core/res/res/values/public.xml:1243: warning: No comment for public symbol android:anim/cycle_interpolator

.....

frameworks/base/core/res/res/values/public.xml:2304: warning: No comment for public symbol android:style/Widget.Toolbar

frameworks/base/core/res/res/values/public.xml:2305: warning: No comment for public symbol android:style/Widget.Toolbar.Button.Navigation

frameworks/base/core/res/res/values/public.xml:652: warning: No comment for public symbol android:style/Widget.WebView

#### make failed to build some targets (01:27:59 (hh:mm:ss)) ####

...I have no idea as to the real cause of this problem.

And when I try to build a toolchain (UberTC) I get this error

../.././../gmp/gmp-uber/printf/repl-vsnprintf.c:396:0: warning: ISO C forbids an empty translation unit [-Wpedantic]

#endif /* ! HAVE_VSNPRINTF */

^

make[1]: warning: -jN forced in submake: disabling jobserver mode.

/home/ben/ubertc/isl/isl-uber/missing: line 81: aclocal-1.14: command not found

WARNING: 'aclocal-1.14' is missing on your system.

You should only need it if you modified 'acinclude.m4' or

'configure.ac' or m4 files included by 'configure.ac'.

The 'aclocal' program is part of the GNU Automake package:

<http://www.gnu.org/software/automake>

It also requires GNU Autoconf, GNU m4 and Perl in order to run:

<http://www.gnu.org/software/autoconf>

<http://www.gnu.org/software/m4/>

<http://www.perl.org/>

make[1]: *** [.././../isl/isl-uber/aclocal.m4] Error 127

make: *** [stmp-build-host-isl] Error 2

make: *** Waiting for unfinished jobs....

I checked and the Automake package is installed........

On Ubuntu 15.04 I could compile AOSP, CM 12.1, Omnirom 6.0. and various tool chains with no issues.

I resolved the linker issue by symlink /usr/bin/ld.gold, to prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld, then I installed java-7-openjdk-amd64 using

sudo update-alternatives --config java

sudo update-alternatives --config javac to set java7 as default.

I used nano to set JAVA_HOME="java-7-openjdk-amd64" in /etc/environment

Honestly the:"package javax.annotation.concurrent does not exist" error stumps me as well as the others.

Re changing java versions, I found this script that could be helpful. https://github.com/michaelklishin/jdk_switcher

EDIT: Was able to build AOSP 6.0-R42 and Omnirom for Sony Z5c by deleting and re downloading the entire repo, symlink /usr/bin/x86_64-linux-gnu-ld.gold to prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld. compiled fine.