LineageOS and build error (kernel/gcc) - Nexus 5 Developer Discussion [Developers Only]

Hi,
I had my environment set up for building LineageOS (Ubuntu xenial) and it was working perfectly fine.
I haven't updated the machine since March 2017.
Now I did 'repo sync' and suddenly I'm getting the following errors during brunch hammerhead
Code:
LD drivers/video/msm/mdss/mdss-dsi.o
LD drivers/video/msm/mdss/built-in.o
LD drivers/video/msm/built-in.o
LD drivers/video/built-in.o
LD drivers/usb/gadget/g_android.o
LD drivers/usb/gadget/built-in.o
LD drivers/usb/built-in.o
LD drivers/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
ERROR: modpost: Found 12 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
/media/rawi/android/lineageos/kernel/lge/hammerhead/scripts/Makefile.modpost:98: recipe for target 'vmlinux.o' failed
make[2]: *** [vmlinux.o] Error 1
/media/rawi/android/lineageos/kernel/lge/hammerhead/Makefile:936: recipe for target 'vmlinux.o' failed
make[1]: *** [vmlinux.o] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/media/rawi/android/lineageos/kernel/lge/hammerhead'
[ 12% 4387/34154] target Java: android-support-compat-ics-mr1 (/media/rawi/android/lineageos/out/target/common/obj/JAVA_LIBRARIES/android-support-compat-ics-mr1_intermediates/classes)
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/media/rawi/android/lineageos'
#### make failed to build some targets (13:29 (mm:ss)) ####
What I've already googled is that it's probably wrong toolchain used but I'm using the one supplied with LineageOS which is arm-eabi-4.8.
I added (not sure if it's necessary) the following exports
Code:
export PATH="/media/rawi/android/lineageos/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin:$PATH"
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE="/media/rawi/android/lineageos/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-"
I'd like to highlight that this environment was building LineageOS (cm-14.1 branch) in March perfectly fine
I know that I can add CONFIG_NO_ERROR_ON_MISMATCH=y to config but I assume this is not the right way to do.
Any help greatly appreciated
EDIT: solved... I was compiling CAF kernel with non-caf device

Thread closed as per OP request
-XDA Staff

Related

[Q] Well, I'm stuck. Make errors...

I can't seem to catch a break...
I haven't been able to compile anything with my build environment. For at least a few weeks. I know it should work, because I compiled a build of WD40M0D prior to all my merging of source. I'm using a MacBookPro running OS X 10.5.8
When trying to build a kernel, I get errors on "bounds.s" and "prepare0":
Code:
sean-whitleys-macbook-pro:kernel-msm wdfowty$ make ARCH=arm CROSS_COMPILE=$CCOMPILER
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
Generating include/generated/mach-types.h
CC kernel/bounds.s
cc1: error: invalid option ‘little-endian’
cc1: error: invalid option ‘abi=aapcs-linux’
cc1: error: invalid option ‘no-thumb-interwork’
kernel/bounds.c:1: error: bad value (armv5t) for -march= switch
kernel/bounds.c:1: error: bad value (armv5t) for -mtune= switch
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
My next error, if I skip the kernel, is in building libgps.so...It claims to not be able to find librpc.so, which to the best of my knowledge is where it's supposed to be (somewhere in the out directory).
Code:
#
/Users/wdfowty/bin/mydroid/prebuilt/darwin-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: warning: librpc.so, needed by out/target/product/passion/obj/lib/libgps.so, not found (try using -rpath or -rpath-link)
Some things I've noticed...
*Kernel error is constant across AOSP and CM source (could it be a bad .config?)
*Errors persist even after running "make clobber" or "make installclean"
I'm hoping someone can help, as I'm running on minimal knowledge and experience...Thank you in advance!
Here's the full librpc.so error on pastebin: http://pastebin.com/VBtAffE0

[CRICKET]Getting errors when compiling the kernel

I have been trying to compile the kernel for our device for the last 2 days.
But all i do is keep running into dead ends.
I have it almost all worked out to work with the linaro toolchain but i still end up with either this error
Code:
make -j9 ARCH=arm CROSS_COMPILE=~/toolchains/arm-2011.09/bin/arm-none-eabi-
CHK include/linux/version.h
make[1]: Nothing to be done for `arch/arm/boot/dtbs'.
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CHK kernel/config_data.h
CC drivers/media/radio/radio-iris.o
CC [M] drivers/media/radio/radio-iris-transport.o
LD drivers/media/radio/built-in.o
LD drivers/media/built-in.o
LD drivers/built-in.o
LD vmlinux.o
MODPOST vmlinux.o
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o: In function `video_open':
/home/kalisto/kernel/android_kernel_htc_a11ul/drivers/media/radio/radio-iris.c:5069: undefined reference to `hci_fm_smd_register'
drivers/built-in.o: In function `iris_remove':
/home/kalisto/kernel/android_kernel_htc_a11ul/drivers/media/radio/radio-iris.c:5226: undefined reference to `hci_fm_smd_deregister'
make: *** [.tmp_vmlinux1] Error 1
Or this error
Code:
ERROR: "hci_fm_smd_deregister" [drivers/media/radio/radio-iris.ko] undefined!
ERROR: "hci_fm_smd_register" [drivers/media/radio/radio-iris.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
make: *** Waiting for unfinished jobs....
Kernel: arch/arm/boot/Image is ready
AS arch/arm/boot/compressed/head.o
GZIP arch/arm/boot/compressed/piggy.gzip
CC arch/arm/boot/compressed/misc.o
CC arch/arm/boot/compressed/decompress.o
CC arch/arm/boot/compressed/string.o
SHIPPED arch/arm/boot/compressed/lib1funcs.S
SHIPPED arch/arm/boot/compressed/ashldi3.S
AS arch/arm/boot/compressed/ashldi3.o
AS arch/arm/boot/compressed/lib1funcs.o
AS arch/arm/boot/compressed/piggy.gzip.o
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
real 3m13.707s
user 18m42.083s
sys 2m24.205s
Anyone that could point me in the right direction would be great
you could try commenting out the aspects of code that are undefined references.that is more of just a hackish workaround and may cause other problems,so say for the error in /drivers/media/radio/radio-iris.c,as long as "hci_fm_smd_register" is just a single line,you could just // it out and it will be commented out,same for the other file,but if they are whole functions you could find the start and fully comment it out with /* all_code_inside_the_function */ <- with this being at the end of the function
pattyboi:) said:
you could try commenting out the aspects of code that are undefined references.that is more of just a hackish workaround and may cause other problems,so say for the error in /drivers/media/radio/radio-iris.c,as long as "hci_fm_smd_register" is just a single line,you could just // it out and it will be commented out,same for the other file,but if they are whole functions you could find the start and fully comment it out with /* all_code_inside_the_function */ <- with this being at the end of the function
Click to expand...
Click to collapse
Turns out i just needed to turn off the radio in the defconfig. Problems solved
kalisto2002 said:
Turns out i just needed to turn off the radio in the defconfig. Problems solved
Click to expand...
Click to collapse
thats odd....i've never had this error

ninja error on compiling rr

Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/kunwar/RR/out/target/product/s2/obj_arm/SHARED_LIBRARIES/libtfa9890_intermediates/export_includes', needed by '/home/kunwar/RR/out/target/product/s2/obj_arm/SHARED_LIBRARIES/audio_amplifier.msm8952_intermediates/import_includes', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/kunwar/RR'
You missed Vendor Tree
How to solve that issue

Building my first rom 7.1.1

Hey guys I'm trying to build my first ROM. I fetched the android 7.1.1 r55 source from Google. I downloaded the software binaries of Xperia Z1 and I have UBUNTU 14.04 LTS. I'm getting an Issue while building
bootable/recovery/minui/graphics_overlay.cpp:34:10: fatal error: 'linux/msm_mdp.h' file not found
#include <linux/msm_mdp.h>
^
1 error generated.
[ 4% 28/695] target thumb C: libcrypto_static <= external/boringssl/android_compat_hacks.c
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
Help me...
Thank you

Magisk 18.1 build environment issues

Hi everyone, I'm having issues with compiling Magisk from a fresh environment. Has anyone had success building the latest Magisk, if so, what did your environment look like? Here is what I did...
Fresh Docker Ubuntu Instance
Installed Python3.7
Installed Android SDK Tools
Installed "ndk-bundle" "platform-tools" from sdkmanager
Downloaded/Extracted latest FrankeNDK
Set ANDROID_HOME to sdk path, and ANDROID_NDK_HOME to FrankeNDK path
Full clone w/submodule of Magisk Repo
Setup config.prop
python3 build.py -v binary
However this always produces the same linker error:
Code:
[armeabi-v7a] Executable : busybox
[armeabi-v7a] SharedLibrary : libsqlite.so
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/.[x86] SharedLibrary : libsqlite.so
./../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o:1:3: invalid character
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o:1:3: syntax error, unexpected $end
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o: not an object or archive
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libsqlite.so] Error 1
make: *** Waiting for unfinished jobs....
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o:1:3: invalid character
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o:1:3: syntax error, unexpected $end
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o: not an object or archive
collect2: error: ld returned 1 exit status
make: *** [obj/local/x86/libsqlite.so] Error 1
make: Leaving directory `/root/dev/android/Magisk/native'
Build binary failed!
I opened an issue on GitHub:1167 and TJW indicated that the linker is missing flags -flto. However, I didn't mess with anything and the default file of /native/jni/Application.mk:APP_LDFLAGS := -flto contains those flags. Is there anything else I could try to get the build to work? Thanks

Categories

Resources