[Q] Well, I'm stuck. Make errors... - Nexus One Q&A, Help & Troubleshooting

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

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] how to compile a driver/kernel ?

how to compile a driver ? SLOVE
i have problem after,,
#cp arch/arm/configs/htc_msm_android_defconfig .config
#make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- TARGET_BOARD_PLATFORM=msm7k
make: arm-none-linux-gnueabi-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
make: arm-none-linux-gnueabi-gcc: Command not found
CHK include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC kernel/bounds.s
/bin/sh: arm-none-linux-gnueabi-gcc: command not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
slove after download
codesourcery......com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

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

LineageOS and build error (kernel/gcc)

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

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