sandymanu / device_hammerhead

6 stars 2 forks source link

build error with Android 7.1.0 #1

Closed jide-opensource closed 7 years ago

jide-opensource commented 7 years ago

failed to build with hammerhead-userdebug

FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I device/lge/hammerhead/camera/QCamera2/HAL3/../stack/common -I frameworks/native/include/media/openmax -I frameworks/native/include -I frameworks/av/include -I hardware/qcom/media/libstagefrighthw -I system/media/camera/include -I device/lge/hammerhead/camera/QCamera2/HAL3/../../mm-image-codec/qexif -I device/lge/hammerhead/camera/QCamera2/HAL3/../../mm-image-codec/qomx_core -I device/lge/hammerhead/camera/QCamera2/HAL3/../util -I hardware/qcom/display/msm8974/libgralloc -I device/lge/hammerhead/camera/QCamera2/HAL3 -I out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates -I out/target/product/hammerhead/gen/SHARED_LIBRARIES/camera.hammerhead_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/opengl/include -isystem frameworks/base/include -isystem out/target/product/hammerhead/obj/include -isystem device/lge/hammerhead/kernel-headers -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem bionic/libm/include/arm -c    -fno-exceptions -Wno-multichar -msoft-float -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a15 -D__ARM_FEATURE_LPAE=1 -mfloat-abi=softfp -mfpu=neon -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc  -mcpu=krait -mfpu=neon-vfpv4 -target arm-linux-androideabi    -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin    -fvisibility-inlines-hidden -Wsign-promo  -Wno-inconsistent-missing-override -nostdlibinc  -target arm-linux-androideabi   -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing  -fno-rtti -Wall -Werror -DHAS_MULTIMEDIA_HINTS -Wno-unused-parameter -fPIC -D_USING_LIBCXX -Wno-tautological-pointer-compare -std=gnu++14  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type    -MD -MF out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.d -o out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.o device/lge/hammerhead/camera/QCamera2/HAL3/QCamera3Hal.cpp ) && (cp out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.d out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.d >> out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.P; rm -f out/target/product/hammerhead/obj/SHARED_LIBRARIES/camera.hammerhead_intermediates/QCamera3Hal.d )"
In file included from device/lge/hammerhead/camera/QCamera2/HAL3/QCamera3Hal.cpp:30:
In file included from device/lge/hammerhead/camera/QCamera2/HAL3/QCamera3Factory.h:35:
In file included from device/lge/hammerhead/camera/QCamera2/HAL3/QCamera3HWI.h:38:
In file included from device/lge/hammerhead/camera/QCamera2/HAL3/QCamera3HALHeader.h:33:
device/lge/hammerhead/camera/QCamera2/HAL3/../stack/common/mm_camera_interface.h:32:10: fatal error: 'linux/msm_ion.h' file not found
#include <linux/msm_ion.h>
         ^
1 error generated.
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
sandymanu commented 7 years ago

@jide-opensource Updated device tree now..Should fix your error.

PS : If you are using my kernel i have updated it again now. Please make sure to pull that too or you might face a similar error (kind of)

jide-opensource commented 7 years ago

Thanks for the quick fix. I use latest code and got the following error:

ninja: Entering directory `.'
ninja: error: 'out/target/product/hammerhead/obj/KERNEL_OBJ/usr', needed by 'out/target/product/hammerhead/obj/EXECUTABLES/mm-jpeg-interface-test_intermediates/mm_jpeg_ionbuf.o', missing and no known rule to make it
make: *** [ninja_wrapper] Error 1
sandymanu commented 7 years ago

@jide-opensource I guess you are building AOSP directly ? AOSP build system doesn't support inline kernel building. Hence it looks for kernel obj in out and hence your error

jide-opensource commented 7 years ago

@sandymanu Yes, I am building AOSP. I built the kernel following the guide http://source.android.com/source/building-kernels.html and copied the kernel image to out/target/product/hammerhead/kernel.

So, what's the right way to build a ROM for hammerhead? Should I do it with CyanogenMod instead of AOSP?

Thanks

sandymanu commented 7 years ago

You can use prebuilt kernel and build too.

Also google removed display,gps,media and more HAL codes from the aosp source for 8974 chip and hence you would need to add those back as well. Saying this as you are unaware of other required bits by the looks of it. ( I have reverted the google changes locally to add support for the same)

Of course you can cyanogenmod for hammerhead and it should have the required support i mentioned above. Your branch should be cm-14.1

oncipriani commented 7 years ago

I'm having exactly the same issue as @jide-opensource:

ninja: Entering directory '.'
ninja: error: 'out/target/product/hammerhead/obj/KERNEL_OBJ/usr', needed by 'out/target/product/hammerhead/obj/EXECUTABLES/mm-jpeg-interface-test_intermediates/mm_jpeg_ionbuf.o', missing and no known rule to make it
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

I am also trying to build AOSP, but I already have a prebuilt kernel and exported its location with the following command:

export TARGET_PREBUILT_KERNEL=/aosp/device/lge/hammerhead-kernel/arch/arm/boot/zImage-dtb

Any suggestions?

rhoadster91 commented 6 years ago

Sorry for the necrobump; I know I am over a year late. But for future reference, if anyone gets this issue, just create the directory out/target/product/hammerhead/obj/KERNEL_OBJ/usr and then run make.

sandymanu commented 6 years ago

@rhoadster91 This doesn't help all the time. The inline kernel building mechanism creates the directories and symlinks.

For prebuilt kernel, sometimes yeah creating manually helps.

Zaheer-P commented 5 years ago

@rhoadster91 where/how do you run make