GCC 5 for i9100/I9300/N7100 - Galaxy Note II, Galaxy S III Developer Discussion

Hy guyz , i'm trying to compile ROM with uber 5.3.1 but it gave me this error:
Code:
target thumb C: libbacktrace <= system/core/libbacktrace/thread_utils.c
target StaticLib: libziparchive (/home/suzuki/cm13.0/out/target/product/i9300/obj/STATIC_LIBRARIES/libziparchive_intermediates/libziparchive.a)
target SharedLib: libexpat (/home/suzuki/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libexpat_intermediates/LINKED/libexpat.so)
target thumb C++: libui <= frameworks/native/libs/ui/Fence.cpp
frameworks/base/libs/androidfw/ResourceTypes.cpp: In member function 'android::status_t android::ResStringPool::setTo(const void*, size_t, bool)':
frameworks/base/libs/androidfw/ResourceTypes.cpp:571:28: error: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Werror=parentheses]
(!mHeader->flags&ResStringPool_header::UTF8_FLAG &&
^
cc1plus: all warnings being treated as errors
make: *** [/home/suzuki/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libandroidfw_intermediates/ResourceTypes.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/suzuki/cm13.0'
coul'd someone help me out with it? Thanks in advance
Edit: all i need is the files i need to change to make the toolchain work , i don't care how many they are

ok , so i found out that the error is in android_frameworks_base/libs/androidfw/ResourceTypes.cpp in the line
Code:
if ((mHeader->flags&ResStringPool_header::UTF8_FLAG &&
((uint8_t*)mStrings)[mStringPoolSize-1] != 0) ||
(!mHeader->flags&ResStringPool_header::UTF8_FLAG &&
((uint16_t*)mStrings)[mStringPoolSize-1] != 0)) {
ALOGW("Bad string block: last string is not 0-terminated\n");
return (mError=BAD_TYPE);
can someone tell me how to fix it? thx in advance

Hello! I'm not much of a ROM Developer (I can only basically merge ROM sources and device-tree) but here's the original source code from AOSP, it might help :
https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp
Line 561 onwards is where your error is
Hope I helped and again, I'm not a professional developer so don't expect too much from me

Jericho Arcelao said:
Hello! I'm not much of a ROM Developer (I can only basically merge ROM sources and device-tree) but here's the original source code from AOSP, it might help :
https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp
Line 561 onwards is where your error is
Hope I helped and again, I'm not a professional developer so don't expect too much from me
Click to expand...
Click to collapse
Well it is the same line CM has to , but thanks anyway for trying at last

Most of the rom is compiling now by cherry-picking this , this and this, but now i'm stuck to this error
Code:
[COLOR="Green"]target SharedLib:[/COLOR] libhwconverter (/home/rpdroky/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libhwconverter_intermediates/LINKED/libhwconverter.so)
/home/rpdroky/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libhwconverter_intermediates/HardwareConverter.o:HardwareConverter.cpp:function HardwareConverter::HardwareConverter(): error: undefined reference to 'SecFimc::create(SecFimc::DEV, SecFimc::MODE, int)'
collect2: error: ld returned 1 exit status
make: *** [/home/rpdroky/cm13.0/out/target/product/i9300/obj/SHARED_LIBRARIES/libhwconverter_intermediates/LINKED/libhwconverter.so] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/rpdroky/cm13.0'
i guess this is the last one , hopefully someone can help me out with it

This is the problematic line is in /hardware/samsung/exynos4/hal/libhwconverter/HardwareConverter.cpp , if you remove this line , the rom will compile but i dont know if there are side efects by removeing it ...
Code:
{
SecFimc* handle_fimc = new SecFimc();
mSecFimc = (void *)handle_fimc;
if (handle_fimc->create(SecFimc::DEV_0, SecFimc::MODE_MULTI_BUF, 1) == false)
bHWconvert_flag = 0;
else
bHWconvert_flag = 1;
}
Edit: The camera is force closeing and some apps crash , all the rest works
Cheers :highfive:

Compile zimage gcc5-6
Compile zimage gcc5-6 n7100 Marshmalow
Build Omni Rom N7100 Marshmallow with ubergcc5.3.1 optimized

Kernel dtb.img for n7100 AOSP, CM13

Related

[Q] Problems compiling stock Kernel from official source.

Hi all.
I run into some problems when trying to build a Kernel from GT-N8000_KK_Opensource.zip (opensource.samsung.com).
I can compile the kernel with the defconfig shipped with the source code (p4notepq-w_00_defconfig) without any changes and i get a fully functional kernel and modules.
My aim is to compile driver modules for my usb-wlan-dongle TP-LINK TL-WN722N. That are the ath9k n ath9k_htc modules (also mac80211 module is needed).
I did the following changes to enable the ath9k and ath9k_htc in menuconfig
Code:
file drivers/net/wireless/ath/Makefile :
added: obj-$(CONFIG_ATH9K_HW) += ath9k/
file drivers/net/wireless/ath/Kconfig :
added: source "drivers/net/wireless/ath/ath9k/Kconfig
Also i removed Wall flags from Makefile and inserted some -Wno-error to get rid off some additional warnings.
To get rid off
Code:
include/linux/device.h:722:38: error: 'THIS_MODULE' undeclared (first use in this function)
i inserted my kernel export.h in the compat include.
Now i got the following error unsolved:
Code:
drivers/net/wireless/ath/ath9k/beacon.c: In function 'ath_beacon_setup':
drivers/net/wireless/ath/ath9k/beacon.c:109: error: 'struct ath_common' has no member named 'tx_chainmask'
make[5]: *** [drivers/net/wireless/ath/ath9k/beacon.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
My Build environment is:
Ubuntu 14.4.01 64bit in a VM with 8gb ram.
Toolchain used:
arm-eabi-4.4.3
Maybe someone can give me some advice how to get this module compiled.
Thanks in advance
smue83 said:
Hi all.
I run into some problems when trying to build a Kernel from GT-N8000_KK_Opensource.zip (opensource.samsung.com).
I can compile the kernel with the defconfig shipped with the source code (p4notepq-w_00_defconfig) without any changes and i get a fully functional kernel and modules.
My aim is to compile driver modules for my usb-wlan-dongle TP-LINK TL-WN722N. That are the ath9k n ath9k_htc modules (also mac80211 module is needed).
I did the following changes to enable the ath9k and ath9k_htc in menuconfig
Code:
file drivers/net/wireless/ath/Makefile :
added: obj-$(CONFIG_ATH9K_HW) += ath9k/
file drivers/net/wireless/ath/Kconfig :
added: source "drivers/net/wireless/ath/ath9k/Kconfig
Also i removed Wall flags from Makefile and inserted some -Wno-error to get rid off some additional warnings.
To get rid off
Code:
include/linux/device.h:722:38: error: 'THIS_MODULE' undeclared (first use in this function)
i inserted my kernel export.h in the compat include.
Now i got the following error unsolved:
Code:
drivers/net/wireless/ath/ath9k/beacon.c: In function 'ath_beacon_setup':
drivers/net/wireless/ath/ath9k/beacon.c:109: error: 'struct ath_common' has no member named 'tx_chainmask'
make[5]: *** [drivers/net/wireless/ath/ath9k/beacon.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
My Build environment is:
Ubuntu 14.4.01 64bit in a VM with 8gb ram.
Toolchain used:
arm-eabi-4.4.3
Maybe someone can give me some advice how to get this module compiled.
Thanks in advance
Click to expand...
Click to collapse
Similar issue here on S3,
Code:
net/mac80211/mlme.c: In function 'ieee80211_mgd_auth':
net/mac80211/mlme.c:2344:16: error: 'struct cfg80211_auth_request' has no member named 'local_state_change'
net/mac80211/mlme.c:2346:9: error: 'struct cfg80211_auth_request' has no member named 'local_state_change'
net/mac80211/mlme.c: In function 'ieee80211_assoc_done':
net/mac80211/mlme.c:2448:2: warning: passing argument 2 of 'cfg80211_send_rx_assoc' from incompatible pointer type [enabled by default]
include/net/cfg80211.h:2802:6: note: expected 'struct cfg80211_bss *' but argument is of type 'unsigned char *'
net/mac80211/mlme.c:2448:2: warning: passing argument 3 of 'cfg80211_send_rx_assoc' makes pointer from integer without a cast [enabled by default]
include/net/cfg80211.h:2802:6: note: expected 'u8 const *' but argument is of type 'unsigned int'
net/mac80211/mlme.c:2448:2: error: too few arguments to function 'cfg80211_send_rx_assoc'
include/net/cfg80211.h:2802:6: note: declared here
net/mac80211/mlme.c: In function 'ieee80211_mgd_deauth':
net/mac80211/mlme.c:2589:19: error: 'struct cfg80211_deauth_request' has no member named 'bss'
net/mac80211/mlme.c:2590:30: error: 'struct cfg80211_deauth_request' has no member named 'bss'
net/mac80211/mlme.c:2610:18: error: 'struct cfg80211_deauth_request' has no member named 'bss'
net/mac80211/mlme.c:2639:16: error: 'struct cfg80211_deauth_request' has no member named 'local_state_change'
make[2]: *** [net/mac80211/mlme.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Compiler error libstagefright

I'm trying to compile euphoria with @arter97 's optimizations and I can't fix this error. Without them it builds fine, even with 4.9 toolchains. any ideas?
Code:
target arm C++: libaudioflinger <= frameworks/av/services/audioflinger/AudioMixer.cpp
target thumb C++: libaudioflinger <= frameworks/av/services/audioflinger/AudioFlinger.cpp
target thumb C++: libaudioflinger <= frameworks/av/services/audioflinger/Threads.cpp
target thumb C++: libaudioflinger <= frameworks/av/services/audioflinger/Tracks.cpp
frameworks/av/services/audioflinger/AudioMixer.cpp: In static member function 'static void android::AudioMixer::track__NoResample(android::AudioMixer::track_t*, TO*, size_t, TO*, TA*) [with int MIXTYPE = 0; TO = int; TI = short int; TA = int; size_t = unsigned int]':
frameworks/av/services/audioflinger/AudioMixer.cpp:2065:6: internal compiler error: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1423
void AudioMixer::track__NoResample(track_t* t, TO* out, size_t frameCount,
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [/home/jukie/android/system/out/target/product/bacon/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioMixer.o] Error 1
make: *** Waiting for unfinished jobs....
[email protected]:~/android/system$
jukiewalsh said:
I'm trying to compile euphoria with @arter97 's optimizations and I can't fix this error. Without them it builds fine, even with 4.9 toolchains. any ideas?
Code:
target arm C++: libaudioflinger <= frameworks/av/services/audioflinger/AudioMixer.cpp
target thumb C++: libaudioflinger <= frameworks/av/services/audioflinger/AudioFlinger.cpp
target thumb C++: libaudioflinger <= frameworks/av/services/audioflinger/Threads.cpp
target thumb C++: libaudioflinger <= frameworks/av/services/audioflinger/Tracks.cpp
frameworks/av/services/audioflinger/AudioMixer.cpp: In static member function 'static void android::AudioMixer::track__NoResample(android::AudioMixer::track_t*, TO*, size_t, TO*, TA*) [with int MIXTYPE = 0; TO = int; TI = short int; TA = int; size_t = unsigned int]':
frameworks/av/services/audioflinger/AudioMixer.cpp:2065:6: internal compiler error: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1423
void AudioMixer::track__NoResample(track_t* t, TO* out, size_t frameCount,
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://source.android.com/source/report-bugs.html> for instructions.
make: *** [/home/jukie/android/system/out/target/product/bacon/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioMixer.o] Error 1
make: *** Waiting for unfinished jobs....
[email protected]:~/android/system$
Click to expand...
Click to collapse
https://github.com/temasek/android_frameworks_av/commit/292d4e2c74d07287b7dc3b366e031f235e136fc8
arter97 said:
I'm trying to compile euphoria with arter97 's optimizations and I can't fix this error. Without them it builds fine, even with 4.9 toolchains. any ideas?
https://github.com/temasek/android_frameworks_av/commit/292d4e2c74d07287b7dc3b366e031f235e136fc8
Click to expand...
Click to collapse
Thanks a lot! Appreciate it. A mod can close/delete the thread
Thanks
arter97 said:
https://github.com/temasek/android_frameworks_av/commit/292d4e2c74d07287b7dc3b366e031f235e136fc8
Click to expand...
Click to collapse
I've gotten the same issue and I just cherry-picked the commit and let's go to the next error. Thanks for directing us to the commit.
arter97 said:
https://github.com/temasek/android_frameworks_av/commit/292d4e2c74d07287b7dc3b366e031f235e136fc8
Click to expand...
Click to collapse
Thanks man! Great help!
jukiewalsh said:
Thanks a lot! Appreciate it. A mod can close/delete the thread
Click to expand...
Click to collapse
thank god wasnt deleted... was trying to find a fix xD
I also will analise the code of where it failed to see if is possible to make a work around.

Please Help.. Uber Toolchain Setup.

All I am trying to do is simply get Uber Toolchain GCC 5.2 working on the ROM portion of a cm-12.1 build. I got it working on the kernel but every time I build the ROM I get an error. Posted below. Any help would be incredible. Thanks.
In file included from external/libcxx/include/algorithm:628:0,
from art/dalvikvm/dalvikvm.cc:21:
external/libcxx/include/memory: In member function 'virtual const void* std::__1::__shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const std::type_info&) const':
external/libcxx/include/memory:3662:29: error: cannot use typeid with -fno-rtti
return __t == typeid(_Dp) ? &__data_.first().second() : 0;
^
external/libcxx/include/memory: In member function '_Dp* std::__1::shared_ptr<_Tp>::__get_deleter() const':
external/libcxx/include/memory:3942:73: error: cannot use typeid with -fno-rtti
{return (_Dp*)(__cntrl_ ? __cntrl_->__get_deleter(typeid(_Dp)) : 0);}
^
build/core/binary.mk:619: recipe for target '/home/zx64/android/system/out/target/product/bacon/obj/EXECUTABLES/dalvikvm_intermediates/dalvikvm..o' failed
make: *** [/home/zx64/android/system/out/target/product/bacon/obj/EXECUTABLES/dalvikvm_intermediates/dalvikvm..o] Error 1
make: *** Waiting for unfinished jobs....

Cm12.1 build error

host C++: libart-compiler <= art/compiler/compiled_method.cc
libcore/luni/src/main/native/Register.cpp:36: error: undefined reference to 'register_android_system_OsConstants(_JNIEnv*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/relocate/cm12.1/out/host/linux-x86/obj32/lib/libjavacore.so] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/relocate/cm12.1'
#### make failed to build some targets (48:23 (mm:ss)) ####
i keep geting this error , can someone help me out with it please?
Thanks in advance
rpdroky said:
host C++: libart-compiler <= art/compiler/compiled_method.cc
libcore/luni/src/main/native/Register.cpp:36: error: undefined reference to 'register_android_system_OsConstants(_JNIEnv*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/home/relocate/cm12.1/out/host/linux-x86/obj32/lib/libjavacore.so] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/relocate/cm12.1'
#### make failed to build some targets (48:23 (mm:ss)) ####
i keep geting this error , can someone help me out with it please?
Thanks in advance
Click to expand...
Click to collapse
Not sure, but see if this post helps... http://forum.xda-developers.com/showpost.php?p=58073796&postcount=5
kozmo21 said:
Not sure, but see if this post helps... http://forum.xda-developers.com/showpost.php?p=58073796&postcount=5
Click to expand...
Click to collapse
Thanks for the tip sir , i did manage to build it , the second problem was i didn't add enough memory to the virtual machine
Cheers :highfive:
i want to change the default governor , can someone point me to the files i need to change? Thanks in advance :fingers-crossed:

Getting irq/irqdesc.o error while kernel compilation

I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
fawazahmed0 said:
I am trying to compile kernel for Realme 3 (new device) , but I am getting irq/irqdesc.o error, Maybe it's because the source are not complete.
Here is the link to kernel sources: https://github.com/realme-kernel-opensource/Realme3-kernel-source
Any help will be much appreciated
Code:
LD kernel/events/built-in.o
CC kernel/irq/irqdesc.o
Android GCC has been deprecated in favor of Clang, and will be removed from
Android in 2020-01 as per the deprecation plan in:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/GCC_4_9_DEPRECATION.md
In file included from include/linux/kernel.h:13:0,
from include/linux/list.h:8,
from include/linux/smp.h:11,
from include/linux/irq.h:12,
from kernel/irq/irqdesc.c:10:
kernel/irq/irqdesc.c: In function '__handle_domain_irq':
kernel/irq/irqdesc.c:421:11: error: 'desc' undeclared (first use in this function)
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
kernel/irq/irqdesc.c:421:11: note: each undeclared identifier is reported only once for each function it appears in
irq, (desc && desc->action && desc->action->name) ?
^
include/linux/printk.h:428:51: note: in definition of macro 'pr_debug'
no_printk(KERN_DEBUG KLOG_MODNAME pr_fmt(fmt), ##VA_ARGS)
^
make[2]: *** [scripts/Makefile.build:278: kernel/irq/irqdesc.o] Error 1
make[1]: *** [scripts/Makefile.build:484: kernel/irq] Error 2
make: *** [Makefile:1054: kernel] Error 2
Click to expand...
Click to collapse
Now works perfectly, followed this guide:
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297

Categories

Resources