[Q] build errors - One (M7) Q&A, Help & Troubleshooting

Hi Everyone,
I thought someone will be able to help. I'm getting those build errors when building cm11 from source. This is just at the end when building apks. Is it me or cm source?
Code:
In file included from external/chromium_org/content/common/android/hash_set.cc:5:0:
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:10:26: error: extra tokens at end of #ifndef directive [-Werror]
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:11:26: error: missing whitespace after the macro name [-Werror]
target thumb C++: content_content_common_gyp <= external/chromium_org/content/common/browser_rendering_stats.cc
target thumb C++: content_content_common_gyp <= external/chromium_org/content/common/cc_messages.cc
target thumb C++: content_content_common_gyp <= external/chromium_org/content/common/child_process_host_impl.cc
In file included from external/chromium_org/content/common/android/hash_set.cc:5:0:
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:24:20: error: expected initializer before '<' token
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:26:17: error: expected initializer before '<' token
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:29:22: error: expected '{' before '<' token
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:29:22: error: expected unqualified-id before '<' token
external/chromium_org/content/common/android/hash_set.cc:30:1: error: expected '}' at end of input
cc1plus: all warnings being treated as errors
make: *** [/root/cm/out/target/product/m7ul/obj/STATIC_LIBRARIES/content_content_common_gyp_intermediates/content/common/android/hash_set.o] Error 1
make: *** Waiting for unfinished jobs....

golcheck said:
Hi Everyone,
I thought someone will be able to help. I'm getting those build errors when building cm11 from source. This is just at the end when building apks. Is it me or cm source?
Code:
In file included from external/chromium_org/content/common/android/hash_set.cc:5:0:
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:10:26: error: extra tokens at end of #ifndef directive [-Werror]
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:11:26: error: missing whitespace after the macro name [-Werror]
target thumb C++: content_content_common_gyp <= external/chromium_org/content/common/browser_rendering_stats.cc
target thumb C++: content_content_common_gyp <= external/chromium_org/content/common/cc_messages.cc
target thumb C++: content_content_common_gyp <= external/chromium_org/content/common/child_process_host_impl.cc
In file included from external/chromium_org/content/common/android/hash_set.cc:5:0:
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:24:20: error: expected initializer before '<' token
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:26:17: error: expected initializer before '<' token
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:29:22: error: expected '{' before '<' token
/root/cm/out/target/product/m7ul/obj/GYP/shared_intermediates/content/jni/HashSet_jni.h:29:22: error: expected unqualified-id before '<' token
external/chromium_org/content/common/android/hash_set.cc:30:1: error: expected '}' at end of input
cc1plus: all warnings being treated as errors
make: *** [/root/cm/out/target/product/m7ul/obj/STATIC_LIBRARIES/content_content_common_gyp_intermediates/content/common/android/hash_set.o] Error 1
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
Try this
http://www.playfuldroidz.com/wiki/How_to_Fix_HashSet_Issues_Building_Android

crt60 said:
Try this
http://www.playfuldroidz.com/wiki/How_to_Fix_HashSet_Issues_Building_Android
Click to expand...
Click to collapse
It was actually my fault. Was building with Java 7. Switched back to Java 6 and all good now. Thanks anyway

Build issues with openjdk-6-jdk_6b30
Hi,
just wanted to mention that I got the very same issue, introduced by a system update which also did update the jdk to 6b30. Took me some time to figure out that this was the actual issue, and it could only be resolved by switching back to 6b27 (which I had installed before)
Just in case someone comes across the same issue on Ubuntu precise, go back instantly and don't lose that much time as I did looking for the root cause somewhere else.
Interestingly, the newer raring, swarty releases are still on 6b27

Related

[Q] Help compiling the kernel

Hey everyone,
So I'm attempting to compile the kernel from source for the Nexus One and I'm almost there but run into this problem on "make"
$ make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
scripts/mod/mk_elfconfig.c:4:17: error: elf.h: No such file or directory
scripts/mod/mk_elfconfig.c: In function ‘main’:
scripts/mod/mk_elfconfig.c:9: error: ‘EI_NIDENT’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:9: error: (Each undeclared identifier is reported only once
scripts/mod/mk_elfconfig.c:9: error: for each function it appears in.)
scripts/mod/mk_elfconfig.c:16: error: ‘ELFMAG’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:16: error: ‘SELFMAG’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:20: error: ‘EI_CLASS’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:21: error: ‘ELFCLASS32’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:24: error: ‘ELFCLASS64’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:30: error: ‘EI_DATA’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:31: error: ‘ELFDATA2LSB’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:34: error: ‘ELFDATA2MSB’ undeclared (first use in this function)
scripts/mod/mk_elfconfig.c:9: warning: unused variable ‘ei’
make[2]: *** [scripts/mod/mk_elfconfig] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
Click to expand...
Click to collapse
I'm not really finding a lot of information in regards to Nexus One kernel development :-/
Edit: Solved!
This is for Mac OS X
1. I needed to reference in my $path /Android NDK directory/prebuilt/darwin-x86/toolchain/arm-eabi-4.4.0/bin instead of /linux-x86/
2. I needed to add a file: "elf.h" to /kernel repository/scripts/mod/
Data for the file here -> http://www.rockbox.org/tracker/9006?getfile=16683
3. I needed to change #include <elf.h> to #include "elf.h" in the following files in /kernel repository/scripts/mod/: mk_elfconfig.c and modpost.h
Original link that sort of helped halfway: http://comments.gmane.org/gmane.comp.handhelds.android.kernel/383
This trick still works!
I got mine from:
http://www.opensource.apple.com/source/dtrace/dtrace-90/sys/elf.h
Needed it to compile for Galaxy Nexus (maguro).
RMGeren said:
I got mine from:
http://www.opensource.apple.com/source/dtrace/dtrace-90/sys/elf.h
Needed it to compile for Galaxy Nexus (maguro).
Click to expand...
Click to collapse
when I build the francciscofranco's jb 4.1 kernel for google nexus, the OP's elf.h works fine for me.
but yours failed, got some error message like this.
Code:
scripts/mod/modpost.c:1487: error: ‘R_386_32’ undeclared (first use in this function)
scripts/mod/modpost.c:1487: error: (Each undeclared identifier is reported only once
scripts/mod/modpost.c:1487: error: for each function it appears in.)
scripts/mod/modpost.c:1490: error: ‘R_386_PC32’ undeclared (first use in this function)

[Q] [Progressing] Building ubuntu touch for galaxy tab p1000

Hi,
Has anyone tried building Ubuntu touch developer preview for P1000 ? I have tried and setup the repos as per https://wiki.ubuntu.com/Touch/Porting
Added manifest for Kernel and device (Humberos's Git hub)
while I try to build get this:
Code:
host C: libmincrypt <= system/core/libmincrypt/sha.c
system/core/libmincrypt/sha.c: In function 'SHA_update':
system/core/libmincrypt/sha.c:153:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
target thumb C: libcrypto <= external/openssl/crypto/evp/m_ripemd.c
external/openssl/crypto/evp/m_ripemd.c:96:2: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/evp/m_ripemd.c:96:2: warning: (near initialization for 'ripemd160_md.md_ctrl') [-Wmissing-field-initializers]
target thumb C: libcrypto <= external/openssl/crypto/pem/pem_seal.c
target thumb C: libcrypto <= external/openssl/crypto/srp/srp_lib.c
target thumb C++: libstlport <= external/stlport/src/strstream.cpp
make: *** No rule to make target `/home/ravindran/sgtubuntu/out/target/product/p1/obj/SHARED_LIBRARIES/libs3cjpeg_intermediates/export_includes', needed by `/home/ravindran/sgtubuntu/out/target/product/p1/obj/SHARED_LIBRARIES/camera.s5pc110_intermediates/import_includes'. Stop.
make: *** Waiting for unfinished jobs....
Any suggestions?
hi, have you made any progress of your build? ... i'm quite interrested in testing ubuntu on my old tab
br, andy
No progress
Neubi said:
hi, have you made any progress of your build? ... i'm quite interrested in testing ubuntu on my old tab
br, andy
Click to expand...
Click to collapse
No progress.. In fact I have gone 2 steps backwards after trying to remove the local manifest entries..
now even repo sync is failing
~/sgtubuntu$ repo sync
Fetching projects: 14% (20/141) fatal: Couldn't find remote ref refs/heads/phablet-10.1
fatal: Couldn't find remote ref refs/heads/phablet-10.1
error: Cannot fetch humberos/android_device_samsung_p1
Click to expand...
Click to collapse
Getting a Nexus 4 by weekend :cyclops: so maybe will try with that first and then resume sgt7
Ok.. Just pursuing this...
Undoed all the extras.. & tried a build of Nexus4 and it successfully built an image
comparing .repo of both cm10 and the Ubuntu one...did some changes..
Now getting:
~/sgtubuntu$ repo sync
Fetching projects: 14% (20/141) fatal: Couldn't find remote ref refs/heads/phablet-10.1
fatal: Couldn't find remote ref refs/heads/phablet-10.1
error: Cannot fetch CyanogenMod/android_device_samsung_p1
Click to expand...
Click to collapse
manually symlinked kernel & device folders...did a "brunch p1"
and getting a similiar error as earlier :
target thumb C: libbusybox <= external/busybox/miscutils/setserial.c
target thumb C: libcrypto_static <= external/openssl/crypto/ex_data.c
target thumb C: libcrypto_static <= external/openssl/crypto/bio/bss_bio.c
target thumb C: libcrypto_static <= external/openssl/crypto/dsa/dsa_ossl.c
target thumb C: libcrypto_static <= external/openssl/crypto/evp/e_null.c
target thumb C: libcrypto_static <= external/openssl/crypto/hmac/hm_ameth.c
external/openssl/crypto/hmac/hm_ameth.c:166:2: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/hmac/hm_ameth.c:166:2: warning: (near initialization for 'hmac_asn1_meth.item_verify') [-Wmissing-field-initializers]
target thumb C: libcrypto_static <= external/openssl/crypto/pem/pvkfmt.c
target thumb C++: libpixelflinger_static <= system/core/libpixelflinger/tinyutils/VectorImpl.cpp
make: Circular /home/ravindran/sgtubuntu/out/target/product/p1/recovery/root.ts <- /home/ravindran/sgtubuntu/out/target/product/p1/kernel dependency dropped.
make: *** No rule to make target `/home/ravindran/sgtubuntu/out/target/common/obj/APPS/framework-res_intermediates/src/R.stamp', needed by `/home/ravindran/sgtubuntu/out/target/common/obj/APPS/P1Parts_intermediates/src/R.stamp'. Stop.
make: *** Waiting for unfinished jobs....
Click to expand...
Click to collapse
checking on this "make: Circular /home/ravindran/sgtubuntu/out/target/product/p1/recovery/root.ts <- /home/ravindran/sgtubuntu/out/target/product/p1/kernel dependency dropped." ...
any ideas ???
There are lots of dependencies on out/target/common/obj/*
i.e. APPS/ JAVA_LIBRARIES/ PACKAGING/
Guessing the ubuntu repo will not include these....
Progressing...
ravindrank said:
There are lots of dependencies on out/target/common/obj/*
i.e. APPS/ JAVA_LIBRARIES/ PACKAGING/
Guessing the ubuntu repo will not include these....
Click to expand...
Click to collapse
After a lot of googling and read xda threads of porting CM, I'm moving and it is not compiling...
Will port the solution soon once I see the it compiles successfully
I'm not expecting to to give me .zip but who knows
Compiles Successfuly
ravindrank said:
After a lot of googling and read xda threads of porting CM, I'm moving and it is not compiling...
Will port the solution soon once I see the it compiles successfully
I'm not expecting to to give me .zip but who knows
Click to expand...
Click to collapse
Ok... So it compiles and I get a .zip But it doesnt boot yet checking

[Q] Error compiling CM-10.1

Hello all. I'm trying to compile the latest CM-10.1 according to Hashcode's instructions found in http://forum.xda-developers.com/showthread.php?t=2245335 I keep getting the following error messages:
Code:
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/AMRExtractor.cpp
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::setSupportedOutputFormat()':
frameworks/av/media/libstagefright/ACodec.cpp:1584:5: warning: comparison between 'OMX_COLOR_FORMATTYPE {aka enum OMX_COLOR_FORMATTYPE}' and 'enum OMX_TI_COLOR_FORMATTYPE' [-Wenum-compare]
frameworks/av/media/libstagefright/ACodec.cpp:1584:5: error: 'OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m' was not declared in this scope
frameworks/av/media/libstagefright/AMRExtractor.cpp: In member function 'virtual android::status_t android::AMRSource::read(android::MediaBuffer**, const android::MediaSource::ReadOptions*)':
frameworks/av/media/libstagefright/AMRExtractor.cpp:262:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/AMRWriter.cpp
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/AudioPlayer.cpp
make: *** [/android/kfhd7/cm10.1/out/target/product/tate/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
Anyone else having problems compiling? I tried to add various includes to ACodec.cpp without avail. Any pointers would be much appreciated!
csosbee said:
Hello all. I'm trying to compile the latest CM-10.1 according to Hashcode's instructions found in http://forum.xda-developers.com/showthread.php?t=2245335 I keep getting the following error messages:
Code:
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/AMRExtractor.cpp
frameworks/av/media/libstagefright/ACodec.cpp: In member function 'android::status_t android::ACodec::setSupportedOutputFormat()':
frameworks/av/media/libstagefright/ACodec.cpp:1584:5: warning: comparison between 'OMX_COLOR_FORMATTYPE {aka enum OMX_COLOR_FORMATTYPE}' and 'enum OMX_TI_COLOR_FORMATTYPE' [-Wenum-compare]
frameworks/av/media/libstagefright/ACodec.cpp:1584:5: error: 'OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m' was not declared in this scope
frameworks/av/media/libstagefright/AMRExtractor.cpp: In member function 'virtual android::status_t android::AMRSource::read(android::MediaBuffer**, const android::MediaSource::ReadOptions*)':
frameworks/av/media/libstagefright/AMRExtractor.cpp:262:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/AMRWriter.cpp
target thumb C++: libstagefright <= frameworks/av/media/libstagefright/AudioPlayer.cpp
make: *** [/android/kfhd7/cm10.1/out/target/product/tate/obj/SHARED_LIBRARIES/libstagefright_intermediates/ACodec.o] Error 1
make: *** Waiting for unfinished jobs....
Anyone else having problems compiling? I tried to add various includes to ACodec.cpp without avail. Any pointers would be much appreciated!
Click to expand...
Click to collapse
Hello,
I fixed it
Here: https://github.com/Ntemis/android_device_bn_acclaim/commit/d89cf35ab6d139e27cd131e9fda971f92a66ff43
Thank you for the patch! :good:

[Q] Headers location missing during the build process

Hi Team,
I am trying to build the ROM from AOSP Source based on 5.1.1.
Till now the build was going fine but now I am facing issue with compilation errors.
The QCOM stuff creating these error because each files in the folder hardware/qcom/display/msm8974 missing the reference to compiler header file/location.
So I don't want to amend each reference to point specifically. I know where the files are located but compiler not picking it up.
E.G: #include <media/msm_media_info.h>
All the stuff available on >> hardware/qcom/msm8x74
Can someone please guide me like which ENV variable I need to check?? or which .mk file I need to amend ??
*********************************
target thumb C++: libmemalloc <= hardware/qcom/display/msm8974/libgralloc/ionalloc.cpp
target thumb C++: libmemalloc <= hardware/qcom/display/msm8974/libgralloc/alloc_controller.cpp
hardware/qcom/display/msm8974/libgralloc/alloc_controller.cpp:41:34: fatal error: media/msm_media_info.h: No such file or directory
#include <media/msm_media_info.h>
^
compilation terminated.
build/core/binary.mk:620: recipe for target 'out/target/product/cancro/obj/SHARED_LIBRARIES/libmemalloc_intermediates/alloc_controller.o' failed
make: *** [out/target/product/cancro/obj/SHARED_LIBRARIES/libmemalloc_intermediates/alloc_controller.o] Error 1
make: *** Waiting for unfinished jobs....
*********************************

Cant Compile inbuild kernel for Cm13

Hello guys i just set up build environment for cm13 the non caf version,cant build kernel from that getting error
this is the error
HTML:
target thumb C++: libbase <= system/core/base/logging.cpp
target thumb C++: liblog <= system/core/liblog/log_time.cpp
target thumb C: liblog <= system/core/liblog/logd_write.c
target thumb C: liblog <= system/core/liblog/log_event_write.c
target thumb C: liblog <= system/core/liblog/event_tag_map.c
In file included from bionic/libc/include/stdatomic.h:156:0,
from system/core/liblog/logd_write.c:25:
bionic/libc/include/uchar.h:40:35: error: unknown type name 'char16_t'
size_t c16rtomb(char* __restrict, char16_t, mbstate_t* __restrict);
^
bionic/libc/include/uchar.h:41:35: error: unknown type name 'char32_t'
size_t c32rtomb(char* __restrict, char32_t, mbstate_t* __restrict);
^
bionic/libc/include/uchar.h:42:17: error: unknown type name 'char16_t'
size_t mbrtoc16(char16_t* __restrict,
^
bionic/libc/include/uchar.h:46:17: error: unknown type name 'char32_t'
size_t mbrtoc32(char32_t* __restrict,
^
In file included from system/core/liblog/logd_write.c:25:0:
bionic/libc/include/stdatomic.h:367:11: error: expected specifier-qualifier-list before 'char16_t'
typedef _Atomic(char16_t) atomic_char16_t;
^
bionic/libc/include/stdatomic.h:368:11: error: expected specifier-qualifier-list before 'char32_t'
typedef _Atomic(char32_t) atomic_char32_t;
^
build/core/binary.mk:816: recipe for target '/home/preshot2989/android/out/target/product/hammerhead/obj/STATIC_LIBRARIES/liblog_intermediates/logd_write.o' failed
make: *** [/home/preshot2989/android/out/target/product/hammerhead/obj/STATIC_LIBRARIES/liblog_intermediates/logd_write.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
#### make failed to build some targets (04:45 (mm:ss)) ####
Using default toolchain for kernel GCC 4.8

Categories

Resources