Related
Hi,
I'm building an open source 2D game engine in C++ called YoghurtGum(to be found here: http://code.google.com/p/yoghurtgum/).
It has a working Windows Mobile build, and I'm hoping to get an Android build working as well. Right now, the engine compiles without error and my test game links fine, but when I try to copy it to the emulator, it gives the following error:
Code:
[email protected] /media/Data/Shared/Galaxians $ acpy Galaxians.android
819 KB/s (420657 bytes in 0.501s)
link_image[1638]: 825 could not load needed library 'libstdc++.so.6' for '/system/sbin/Galaxians.android' (load_library[984]: Library 'libstdc++.so.6' not found)CANNOT LINK EXECUTABLE
acpy is a small script I wrote that looks like this:
Code:
#!/bin/sh
FILEPATH=`dirname $1`
FILENAME=`basename $1 .c`
adb push $FILEPATH/$FILENAME /system/sbin/$FILENAME
adb shell chmod 777 /system/sbin/$FILENAME
adb shell /system/sbin/$FILENAME
I'm using the following command to compile the test game:
Code:
[email protected] /media/YoghurtGum/Tests/Galaxians $ sudo make
arm-none-linux-gnueabi-g++ -g -Wall -Werror -O2 -w -static-libgcc -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Alien.cpp -o intermediate/Alien.o
arm-none-linux-gnueabi-g++ -g -Wall -Werror -O2 -w -static-libgcc -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Bullet.cpp -o intermediate/Bullet.o
arm-none-linux-gnueabi-g++ -g -Wall -Werror -O2 -w -static-libgcc -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Game.cpp -o intermediate/Game.o
arm-none-linux-gnueabi-g++ -g -Wall -Werror -O2 -w -static-libgcc -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Player.cpp -o intermediate/Player.o
arm-none-linux-gnueabi-gcc
-Wl,--entry=main,
-dynamic-linker=/system/bin/linker,
-rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib,
-rpath=../../YoghurtGum/lib/Android,-L/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
-nostdlib
-lstdc++
intermediate/Alien.o
intermediate/Bullet.o
intermediate/Game.o
intermediate/Player.o
../../YoghurtGum/bin/YoghurtGum.a
-o bin/Galaxians.android
(The line breaks are just for clarity)
However, when I remove lstdc++ in the linker, the program doesn't compile.
My questions is this: how can I dynamically link to libstdc++.so.6 or remove the dependency entirely?
Thanks in advance.
You should not compile Android native code manually - use NDK instead.
Hi. I'm the actual developer for this project. My friend was posting for me because I couldn't.
What are you suggesting, exactly?
That I use the compilers as provided by Google?
knight666 said:
Hi. I'm the actual developer for this project. My friend was posting for me because I couldn't.
What are you suggesting, exactly?
That I use the compilers as provided by Google?
Click to expand...
Click to collapse
http://developer.android.com/sdk/ndk/index.html
Of course it is possible to crosscompile sources normally, but NDK makes you sure, that you are using official API only and that you are linking external libs properly. If you will compile it manually, then your app may not work on some devices or break in the future.
You don't think I know about the NDK?
I'm linking against the folder containing the libraries. (-rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib) I'm linking against libraries supplied by Google. (-lstdc++)
I'm just using CodeSourcery's ARM compilers instead of Google's.
knight666 said:
You don't think I know about the NDK?
I'm linking against the folder containing the libraries. (-rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib) I'm linking against libraries supplied by Google. (-lstdc++)
I'm just using CodeSourcery's ARM compilers instead of Google's.
Click to expand...
Click to collapse
Ohh, didn't notice that, sorry.
I don't have much experience with C++, so forgive me, if I will say something stupid, but... don't you think that if there is a problem with libstdc++.so.6, but Android doesn't have such file (has libstdc++.so), then probably you have accidentally linked it against libstdc++ from your operating system? Maybe path to NDK libs directory is incorrect, so system directories are used?
Still I suggest you to use NDK fully, not just link to it. You won't have such problems
EDIT:
you have accidentally linked it against libstdc++ from your operating system
Click to expand...
Click to collapse
Or, rather, from CodeSourcery toolchain - system libs are for different architecture, so they shouldn't be used by linker
This gives me a slew of new and exciting errors, mostly related to me using the STL even though that isn't available on Android.
I'll post again when I've fixed them and it still doesn't run on the emulator.
Alright, I'm getting the following errors:
Code:
/home/oem/android-ndk-r3/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi-g++ -Wl,--entry=main,-rpath-link=/system/lib,-rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib,-dynamic-linker=/system/bin/linker,-L/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib,-rpath=../../YoghurtGum/lib/GLES,--gc-sections -nostdlib -lstdc++ -lm -lc -lGLESv1_CM -z /home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib/crtbegin_dynamic.o /home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib/crtend_android.o intermediate/Alien.o intermediate/Bullet.o intermediate/Game.o intermediate/Player.o ../../YoghurtGum/bin/YoghurtGum.a -o bin/Galaxians.android
/home/oem/android-ndk-r3/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: warning: ../../YoghurtGum/bin/YoghurtGum.a(crtbegin_static.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail
intermediate/Game.o: In function `Galaxians::Init()':
/media/YoghurtGum/Tests/Galaxians/src/Game.cpp:45: undefined reference to `__cxa_end_cleanup'
/media/YoghurtGum/Tests/Galaxians/src/Game.cpp:44: undefined reference to `__cxa_end_cleanup'
intermediate/Game.o:(.ARM.extab+0x0): undefined reference to `__gxx_personality_v0'
intermediate/Game.o: In function `Player::Update()':
/media/YoghurtGum/Tests/Galaxians/src/Player.h:41: undefined reference to `__cxa_end_cleanup'
intermediate/Game.o:(.ARM.extab.text._ZN6Player6UpdateEv[Player::Update()]+0x0): undefined reference to `__gxx_personality_v0'
intermediate/Game.o:(.rodata._ZTIN10YoghurtGum4GameE[typeinfo for YoghurtGum::Game]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
intermediate/Game.o:(.rodata._ZTI6Player[typeinfo for Player]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
intermediate/Game.o:(.rodata._ZTIN10YoghurtGum6EntityE[typeinfo for YoghurtGum::Entity]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
intermediate/Game.o:(.rodata._ZTIN10YoghurtGum6ObjectE[typeinfo for YoghurtGum::Object]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
intermediate/Game.o:(.rodata._ZTI6Bullet[typeinfo for Bullet]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
intermediate/Game.o:(.rodata._ZTI5Alien[typeinfo for Alien]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
intermediate/Game.o:(.rodata+0x20): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
collect2: ld returned 1 exit status
make: *** [bin/Galaxians.android] Fout 1
When I add the options "-fno-exceptions" and "-fno-rtti", it compiles but it doesn't run. Basically it ignores the errors it finds on linking when those options are turned on.
I've had these problems before and last time I had to link using g++ instead of the linker itself. However that doesn't work here, because I'm already doing that.
Android doesn't support RTTI and exceptions (neither STL). Good news is that AFAIK these are all things, which Android lacks ;-)
There are many complaints about it (http://groups.google.com/group/android-ndk), some people tried to workaround these restrictions, e.g. using STLport.
When I disable exceptions and RTTI, the program compiles (hurray!), but the emulator returns the following:
Code:
[email protected] /media/Data/Shared/Galaxians $ acpy Galaxians.android
Filename: 'Galaxians.android'
462 KB/s (242397 bytes in 0.511s)
[1] Segmentation fault /system/sbin/Gal...
So it ignores the errors instead of resolving them.
knight666 said:
So it ignores the errors instead of resolving them.
Click to expand...
Click to collapse
You didn't think you will add some switches and then app, which use some missing features, will magically work, did ya? ;-)
If you want to run your framework on Android, then you should modify it to not use STL, exceptions and RTTI.
In order for the dynamic_cast<> operation, the typeid operator or exceptions to work in C++, RTTI must be enabled.
Click to expand...
Click to collapse
I'm not using any of these. Nor am I using exceptions. I'm also not using the STL in the Android build.
I do, however, have several base classes with virtual functions.
knight666 said:
I'm not using any of these. Nor am I using exceptions. I'm also not using the STL in the Android build.
Click to expand...
Click to collapse
Isn't __gxx_personality_v0 connected to exceptions? You had some reference to it in Player::Update() method.
You don't have much errors, mainly these virtual methods. You should be able to easily port it to Android
Here is a guide to building froyo from source for the HTC Desire. I am using Ubuntu 10.4, any Linux distro will do.
Thanks & credits: Defer/deovferreira, AdamG, Kali-
If you are interested in this sort of thing I encourage you to join #teamdesire on irc.freenode.net
Get packages
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind
cd ~
mkdir bin
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
Install java (from java.com - not documented here in this post), set some variables and get the aosp source. Edit the path to your java installation if it's not the same as below.
Code:
cat >> ~/.bashrc <<EOF
export JAVA_HOME=/usr/local/java/jdk1.6.0_18/
export ANDROID_JAVA_HOME=$JAVA_HOME
export PATH=$PATH:~/bin:$JAVA_HOME/bin
alias makedroid='make -j$(grep -c processor /proc/cpuinfo) TARGET_PRODUCT=full_bravo | tee build-$(date +%d%m%y%H%M).log'
EOF
. ~/.bashrc
mkdir mydroid
cd mydroid
repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo
repo sync
Please note, if you are using java 1.6 you will need to edit ~/mydroid/build/core/main.mk and comment out the lines that abort the build if you are not using java 1.5 (comment out lines 104-134)
Set up a bravo "vendor". Download defer's vendor files and extract bravo and bravo-common into ~/mydroid/device/htc/
Code:
cd ~/mydroid/device/htc/bravo
Thanks to deovferreira and Kali- for this vendor config.
Now you need to connect your HTC desire and enable usb debugging. This script we are running will pull propriatary files from the device to go into the new system image. You need to pull the files from an Android 2.2 rom or this will fail! Try using OpenDesire from AdamG or DeFrost from RichardTrip
Code:
./extract_files.sh
Configure ulimits (default of 1024 causes 'too many open files' error in Ubuntu). Substitute 'myuser' with your username:
Code:
sudo cat >> /etc/security/limits.conf<<EOF
myuser soft nofile 8192
myuser hard nofile 8192
EOF
You need to exit from your shell and start a new one for this change to take effect.
Now you can start your build!
Code:
cd ~/mydroid
source build/envsetup.sh
makedroid
Check your build.log in ~/mydroid afterwards for errors.
It takes about an hour to build on my 2.3Ghz dual core laptop with 2Gb of ram. Afterwards in out/product/target/bravo you will find system.img and a system directory containing the files to flash to your device (minus symlinks, create those using your update-script -- open up someone elses rom to discover how these work).
Additional - LED notifications
See this post for info on LED notifications: http://forum.xda-developers.com/showpost.php?p=7186561&postcount=117
Good to see your attempting this mate. Keep us informed!
Just a thought, have u tried pulling the files from a froyo rom? Might fix your errors.
-------------------------------------
Sent via the XDA Tapatalk App
If I let the build run it does finish, but I get a generic device, not a bravo specific one... i.e. my vendor is ignored. I don't know how to choose the 'lunch' option in Android 2.2. I'm sure its easy, probably one command, but I can't find the doc that explains how!
Edit, ok just found out how to do this on the android developer site, will give my build another go...
Code:
% cd $TOP
% . build/envsetup.sh
# pick a configuration using choosecombo
% choosecombo
% make -j4 PRODUCT-generic-user
Just a thought. Too many open files may refer to the linux max open file descriptors.
Max is usually 1024 by default which can cause problems for huge builds.
Either do it as root after setting his ulimits with (probably a bad idea)
Code:
ulimit -Hn 8192
ulimit -Sn 8192
or change it for yourself in /etc/security/limits.conf
Code:
myuser soft nofile 8192
myuser hard nofile 8192
Yeah I already ran ulimit (as me, not as root) and it said 'ulimit unlimited'!
st0kes said:
Yeah I already ran ulimit (as me, not as root) and it said 'ulimit unlimited'!
Click to expand...
Click to collapse
Yeah, but the important information is from ulimit -n
(-n is for nofile, you can see all limits with ulimit -a)
Thanks mate you were on the money the with upping the limit in limits.conf. My previous limit was 1024, increasing it to 8192 has overcome that error message!
To build using the custom vendor rather than the generic product:
Code:
make -j2 TARGET_PRODUCT=htc_bravo
I'm happy to see that my first ever post on this forum turned out to be useful for someone, cheers!
st0kes said:
Thanks mate you were on the money the with upping the limit in limits.conf. My previous limit was 1024, increasing it to 8192 has overcome that error message!
To build using the custom vendor rather than the generic product:
Code:
make -j2 TARGET_PRODUCT=htc_bravo
Click to expand...
Click to collapse
After building were you able to successfully flash this to your Desire? Or does it take alot more effort..
There are a few more steps - compiling a kernel (if you don't want to use someone elses) and packing it into a boot.img, and packing the files into an update.zip. I've just had a successful froyo build after making a few more small tweaks. Now just to pack it into an update.zip and flash it ... will let you know if it works!
If it's working I'll go back and update the original post with full instructions.
bookmarked this page! def need this for reference lol
After fixing my laptop and reinstalling kubuntu I'll definitely try this.
This thread should be stickied.
Good job mate. Can't wait to flash this. Fingers crossed.
Nice post, looking forward to see how it works out. That is realy the interesting part - how to get from source to the desire rom.
a lot of the instructions here are similar to the ones found at http://wiki.cyanogenmod.com/index.php/Building_from_source
Updated the original post.
My build is going all the way to the end, but the output does not boot...logcat shows a bootloop and crashdump from the Android framework. Will update with fully working instructions hopefully within a few days!
@st0kes: behnaam-android_vendor_htc_bravo-e409d97.tar.gz does not exist, could you upload it please?
The files exist here
http://github.com/behnaam/android_vendor_htc_bravo
Hi,
i got the following errors:
h**p://nopaste.info/374d05fc39.html
Don't know why. Suggestions?
greetz
Hmm .. You will need to make some small edits in the vendor files ... change all instances of vendor/htc to devices/htc.
For example in BoardConfig.mk
Code:
BOARD_EGL_CFG := vendor/htc/bravo/egl.cfg
In device.mk
Code:
include vendor/htc/bravo/device_bravo.mk
In device_bravo.mk
Code:
DEVICE_PACKAGE_OVERLAYS := vendor/htc/bravo/overlay
There may be some others ...
Code:
find ~/mydroid/devices/htc/bravo -type f -exec grep -l vendor "{}" ";"
My Linux laptop is at home so can't be of much more help ... I'll update the OP with these details though.
I have been buliding some kernels recently, but have been unable to get the wifi working.
I have tried it having the modules included in initramfs/lib/modules when ramdisk is created and i do mkbootimg, and have also tried just putting all the modules in the flash zip in /system/lib/modules, and excluded it from build process. Both result in no Wifi [Edit, putting the newly built correct modules in my working folders /lib/modules fixed wifi, must not have done it correctly before)
basic overview of what I've done (after zImage compile)
I use "./unpack-bootimg.pl boot.img" to pull the "ramdisk-contents" from the stock kernel, I renamed that folder "initramfs" and threw it in a folder along with my mkbootimg binary, and my zImage I just compiled.
I put the newly created modules from zImage build in my initramfs/libs/modules with
find -name '*.ko' -exec cp -av {} [path to desired folder] \;
I navigate to the initramfs folder and
find .|cpio -o -H newc > ../ramdisk
cd ..
gzip ramdisk
./mkbootimg --kernel ./zImage --ramdisk ./ramdisk.gz --board smdk4x12 --base 0x10000000 --pagesize 2048 --ramdiskaddr 0x11000000 -o boot.img
the resultant boot.img boots fine and shows all other changes, just cant seem to get the wifi working. Anyone have idea for getting wifi working on our Note 2 kernel builds?
Edit: I re-tried and this time it worked. Not sure what was different. Copied the newly created modules into my ramdisk folder (for me was /initramfs/lib/modules) and created my ramdisk.gz etc. made the boot.img and it's all good. The difference must've been having the correct modules in place prior to creating the ramdisk.cpio(then .cpio.gz).
Mods please move if you feel this is in wrong section now etc. Found the answer, thank you
It's only in the wrong section if you don't share what you did wrong, and how you fixed it.
Facing an almost similiar issue over here with the wifi modules. For me, I found that my boot.img is itself too large for initramfs to accomodate the compiled modules (optimization was off). So I put them in system/lib/modules and tried to insmod them.
Using the sbin's insmod gives me this:
Code:
[[email protected] android]$adb shell
[email protected]:/ $ su
[email protected]:/ # insmod /system/lib/modules/dhd.ko
insmod: init_module '/system/lib/modules/dhd.ko' failed (No such file or directory)
255|[email protected]:/ # busybox insmod /system/lib/modules/dhd.ko
insmod: can't insert '/system/lib/modules/dhd.ko': unknown symbol in module, or unknown parameter
2|[email protected]:/ #
I've turned off module versioning, and am not sure why there's a symbol error.
Droidzone said:
Facing an almost similiar issue over here with the wifi modules. For me, I found that my boot.img is itself too large for initramfs to accomodate the compiled modules (optimization was off). So I put them in system/lib/modules and tried to insmod them.
Using the sbin's insmod gives me this:
Code:
[[email protected] android]$adb shell
[email protected]:/ $ su
[email protected]:/ # insmod /system/lib/modules/dhd.ko
insmod: init_module '/system/lib/modules/dhd.ko' failed (No such file or directory)
255|[email protected]:/ # busybox insmod /system/lib/modules/dhd.ko
insmod: can't insert '/system/lib/modules/dhd.ko': unknown symbol in module, or unknown parameter
2|[email protected]:/ #
I've turned off module versioning, and am not sure why there's a symbol error.
Click to expand...
Click to collapse
Add --strip-debug into the LDFLAGS_MODULE of the main makefile and make sure the modules went through second stage compilation. The OS probably forwards some parameters and you can't just insmod it.
I fixed that issue..
The real reason is something queer and interesting. It was because I'd defined GREP_OPTIONS defined as '--color -in'. This seemed to interfere with the kernel scripts. Once the var was unset, problem was solved.
However the inability to load the module persists.
My main kernel has the version name "3.0.31-g5d44d80-dirty", and the vermagic of module seems to be "3.0.31-gc299ec6 SMP preempt mod_unload modversions ARMv7 p2v8".
This obviously leads to version mismatch, and inability to load the module. Do you know why this happens? The kernel and module were used from the same compilation session. In fact I havent even changed the version name in .config.
dmesg during insmod gives this error code which narrows down the issue:
Code:
c0 dhd: version magic '3.0.31-gc299ec6 SMP preempt mod_unload modversions ARMv7 p2v8 ' should be '3.0.31-g5d44d80-dirty SMP preempt mod_unload ARMv7 '
EDIT:
Maybe I had made a script error and forgot to replace the original kernel/module..That error has disappeared to be replaced by the former issue-unable to insert module. Module was compiled with debug symbols.
Insmod reports:
insmod: init_module '/system/lib/modules/dhd.ko' failed (No such file or directory)
Modprobe reports:
modprobe: chdir(3.0.31-ge52b835-dirty): No such file or directory
Kernel reports:
Code:
c0 dhd: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
Trying to narrow it down to the source file. I'm expecting that some function has 'forgotten' to export symbol.
I'm wondering whether this is just me, or is Samsung source dump supposed to have these kind of errors on defconfig. First they "forget" to include cypress drivers. Now errors related to symbol export.
EDIT2:
Still no more closer to finding the cause of the error. Did a grep and these are the only things I found:
Code:
[[email protected] kernel_IN]$grep --color -inr '_GLOBAL_OFFSET_TABLE_' * | grep -v 'Binary file'
arch/powerpc/boot/crt0.S:42: addis r11,r10,(_GLOBAL_OFFSET_TABLE_-p_base)@ha
arch/powerpc/boot/crt0.S:43: lwz r11,(_GLOBAL_OFFSET_TABLE_-p_base)@l(r11)
arch/m32r/boot/compressed/head.S:39: seth r3, #high(_GLOBAL_OFFSET_TABLE_+8)
arch/m32r/boot/compressed/head.S:40: or3 r3, r3, #low(_GLOBAL_OFFSET_TABLE_+12)
arch/s390/kernel/module.c:149: "_GLOBAL_OFFSET_TABLE_") == 0)
arch/avr32/kernel/module.c:104: "_GLOBAL_OFFSET_TABLE_") == 0)
scripts/mod/modpost.c:565: if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
System.map:49417:c0b4f468 d _GLOBAL_OFFSET_TABLE_
The relevant segment of scripts/mod/modpost.c:
Code:
static int ignore_undef_symbol(struct elf_info *info, const char *symname)
{
/* ignore __this_module, it will be resolved shortly */
if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
return 1;
/* ignore global offset table */
if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
return 1;
Edit3: Solved.
AndreiLux said:
Add --strip-debug into the LDFLAGS_MODULE of the main makefile and make sure the modules went through second stage compilation. The OS probably forwards some parameters and you can't just insmod it.
Click to expand...
Click to collapse
I'd like to thank you for this information - this cut my dhd.ko from 4.6 MB to around 550 kB - and my resulting kernel as a result. Fully expect this will now get my kernel working as it should.
Droidzone said:
I fixed that issue..
The real reason is something queer and interesting. It was because I'd defined GREP_OPTIONS defined as '--color -in'. This seemed to interfere with the kernel scripts. Once the var was unset, problem was solved.
However the inability to load the module persists.
My main kernel has the version name "3.0.31-g5d44d80-dirty", and the vermagic of module seems to be "3.0.31-gc299ec6 SMP preempt mod_unload modversions ARMv7 p2v8".
This obviously leads to version mismatch, and inability to load the module. Do you know why this happens? The kernel and module were used from the same compilation session. In fact I havent even changed the version name in .config.
dmesg during insmod gives this error code which narrows down the issue:
Code:
c0 dhd: version magic '3.0.31-gc299ec6 SMP preempt mod_unload modversions ARMv7 p2v8 ' should be '3.0.31-g5d44d80-dirty SMP preempt mod_unload ARMv7 '
EDIT:
Maybe I had made a script error and forgot to replace the original kernel/module..That error has disappeared to be replaced by the former issue-unable to insert module. Module was compiled with debug symbols.
Insmod reports:
insmod: init_module '/system/lib/modules/dhd.ko' failed (No such file or directory)
Modprobe reports:
modprobe: chdir(3.0.31-ge52b835-dirty): No such file or directory
Kernel reports:
Code:
c0 dhd: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
Trying to narrow it down to the source file. I'm expecting that some function has 'forgotten' to export symbol.
I'm wondering whether this is just me, or is Samsung source dump supposed to have these kind of errors on defconfig. First they "forget" to include cypress drivers. Now errors related to symbol export.
EDIT2:
Still no more closer to finding the cause of the error. Did a grep and these are the only things I found:
Code:
[[email protected] kernel_IN]$grep --color -inr '_GLOBAL_OFFSET_TABLE_' * | grep -v 'Binary file'
arch/powerpc/boot/crt0.S:42: addis r11,r10,(_GLOBAL_OFFSET_TABLE_-p_base)@ha
arch/powerpc/boot/crt0.S:43: lwz r11,(_GLOBAL_OFFSET_TABLE_-p_base)@l(r11)
arch/m32r/boot/compressed/head.S:39: seth r3, #high(_GLOBAL_OFFSET_TABLE_+8)
arch/m32r/boot/compressed/head.S:40: or3 r3, r3, #low(_GLOBAL_OFFSET_TABLE_+12)
arch/s390/kernel/module.c:149: "_GLOBAL_OFFSET_TABLE_") == 0)
arch/avr32/kernel/module.c:104: "_GLOBAL_OFFSET_TABLE_") == 0)
scripts/mod/modpost.c:565: if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
System.map:49417:c0b4f468 d _GLOBAL_OFFSET_TABLE_
The relevant segment of scripts/mod/modpost.c:
Code:
static int ignore_undef_symbol(struct elf_info *info, const char *symname)
{
/* ignore __this_module, it will be resolved shortly */
if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
return 1;
/* ignore global offset table */
if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
return 1;
Edit3: Solved.
Click to expand...
Click to collapse
How to Solved? Too detailed can you tell us a little bit?
wctliu said:
How to Solved? Too detailed can you tell us a little bit?
Click to expand...
Click to collapse
Used another toolchain.
Droidzone said:
Used another toolchain.
Click to expand...
Click to collapse
another toolchain????
Which version?
I uesd these:
/home/wctliu/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
/home/wctliu/arm-2009q3/bin/arm-none-linux-gnueabi-
Which will cause the problem to occur?
wctliu said:
another toolchain????
Which version?
I uesd these:
/home/wctliu/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
/home/wctliu/arm-2009q3/bin/arm-none-linux-gnueabi-
Which will cause the problem to occur?
Click to expand...
Click to collapse
Did you see and do the changes AndreiLux mentioned above to the makefile. That can be the difference of whether you get useable wifi modules. Simple place to start if your getting a working kernel but no wifi
Sent from my SPH-L900 using xda premium
sleshepic said:
Did you see and do the changes AndreiLux mentioned above to the makefile. That can be the difference of whether you get useable wifi modules. Simple place to start if your getting a working kernel but no wifi
Sent from my SPH-L900 using xda premium
Click to expand...
Click to collapse
YES i do it .
you can see this:
http://forum.xda-developers.com/showthread.php?t=2193358
and now, it's no wifi no exfat.
AndreiLux said:
Add --strip-debug into the LDFLAGS_MODULE of the main makefile and make sure the modules went through second stage compilation. The OS probably forwards some parameters and you can't just insmod it.
Click to expand...
Click to collapse
That is correct, the OS does pass parameters to the module when loading.
An example (from CM) can be seen at: https://github.com/CyanogenMod/andr...common/blob/cm-10.1/BoardCommonConfig.mk#L122
I cannot get Wifi to work either. I have the same exact problem as Droidzone with the "_GLOBAL_OFFSET_TABLE_" error.
I have checked that:
"LDFLAGS_MODULE = --strip-debug" is set in Makefile.
I'm using the 4.7 toolchain, but just tried the 4.6 to no avail.
Any help would be much appreciated.
Update: I was able to get it working by using CFLAGS_MODULE=-fno-pic as suggested in this guide.
Solved
I was running in the same issues. I solved my problem adding these to my kernel makefile:
LDFLAGS_MODULE = --strip-debug
CFLAGS_MODULE = -fno-pic
forfivo said:
I was running in the same issues. I solved my problem adding these to my kernel makefile:
LDFLAGS_MODULE = --strip-debug
CFLAGS_MODULE = -fno-pic
Click to expand...
Click to collapse
There must be something else goin on in my setup as this does not work for me to getting working WiFi. What is your build process?
Edit: or if you wouldn't mind shoot in me your kernel I'd be interested if it something small I'm missing like updater script etc
Edit2: I feel sometimes in android doing the same thing twice results in separate results. Crazy thx
Hey sorry to bump this. Not sure if anyone still remembers I have the same problem with my GT-B5330.
Even though I set in my kernel/Makefile :
CFLAGS_MODULE = -fno-pic
LDFLAGS_MODULE = --strip-debug
After building the kernel from source I get the dhd.ko file, copy it to ramdisk/lib/modules and then repack it with the zimage generated by the build.
Then i dd the newly created boot.img to the kernel partition.
lsmod doesnt show dhd.ko
and the file exists in system/lib/modules/dhd.ko
Toolchain arm-eabi-4.6
DroidFreak32 said:
Hey sorry to bump this. Not sure if anyone still remembers I have the same problem with my GT-B5330.
Even though I set in my kernel/Makefile :
CFLAGS_MODULE = -fno-pic
LDFLAGS_MODULE = --strip-debug
After building the kernel from source I get the dhd.ko file, copy it to ramdisk/lib/modules and then repack it with the zimage generated by the build.
Then i dd the newly created boot.img to the kernel partition.
lsmod doesnt show dhd.ko
and the file exists in system/lib/modules/dhd.ko
Toolchain arm-eabi-4.6
Click to expand...
Click to collapse
Are you able to test manually starting using insmod? If so, what is the result?
garwynn said:
Are you able to test manually starting using insmod? If so, what is the result?
Click to expand...
Click to collapse
I cannot insmod the module I get : /system/lib/module/dhd.ko invalid argument
DroidFreak32 said:
I cannot insmod the module I get : /system/lib/module/dhd.ko invalid argument
Click to expand...
Click to collapse
Can't get to my Linux env at the moment, but will follow up on this. Might even see if someone is willing to test for me.
garwynn said:
Can't get to my Linux env at the moment, but will follow up on this. Might even see if someone is willing to test for me.
Click to expand...
Click to collapse
Thanks man
Also I forgot to mention I use arm eabi 4.4.3 if that matters.
since i'm a flashaholic and a great fan of sultan's cm13, i'm trying my hands on android rom development and i thought the first step would be to learn how to compile a rom from source and the best choice was cm13 by sultan.
i'm using google's cloud platform for vm instance and using ubuntu 14.04.
i've used @akhilnarang script (link to his github:github.com/akhilnarang/scripts ) to setup the build environment and followed these commands to build the rom.
Code:
~$ repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-13.0-ZNH2K
~$ mkdir .repo/local_manifests
~$ curl https://raw.githubusercontent.com/sultanxda/android/master/bacon/cm-13.0-stable/local_manifest.xml > .repo/local_manifests/local_manifest.xml
~$ repo sync -c -j10
~$ ./patcher/patcher.sh
~$ make clobber
~$ . build/envsetup.sh
~$ lunch cm_bacon-user
~$ time mka bacon -j8
but after 1h or so the compiler spilled these errors
Code:
Package OTA: /home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1782, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1674, in main
], extra_option_handler=option_handler)
File "/home/arjunmanoj1995/build/tools/releasetools/common.py", line 826, in ParseOptions
if extra_option_handler is None or not extra_option_handler(o, a):
File "./build/tools/releasetools/ota_from_target_files", line 1644, in option_handler
from backports import lzma
ImportError: No module named backports
make: *** [/home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip] Error 1
make: Leaving directory `/home/arjunmanoj1995'
#### make failed to build some targets (01:07:57 (hh:mm:ss)) ####
can someone plz help me resolve this error.
baconxda said:
since i'm a flashaholic and a great fan of sultan's cm13, i'm trying my hands on android rom development and i thought the first step would be to learn how to compile a rom from source and the best choice was cm13 by sultan.
i'm using google's cloud platform for vm instance and using ubuntu 14.04.
i've used @akhilnarang script (link to his github:github.com/akhilnarang/scripts ) to setup the build environment and followed these commands to build the rom.
Code:
~$ repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-13.0-ZNH2K
~$ mkdir .repo/local_manifests
~$ curl https://raw.githubusercontent.com/sultanxda/android/master/bacon/cm-13.0-stable/local_manifest.xml > .repo/local_manifests/local_manifest.xml
~$ repo sync -c -j10
~$ ./patcher/patcher.sh
~$ make clobber
~$ . build/envsetup.sh
~$ lunch cm_bacon-user
~$ time mka bacon -j8
but after 1h or so the compiler spilled these errors
Code:
Package OTA: /home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1782, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1674, in main
], extra_option_handler=option_handler)
File "/home/arjunmanoj1995/build/tools/releasetools/common.py", line 826, in ParseOptions
if extra_option_handler is None or not extra_option_handler(o, a):
File "./build/tools/releasetools/ota_from_target_files", line 1644, in option_handler
from backports import lzma
ImportError: No module named backports
make: *** [/home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip] Error 1
make: Leaving directory `/home/arjunmanoj1995'
#### make failed to build some targets (01:07:57 (hh:mm:ss)) ####
can someone plz help me resolve this error.
Click to expand...
Click to collapse
It seems like your missing the backports module to build certain parts of the rom. As i looked at the prepare script you used I noticed an commented piece of code in there refering exectly to your error regarding lzma backports:
Code:
#echo Cloning LZMA repo
#git clone https://github.com/peterjc/backports.lzma /tmp/backports.lzma
#cd /tmp/backports.lzma
#sudo python2 setup.py install
#python2 test/test_lzma.py
#rm -rf /tmp/backports.lzma
#echo LZMA compression for ROMs enabled
#echo "WITH_LZMA_OTA=true" >> ~/.bashrc
Running this, or running the prepare script again with this uncommented might acctualy fix your import problem
gs-crash-24-7 said:
It seems like your missing the backports module to build certain parts of the rom. As i looked at the prepare script you used I noticed an commented piece of code in there refering exectly to your error regarding lzma backports:
Code:
#echo Cloning LZMA repo
#git clone https://github.com/peterjc/backports.lzma /tmp/backports.lzma
#cd /tmp/backports.lzma
#sudo python2 setup.py install
#python2 test/test_lzma.py
#rm -rf /tmp/backports.lzma
#echo LZMA compression for ROMs enabled
#echo "WITH_LZMA_OTA=true" >> ~/.bashrc
Running this, or running the prepare script again with this uncommented might acctualy fix your import problem
Click to expand...
Click to collapse
thanks mate, i'll give this a try and report back
edit: thanks .... it worked...:good:
I can't install the backports thing... I can't use the script to setup the build environment. How did you do it @baconxda? I uncommented those lines and it says that it doesn't have the lzma.h thing.
gs-crash-24-7 said:
It seems like your missing the backports module to build certain parts of the rom. As i looked at the prepare script you used I noticed an commented piece of code in there refering exectly to your error regarding lzma backports:
Code:
#echo Cloning LZMA repo
#git clone https://github.com/peterjc/backports.lzma /tmp/backports.lzma
#cd /tmp/backports.lzma
#sudo python2 setup.py install
#python2 test/test_lzma.py
#rm -rf /tmp/backports.lzma
#echo LZMA compression for ROMs enabled
#echo "WITH_LZMA_OTA=true" >> ~/.bashrc
Running this, or running the prepare script again with this uncommented might acctualy fix your import problem
Click to expand...
Click to collapse
Cesaragus said:
I can't install the backports thing... I can't use the script to setup the build environment. How did you do it @baconxda? I uncommented those lines and it says that it doesn't have the lzma.h thing.
Click to expand...
Click to collapse
just run the script then run those commands quoted above, thats it.
@baconxda Any idea if this ROM could be built for any other device?
Has.007 said:
@baconxda Any idea if this ROM could be built for any other device?
Click to expand...
Click to collapse
only for devices supported by @Sultanxda.
[DISCUSSION]How to fix Jack server failing to build with error "Try jack-diagnose"
Did you got this error while building with Jack?
Code:
[ X% Y/Z] Building with Jack: /home/minealex2244/los/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex
FAILED: /bin/bash /home/minealex2244/los/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Communication error with Jack server (52). Try 'jack-diagnose'
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
It looks like the installation of Jack server is broken. So how do we fix it?
1. Open a terminal window
2. Type the following commands:
Code:
jack-admin kill-server
jack-admin uninstall-server
cd prebuilts/sdk/tools
touch jack
mm -j32 showcommands &> mm.out
./jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar
3. Now the build should work.
Note: Sometimes it will continue to fail, just be persistent ("make" command again). In my case it is running somehow out of memory and that's why I'm persistent.
Note2: By increasing the RAM memory you will get better results. I see that Jack server is running out of memory at some point.
Note3: It is possible to reduce the number of concurrent services in file $HOME/.jack-server/config.properties
Code:
jack.server.max-service=N
where "N" is a number (default: 4).
Note4: Try creating a swap file of 20-40 GB as Jack uses a lot of RAM (https://forum.xda-developers.com/showpost.php?p=73083910&postcount=4).
Thanks for this post. I had lost the jack server and couldn't find how to get it back. You really saved me bro!
how do I create the swap file, new to building and I am having this issue? Thanks!
yung40oz84 said:
how do I create the swap file, new to building and I am having this issue? Thanks!
Click to expand...
Click to collapse
Here is a guide: https://www.howtoforge.com/ubuntu-swap-file
Also this may help:
Code:
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Add these to your .bashrc
minealex2244 said:
Here is a guide: https://www.howtoforge.com/ubuntu-swap-file
Also this may help:
Code:
export USE_CCACHE=1
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Add these to your .bashrc
Click to expand...
Click to collapse
Could I set the ccache to a large USB flashdrive for faster caching? I'm using a standard HDD, just curious if I could get a slight performance boost from this
Travisholt92 said:
Could I set the ccache to a large USB flashdrive for faster caching? I'm using a standard HDD, just curious if I could get a slight performance boost from this
Click to expand...
Click to collapse
It depends on how fast the USB drive is.
minealex2244 said:
It depends on how fast the USB drive is.
Click to expand...
Click to collapse
My USB ports are too slow for that, however I did find a speed boost by taking an old smaller sata hard drive and mounting it as the /out folder. So it mainly reads from one drive while writing to the other which helps with overall read/write latency. I hope this information helps someone else.
Does anybody know how to raise the the amount of resources javac uses when compiling? Mine is stuck at "javac -J-Xmx1024M" and I believe that is causing some build errors for me. My cm-14.1 tree is limited to 1024m and my lineage-15.0 tree is limited to 2048m for javac. The variable must be able to be changed somehow if it changes between build trees like that.
jack server error 51
I am trying to compile ResurrectionRemix Rom from source. Compilation would not even start.
Communication error with Jack server 51. Try 'jack-diagnose'
I am getting this error. I have tried killing the server and running it again. then getting this error
No Jack server running. Try 'jack-admin start-server'
I checked the logs but nothing is in there. I tried running "jack-diagnose" but it is showing permission denied. Kindly help me. thanks
Please send link to download the jack jar file for launcher and server.
karan4c6 said:
Please send link to download the jack jar file for launcher and server.
Click to expand...
Click to collapse
Repo sync -f should do the thing.
Stuck
Code:
[email protected] ~/Andro_Dev/DotOS/prebuilts/sdk/tools $ ./jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar
Jack server jar "jack-server-4.8.ALPHA.jar" is not readable
[email protected] ~/Andro_Dev/DotOS/prebuilts/sdk/tools $
Black_J said:
Stuck
Code:
[email protected] ~/Andro_Dev/DotOS/prebuilts/sdk/tools $ ./jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar
Jack server jar "jack-server-4.8.ALPHA.jar" is not readable
[email protected] ~/Andro_Dev/DotOS/prebuilts/sdk/tools $
Click to expand...
Click to collapse
Make sure that the file is RW and not RO. Right click on it and change the properties.
minealex2244 said:
Make sure that the file is RW and not RO. Right click on it and change the properties.
Click to expand...
Click to collapse
Thanks for the quick reply, but I figured out my problem.
I blindly just copied pasted the codes. The directory was having jack-server-4.11.ALPHA.jar not jack-server-4.8.ALPHA.jar in my case.
you saved me bro. Thanks
nit_in said:
I am trying to compile ResurrectionRemix Rom from source. Compilation would not even start.
Communication error with Jack server 51. Try 'jack-diagnose'
I am getting this error. I have tried killing the server and running it again. then getting this error
No Jack server running. Try 'jack-admin start-server'
I checked the logs but nothing is in there. I tried running "jack-diagnose" but it is showing permission denied. Kindly help me. thanks
Click to expand...
Click to collapse
Did you figure this out? I'm having same problem with the same error message.
Airtioteclint said:
Did you figure this out? I'm having same problem with the same error message.
Click to expand...
Click to collapse
before giving the make/lunch/brunch command enter this in terminal.
JACK_SERVER_VM_ARGUMENTS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation" /mnt/disk2/du/prebuilts/sdk/tools/jack-admin start-server
Click to expand...
Click to collapse
if this don't work, increase the value from 4g to 8g or more
replace the /mnt/disk2/du with your project directory.
Also open .jack-server/config.properties in your home.
and edit jack.server.max-service to 1
Hope this will help you.
Thanks
Another reason for Jack Server errors could be that the port server clashes with already started instances of other users in your system.
If you set up a server and admin port based on your uid, your Jack Server should work without issues.
at now: jack-server-4.8.ALPHA.jar
minealex2244 said:
Did you got this error while building with Jack?
Code:
[ X% Y/Z] Building with Jack: /home/minealex2244/los/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex
FAILED: /bin/bash /home/minealex2244/los/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp
Communication error with Jack server (52). Try 'jack-diagnose'
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
It looks like the installation of Jack server is broken. So how do we fix it?
1. Open a terminal window
2. Type the following commands:
Code:
jack-admin kill-server
jack-admin uninstall-server
cd prebuilts/sdk/tools
touch jack
mm -j32 showcommands &> mm.out
./jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar
3. Now the build should work.
Note: Sometimes it will continue to fail, just be persistent ("make" command again). In my case it is running somehow out of memory and that's why I'm persistent.
Note2: By increasing the RAM memory you will get better results. I see that Jack server is running out of memory at some point.
Note3: It is possible to reduce the number of concurrent services in file $HOME/.jack-server/config.properties
Code:
jack.server.max-service=N
where "N" is a number (default: 4).
Note4: Try creating a swap file of 20-40 GB as Jack uses a lot of RAM (https://forum.xda-developers.com/showpost.php?p=73083910&postcount=4).
Click to expand...
Click to collapse
Hi I am getting a bunch of errors when It's compiling the package: Download Provider
FAILED: /bin/bash -c "(rm -f /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/with-local/classes.dex ) && (rm -f /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/classes.jack ) && (rm -rf /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc ) && (mkdir -p /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/with-local/ ) && (mkdir -p /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/ ) && (mkdir -p /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc ) && (rm -f /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list ) && (touch /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list ) && (echo -n 'packages/providers/DownloadProvider/src/com/android/providers/downloads/Constants.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadDrmHelper.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadIdleService.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadInfo.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadJobService.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadNotifier.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadReceiver.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadScanner.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadStorageProvider.java packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadThread.java packages/providers/DownloadProvider/src/com/android/providers/downloads/Helpers.java packages/providers/DownloadProvider/src/com/android/providers/downloads/OpenHelper.java packages/providers/DownloadProvider/src/com/android/providers/downloads/RealSystemFacade.java packages/providers/DownloadProvider/src/com/android/providers/downloads/StopRequestException.java packages/providers/DownloadProvider/src/com/android/providers/downloads/StorageUtils.java packages/providers/DownloadProvider/src/com/android/providers/downloads/SystemFacade.java ' >> /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list ) && (if [ -d "/home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/src" ]; then find /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/src -name '*.java' >> /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list; fi ) && (tr ' ' '\\n' < /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list | build/tools/normalize_path.py | sort -u > /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list-uniq ) && (echo -basedirectory /home/android/RR > /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/with-local/classes.dex.flags; echo -forceprocessing -include build/core/proguard.flags -dontobfuscate -dontoptimize -printmapping /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack_dictionary -include /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/proguard_options -include /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/proguard_options >> /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/with-local/classes.dex.flags ) && (if [ -s /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list-uniq ] ; then export tmpEcjArg="@/home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list-uniq"; else export tmpEcjArg=""; fi; JACK_VERSION=3.36.CANDIDATE /home/android/RR/out/host/linux-x86/bin/jack @build/core/jack-default.args --verbose error -g -D jack.java.source.version=1.8 --classpath /home/android/RR/out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jack:/home/android/RR/out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack:/home/android/RR/out/target/common/obj/JAVA_LIBRARIES/core-oj_intermediates/classes.jack:/home/android/RR/out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jack:/home/android/RR/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jack:/home/android/RR/out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes.jack --import /home/android/RR/out/target/common/obj/JAVA_LIBRARIES/android-support-documents-archive_intermediates/classes.jack --import /home/android/RR/out/target/common/obj/JAVA_LIBRARIES/guava_intermediates/classes.jack -D jack.android.min-api-level=25 -D jack.import.resource.policy=keep-first -D jack.import.type.policy=keep-first --output-jack /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/classes.jack --output-dex /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc --config-proguard /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/with-local/classes.dex.flags \$tmpEcjArg || ( rm -rf /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/classes.jack; exit 41 ) ) && (mv /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/classes*.dex /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/with-local/ ) && (rm -f /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list ) && (mv /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc/java-source-list-uniq /home/android/RR/out/target/common/obj/APPS/DownloadProvider_intermediates/jack-rsc.java-source-list )"
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadStorageProvider.java:326: The method setFilterByString(String) is undefined for the type DownloadManager.Query
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java:150: COLUMN_DESTINATION cannot be resolved or is not a field
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java:155: COLUMN_FILE_NAME_HINT cannot be resolved or is not a field
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java:1133: The method update(SQLiteDatabase, ContentValues, String, String[]) is undefined for the type SQLiteQueryBuilder
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java:1237: The method setStrictColumns(boolean) is undefined for the type SQLiteQueryBuilder
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java:1238: The method setStrictGrammar(boolean) is undefined for the type SQLiteQueryBuilder
ERROR: /home/android/RR/packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadProvider.java:1316: The method delete(SQLiteDatabase, String, String[]) is undefined for the type SQLiteQueryBuilder
It looks like it's a jack error. I compiled 2 different roms and arrived at the same error. How can I fix it if it's possible?