[Omni Q&A] ssuds:
Hit a new snag while building.

The build starts out fine. However, it only lasts about 5 minutes and then ends with:

make: *** No rule to make target `/home/shreyas/omni2/out/target/common/obj/JAVA_LIBRARIES/qcmediaplayer_intermediates/classes.jar', needed by `/home/shreyas/omni2/out/target/common/obj/PACKAGING/boot-jars-package-check_intermediates/stamp'. Stop.
make: *** Waiting for unfinished jobs....
logtags: /home/shreyas/omni2/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/src/src/java/com/android/internal/telephony/EventLogTags.java <= frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags
shreyas@shreyas-VirtualBox:~/omni2$

There's no ZIP in the Out>Target>Product>mb886 directory.

Same thing happens whether I use brunch mb886 or lunch mb886 and then mka...

Anyone have any ideas? [MENTION=3692819]TecknoFreak[/MENTION] maybe?

Edit:Think I might have got it, my javac version was on 1.7 and i switched it back to 1.6... we shall see.

Edit2: now it builds further but breaks on an audio blob

target thumb C: libalsa-intf <= hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c
hardware/qcom/audio/legacy/libalsa-intf/alsa_mixer.c:33:23: fatal error: sound/tlv.h: No such file or directory
#include <sound/tlv.h>
^
compilation terminated.
make: *** [/home/shreyas/omni2/out/target/product/mb886/obj/SHARED_LIBRARIES/libalsa-intf_intermediates/alsa_mixer.o] Error 1
make: *** Waiting for unfinished jobs....
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'pcm_avail':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:401:9: warning: format '%d' expects argument of type 'int', but argument 4 has type 'snd_pcm_uframes_t' [-Wformat=]
ALOGV("hw_ptr = %d buf_size = %d appl_ptr = %d\n",
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:401:9: warning: format '%d' expects argument of type 'int', but argument 6 has type 'snd_pcm_uframes_t' [-Wformat=]
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'dst_address':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:467:22: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
return pcm->addr + pcm_offset;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'mmap_transfer':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:471:57: warning: unused parameter 'offset' [-Wunused-parameter]
int mmap_transfer(struct pcm *pcm, void *data, unsigned offset,
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'mmap_transfer_capture':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:505:26: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
src_addr = pcm->addr + pcm_offset;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:492:65: warning: unused parameter 'offset' [-Wunused-parameter]
int mmap_transfer_capture(struct pcm *pcm, void *data, unsigned offset,
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'pcm_write_mmap':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:555:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((bytes_written >= pcm->sw_p->start_threshold) && (!pcm->start)) {
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:526:50: warning: unused parameter 'data' [-Wunused-parameter]
static int pcm_write_mmap(struct pcm *pcm, void *data, unsigned count)
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'enable_timer':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:668:8: warning: return makes integer from pointer without a cast [enabled by default]
return &bad_pcm;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:697:11: warning: return makes integer from pointer without a cast [enabled by default]
return &bad_pcm;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c: In function 'pcm_open':
hardware/qcom/audio/legacy/libalsa-intf/alsa_pcm.c:780:9: warning: return makes pointer from integer without a cast [enabled by default]
return -EINVAL;
^

real	25m34.029s
user	66m21.505s
sys	16m39.325s
shreyas@shreyas-VirtualBox:~/omni2$

tlv.h exists in my ~/omni2/kernel/motorola/msm8960-common/include/sound directory, same place it did for cm12 which built fine.

Edit3: Think I'm getting closer... Now I'm getting this

target thumb C++: libandroid_runtime <= frameworks/base/core/jni/android_view_TextureView.cpp
frameworks/base/core/jni/android_view_Surface.cpp: In function 'void android::nativeSetDirtyRect(JNIEnv*, jclass, jlong, jobject)':
frameworks/base/core/jni/android_view_Surface.cpp:206:14: error: 'class android::Surface' has no member named 'setDirtyRect'
surface->setDirtyRect(&rect);
^
make: *** [/home/shreyas/omni2/out/target/product/mb886/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_view_Surface.o] Error 1
make: *** Waiting for unfinished jobs....

real	4m8.158s
user	4m55.351s
sys	2m13.800s
shreyas@shreyas-VirtualBox:~/omni2$

Edit4: Found some very relevant stuff in this thread: http://xdaforums.com/omni/general/help-regarding-compiling-omnirom-cm-t2964759/page2

Edit5: Tweaked the surface.cpp as that thread recommended, see https://github.com/ssuds/android_frameworks_base/commit/84c26243dcfcba9aee824dfddd11b2a3405c006b

Now the tlv.h: No such file or directory error is back:

target thumb C: libalsa-intf <= hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c
target Prebuilt: am (/home/shreyas/omni2/out/target/product/mb886/obj/EXECUTABLES/am_intermediates/am)
hardware/qcom/audio/legacy/libalsa-intf/alsa_mixer.c:33:23: fatal error: sound/tlv.h: No such file or directory
#include <sound/tlv.h>
^
compilation terminated.
make: *** [/home/shreyas/omni2/out/target/product/mb886/obj/SHARED_LIBRARIES/libalsa-intf_intermediates/alsa_mixer.o] Error 1
make: *** Waiting for unfinished jobs....
Notice file: frameworks/base/cmds/am/NOTICE -- /home/shreyas/omni2/out/target/product/mb886/obj/NOTICE_FILES/src//system/bin/am.txt
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'snd_use_case_identifier':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:77:43: warning: unused parameter 'fmt' [-Wunused-parameter]
char *snd_use_case_identifier(const char *fmt, ...)
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'snd_use_case_free_list':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:89:40: warning: parameter 'list' set but not used [-Wunused-but-set-parameter]
int snd_use_case_free_list(const char *list[], int items)
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:89:52: warning: unused parameter 'items' [-Wunused-parameter]
int snd_use_case_free_list(const char *list[], int items)
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'snd_use_case_get_list':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:132:15: warning: assignment from incompatible pointer type [enabled by default]
*list = (char ***)uc_mgr->card_ctxt_ptr->verb_list;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:156:15: warning: assignment from incompatible pointer type [enabled by default]
*list = verb_list[verb_index].device_list;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:180:15: warning: assignment from incompatible pointer type [enabled by default]
*list = verb_list[verb_index].modifier_list;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'snd_use_case_apply_mixer_controls':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:792:65: warning: comparison between pointer and integer [enabled by default]
(check_devices_for_voice_call(uc_mgr, use_case) != NULL))
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'snd_use_case_mgr_reload':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:1986:49: warning: unused parameter 'uc_mgr' [-Wunused-parameter]
int snd_use_case_mgr_reload(snd_use_case_mgr_t *uc_mgr) {
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'print_list':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:3102:47: warning: unused parameter 'verb_index' [-Wunused-parameter]
static int print_list(card_mctrl_t *list, int verb_index, int count)
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'snd_ucm_parse_section':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:3303:13: warning: format '%d' expects a matching 'int' argument [-Wformat=]
ALOGV("Effects mixer ctl: %s: %d\n", list->effects_mixer_ctl);
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c: In function 'free_list':
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:3597:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
mindex < list[case_index].ena_mixer_list[index].value;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:3615:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
mindex < list[case_index].dis_mixer_list[index].value;
^
hardware/qcom/audio/legacy/libalsa-intf/alsa_ucm.c:3583:40: warning: unused parameter 'verb_index' [-Wunused-parameter]
void free_list(card_mctrl_t *list, int verb_index, int count)
^

real	12m37.998s
user	27m33.618s
sys	6m41.232s
shreyas@shreyas-VirtualBox:~/omni2$