[Q] Compilation problem on Nexus One build - Nexus One Q&A, Help & Troubleshooting

I am trying to compile Android from the source for my Nexus One. I pretty much followed all instructions from here: http://forum.xda-developers.com/showthread.php?t=899674
Though the instructions are for Gingerbread, I don't really see much of a difference for Froyo. After I do a "make -j4", the following error is thrown:
Code:
Install: out/target/product/passion/system/lib/libmedia.so
target SharedLib: libstagefright_foundation (out/target/product/passion/obj/SHARED_LIBRARIES/libstagefright_foundation_intermediates/LINKED/libstagefright_foundation.so)
target SharedLib: libstagefright_color_conversion (out/target/product/passion/obj/SHARED_LIBRARIES/libstagefright_color_conversion_intermediates/LINKED/libstagefright_color_conversion.so)
target SharedLib: libaudio (out/target/product/passion/obj/SHARED_LIBRARIES/libaudio_intermediates/LINKED/libaudio.so)
target SharedLib: libaudiopolicy (out/target/product/passion/obj/SHARED_LIBRARIES/libaudiopolicy_intermediates/LINKED/libaudiopolicy.so)
target SharedLib: libcameraservice (out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so)
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::getCameraInfo(int, android::CameraInfo*):frameworks/base/services/camera/libcameraservice/CameraService.cpp:109: error: undefined reference to 'HAL_getCameraInfo'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:148: error: undefined reference to 'HAL_openCameraHardware'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:154: error: undefined reference to 'HAL_getCameraInfo'
collect2: ld returned 1 exit status
make: *** [out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so] Error 1
make: *** Waiting for unfinished jobs....
Note: cts/tools/dx-tests/src/dxc/junit/opcodes/invokeinterface/jm/T_invokeinterface_1.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compiling all jasmin (*.j)
compiling all .cfh files into .class files
generating Main_*.java files reading from cts/tools/dx-tests writing to out/host/darwin-x86/obj/EXECUTABLES/dx-tests_intermediates/mainfiles
using java src:cts/tools/dx-tests/src
Collecting all junit tests...
Time: 0.025
OK (0 tests)
Can someone please help me resolve this issue?

If you want to compile Froyo - use a different guide. Either from CM6 page or from Android SDK explanations.
You're failing on library incompatibilities, specifically Camera lib - but since I don't know, what's the source core you're running (Froyo or Gingerbread repo), it's hard to say how to fix it. If you're following the guide in your post completely and compiling GB - you probably missed the "Fix Camera" part.

My bad! You're right.. There was the fix right at the bottom of that article. Thank you for pointing it out. Everything works properly..

Related

[Q] Keep getting Error when attempting First CM build

Hey guys I have another question about my first attempt at building from source. when I run
make -j`grep 'processor' /proc/cpuinfo | wc -l` CYANOGEN_WITH_GOOGLE=true bacon
Click to expand...
Click to collapse
The make command runs for a bit and does its thing and then I get an error
target Dex: VisualizationWallpapers
target Package: VisualizationWallpapers (out/target/product/sholes/obj/APPS/VisualizationWallpapers_intermediates/package.apk)
'out/target/common/obj/APPS/VisualizationWallpapers_intermediates/classes.dex' as 'classes.dex'...
Install: out/target/product/sholes/system/app/VisualizationWallpapers.apk
Copying: out/target/common/obj/APPS/VoiceDialer_intermediates/classes-full-names.jar
Copying: out/target/common/obj/APPS/VoiceDialer_intermediates/classes.jar
target Dex: VoiceDialer
target Package: VoiceDialer (out/target/product/sholes/obj/APPS/VoiceDialer_intermediates/package.apk)
'out/target/common/obj/APPS/VoiceDialer_intermediates/classes.dex' as 'classes.dex'...
Install: out/target/product/sholes/system/app/VoiceDialer.apk
target Executable: CameraServiceTest (out/target/product/sholes/obj/EXECUTABLES/CameraServiceTest_intermediates/LINKED/CameraServiceTest)
/home/andrew/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: warning: libril_rds.so, needed by out/target/product/sholes/obj/lib/libmoto_gps.so, not found (try using -rpath or -rpath-link)
/home/andrew/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: warning: libnmea.so, needed by out/target/product/sholes/obj/lib/libmoto_gps.so, not found (try using -rpath or -rpath-link)
out/target/product/sholes/obj/lib/libmoto_gps.so: undefined reference to `RdsSetupRemoteConnection'
out/target/product/sholes/obj/lib/libmoto_gps.so: undefined reference to `RdsUtilCreateMsg'
out/target/product/sholes/obj/lib/libmoto_gps.so: undefined reference to `nmea_parse_sentence'
out/target/product/sholes/obj/lib/libmoto_gps.so: undefined reference to `RdsUtilSendMsg'
out/target/product/sholes/obj/lib/libmoto_gps.so: undefined reference to `nmea_parse_error_string'
out/target/product/sholes/obj/lib/libmoto_gps.so: undefined reference to `RdsReadServerRsp'
collect2: ld returned 1 exit status
make: *** [out/target/product/sholes/obj/EXECUTABLES/CameraServiceTest_intermediates/LINKED/CameraServiceTest] Error 1
andrewUbuntu: ~/android/system
Click to expand...
Click to collapse
Bueller? anyone?
Seems like the extract-files.sh did not work.
The libraries missing are breaking the build.
Ensure the extract-files.sh was done properly.
Please disregard my previous post.
Seems like there are a couple inconsistencies on the sholes vendor tree. I am experiencing the same issue now. Checking.
Will let you know what I found.
I was partially right about the extract-files.sh
First, go to /home/andrew/android/vendor/motorola/sholes and edit the BoardConfig.mk file. The line for the GPS libraries must have three files (separated by spaces) libmoto_gps, libnmea and libril_rds. From your post, yours only has the libmoto_gps.
Second, check if /home/andrew/android/vendor/motorola/sholes/proprietary contains the file pppd_ril. If the file is not there, you must use any file explorer with root to copy it from /system/bin on the phone to /home/andrew/android/vendor/motorola/sholes/proprietary in your computer.
Try the build again.

[Q] Building gingerbread from source

Ok i'm trying to compile gingerbread, and got stuck.
host SharedLib: libneo_cgi (out/host/linux-x86/obj/lib/libneo_cgi.so)
/usr/bin/ld: skipping incompatible out/host/linux-x86/obj/lib/libneo_util.so when searching for -lneo_util
/usr/bin/ld: cannot find -lneo_util
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libneo_cgi.so] 错误 1
I'm building fine using Ubuntu 10.04 32bit..
thk~~~
Has been resolved
Hey, can u tell me about compiling kernel that make u don't stuck on logo?

[Q] Headers location missing during the build process

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

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

Having issues compiling kernel...

I have built kernels before, but this one just spits out error after error after error.. very annoying and nothing I found seems to help.
Currently stuck with these errors and don't know how to solve them, any help is appreciated:
Code:
kperfmon_DUMMY="perflog.h file is missing."
cp: cannot stat '../../../system/core/liblog/include/log/perflog.h': No such file or directory
kperfmon_DUMMY=""
kperfmon_DUMMY=""
CC drivers/kperfmon/ologk.o
AR drivers/kperfmon/built-in.o
AR drivers/built-in.o
make[2]: *** No rule to make target '/home/dpi/qb5_8814/workspace/P4_1716/buildscript/tools/pil_splitter.py', needed by 'firmware/five/five.signed'. Stop.
/home/seth/AndroidKernel/G977p/Makefile:1165: recipe for target 'firmware' failed
make[1]: *** [firmware] Error 2
make[1]: Leaving directory '/home/seth/AndroidKernel/G977p/output'
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
The missing perflog.h file is a crucial component for the build process.
To resolve, locate the perflog.h:
find /path/to/starting/directory -type f -name "perflog.h"
Replace /path/to/starting/directory with the appropriate root directory to begin the search. Once located, transfer the file to the expected destination.
If the file is absent, examine the kernel source code repository. If the file is accessible, download it and place it in the required location.
The second issue pertains to a missing rule needed to create the target '/home/dpi/qb5_8814/workspace/P4_1716/buildscript/tools/pil_splitter.py'. This indicates that the build process anticipates a rule to generate the target file, but the rule is not specified in the Makefile.
To resolve this issue, take the following steps:
- Determine whether the target file (pil_splitter.py) exists within your system. If not, obtain it from the kernel source code repository.
- If the file is present, verify that the Makefile includes the appropriate rule for constructing the target file. It may be necessary to add or modify the rule in the Makefile, ensuring it references the correct dependencies and commands.

Categories

Resources