Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error android_hardware_Camera.cpp on Ubuntu #116

Open
mihaimacarie98 opened this issue Apr 10, 2023 · 4 comments
Open

Compilation error android_hardware_Camera.cpp on Ubuntu #116

mihaimacarie98 opened this issue Apr 10, 2023 · 4 comments

Comments

@mihaimacarie98
Copy link

mihaimacarie98 commented Apr 10, 2023

[  3% 1055/27872] //frameworks/base/core/jni:libandroid_runtime clang++ android_hardware_Camera.cpp
FAILED: out/soong/.intermediates/frameworks/base/core/jni/libandroid_runtime/android_arm64_armv8-a_cortex-a72_shared/obj/frameworks/base/core/jni/android_hardware_Camera.o
PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wunreachable-code-loop-increment -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fdebug-default-version=5 -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=string-plus-int -Werror=unreachable-code-loop-increment -D__compiler_offsetof=__builtin_offsetof -faddrsig -fcommon -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -Wno-gnu-designator -Wno-gnu-folding-constant -Wunguarded-availability -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -ffp-contract=off -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -fdebug-info-for-profiling -march=armv8-a -mcpu=cortex-a53 -target aarch64-linux-android10000 -DANDROID_STRICT -fPIC -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -Iframeworks/base/core/jni -Iframeworks/base/core/jni/include -Iexternal/skia/include/private -Iframeworks/base/media/jni -Isystem/media/camera/include -Isystem/media/private/camera/include -Iframeworks/base/core/jni -Iout/soong/.intermediates/frameworks/base/core/jni/libandroid_runtime/android_arm64_armv8-a_cortex-a72_shared/gen/aidl -D__LIBANDROIDICU_API__=10000 -D__LIBDL_ANDROID_API__=10000 -D__LIBC_API__=10000 -D__LIBM_API__=10000 -D__LIBDL_API__=10000 -Ibionic/libc/platform -Ipackages/modules/DnsResolver/include/dnsproxyd_protocol -Iframeworks/base/core/jni/include_vm -Ilibnativehelper/include_jni -Ibionic/libc/async_safe/include -Isystem/logging/liblog/include -Iframeworks/native/libs/binderthreadstate/include -Isystem/memory/libmeminfo/libdmabufinfo/include -Iexternal/giflib -Iframeworks/native/libs/binder/include -Isystem/libbase/include -Iexternal/fmtlib/include -Iframeworks/native/libs/binder/ndk/include_cpp -Isystem/core/libcutils/include -Isystem/core/libutils/include -Isystem/unwinding/libbacktrace/include -Isystem/core/libprocessgroup/include -Isystem/core/libsystem/include -Iout/soong/.intermediates/frameworks/native/libs/binder/libbinder/android_arm64_armv8-a_cortex-a72_shared/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_window_info_static/android_arm64_armv8-a_cortex-a72_static/gen/aidl -Ibionic/libc/seccomp/include -Isystem/core/libgrallocusage/include -Iexternal/scrypt/lib/crypto -Ipackages/modules/StatsD/lib/libstatssocket/include -Iexternal/skia/android -Iexternal/skia -Iexternal/skia/client_utils/android -Iexternal/skia/include/android -Iexternal/skia/include/c -Iexternal/skia/include/codec -Iexternal/skia/include/config -Iexternal/skia/include/core -Iexternal/skia/include/docs -Iexternal/skia/include/effects -Iexternal/skia/include/encode -Iexternal/skia/include/gpu -Iexternal/skia/include/pathops -Iexternal/skia/include/ports -Iexternal/skia/include/svg -Iexternal/skia/include/utils -Iexternal/skia/include/utils/mac -Iexternal/skia/modules/particles/include -Iexternal/skia/modules/skottie/include -Iexternal/skia/modules/skparagraph/include -Iexternal/skia/modules/skshaper/include -Iexternal/skia/modules/svg/include -Iexternal/vulkan-headers/include -Ilibnativehelper/header_only_include -Ilibnativehelper/include -Ilibnativehelper/include_platform -Ilibnativehelper/include_platform_header_only -Isystem/libziparchive/incfs_support/include -Isystem/libziparchive/include -Iexternal/googletest/googletest/include -Iexternal/libcxxabi/include -Iexternal/harfbuzz_ng/src -Iframeworks/minikin/include -Iexternal/icu/libandroidicu/include -Iexternal/zlib -Iout/soong/.intermediates/frameworks/base/media/android.media.audio.common.types-V1-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/native/libs/permission/framework-permission-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audioclient-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/av-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libshmem/shared-file-region-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/effect-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audioflinger-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audiopolicy-types-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/spatializer-aidl-cpp-source/gen/include -Isystem/libhidl/base/include -Isystem/libhidl/transport/include -Isystem/libfmq/base -Isystem/libhwbinder/include -Iout/soong/.intermediates/system/libhidl/transport/manager/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/manager/1.1/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/manager/1.2/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/system/libhidl/transport/base/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/camera/common/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/camera/device/3.2/[email protected]_genc++_headers/gen -Iframeworks/native/libs/battery -Iframeworks/libs/net/common/netd/libnetdutils/include -Isystem/memory/libmemtrack/include -Iframeworks/base/libs/androidfw/include -Isystem/incremental_delivery/incfs/util/include -Isystem/core/libappfuse/include -Iexternal/boringssl/src/include -Isystem/core/debuggerd/include -Isystem/core/debuggerd/common/include -Iframeworks/native/libs/binder/ndk/include_ndk -Iframeworks/native/libs/binder/ndk/include_platform -Iframeworks/native/libs/ui/include -Iframeworks/native/libs/ui/include_private -Iframeworks/native/libs/nativebase/include -Iframeworks/native/libs/nativewindow/include -Ihardware/libhardware/include -Isystem/media/audio/include -Ipackages/modules/Bluetooth/system/types -Iframeworks/native/libs/math/include -Iframeworks/native/libs/ui/include_mock -Iframeworks/native/libs/ui/include_types -Iframeworks/native/libs/arect/include -Iout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common-V2-ndk-source/gen/include -Iout/soong/.intermediates/hardware/interfaces/graphics/common/aidl/android.hardware.graphics.common-V3-ndk-source/gen/include -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.1/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/common/1.2/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/mapper/4.0/[email protected]_genc++_headers/gen -Iframeworks/native/libs/gralloc/types/include -Iframeworks/native/libs/graphicsenv/include -Iframeworks/native/libs/gui/include -Isystem/libhidl/transport/token/1.0/utils/include -Iout/soong/.intermediates/hardware/interfaces/media/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/bufferqueue/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/hardware/interfaces/graphics/bufferqueue/2.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_aidl_static/android_arm64_armv8-a_cortex-a72_static/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/gui/sysprop/libLibGuiProperties/android_arm64_armv8-a_cortex-a72_static_lto-thin/gen/sysprop/include -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_aidl_static/android_arm64_armv8-a_cortex-a72_static_lto-thin/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui_window_info_static/android_arm64_armv8-a_cortex-a72_static_lto-thin/gen/aidl -Iframeworks/native/opengl/libs/EGL/include -Iframeworks/native/opengl/include -Iframeworks/native/libs/nativewindow/include-private -Iout/soong/.intermediates/frameworks/native/libs/gui/libgui/android_arm64_armv8-a_cortex-a72_shared/gen/aidl -Iframeworks/base/libs/hwui/apex/include -Iexternal/protobuf/src -Iout/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_arm64_armv8-a_cortex-a72_static/gen/proto/frameworks/base/libs/hwui -Iout/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_arm64_armv8-a_cortex-a72_static/gen/proto -Iout/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_arm64_armv8-a_cortex-a72_static/gen/sysprop/include -Iout/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_arm64_armv8-a_cortex-a72_shared/gen/proto/frameworks/base/libs/hwui -Iout/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_arm64_armv8-a_cortex-a72_shared/gen/proto -Iout/soong/.intermediates/frameworks/base/libs/hwui/libhwui/android_arm64_armv8-a_cortex-a72_shared/gen/sysprop/include -Iframeworks/av/media/ndk/include -Iframeworks/av/media/ndk/include_platform -Iframeworks/native/libs/permission/include -Iframeworks/native/libs/sensor/include -Iout/soong/.intermediates/frameworks/native/libs/input/libinput/android_arm64_armv8-a_cortex-a72_static/gen/aidl -Iout/soong/.intermediates/frameworks/native/libs/input/libinput/android_arm64_armv8-a_cortex-a72_shared/gen/aidl -Iframeworks/av/camera/include -Iframeworks/av/camera/include/camera -Isystem/media/camera/include -Iout/soong/.intermediates/frameworks/av/camera/libcamera_client/android_arm64_armv8-a_cortex-a72_shared_cfi/gen/aidl -Isystem/libprocinfo/include -Iexternal/sqlite/dist -Iexternal/sqlite/android -Isystem/incremental_delivery/incfs/include -Isystem/incremental_delivery/incfs/kernel-headers -Isystem/incremental_delivery/libdataloader/include -Iexternal/libjpeg-turbo -Ihardware/libhardware_legacy/include -Iexternal/selinux/libselinux/include -Iframeworks/av/media/libmedia/include -Iframeworks/av/media/libstagefright/include -Iout/soong/.intermediates/frameworks/av/services/mediaresourcemanager/resourcemanager_aidl_interface-ndk-source/gen/include -Iframeworks/av/media/libaudioclient/include -Iframeworks/av/media/libaudiofoundation/include -Iframeworks/av/media/liberror/include -Iframeworks/av/media/libmediahelper/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/capture_state_listener-aidl-cpp-source/gen/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/audiopolicy-aidl-cpp-source/gen/include -Iframeworks/av/media/libmediametrics/include -Iout/soong/.intermediates/frameworks/av/media/libaudioclient/libaudioclient/android_arm64_armv8-a_cortex-a72_static_cfi/gen/aidl -Iframeworks/av/media/libmedia/aidl -Iframeworks/native/headers/media_plugin -Iframeworks/native/headers/media_plugin/media/openmax -Iframeworks/av/media/libstagefright/foundation/include -Iout/soong/.intermediates/hardware/interfaces/media/omx/1.0/[email protected]_genc++_headers/gen -Iout/soong/.intermediates/frameworks/av/media/libmedia/libmedia_omx/android_arm64_armv8-a_cortex-a72_shared_cfi/gen/aidl -Iout/soong/.intermediates/frameworks/av/media/libmedia/libmedia/android_arm64_armv8-a_cortex-a72_static_cfi/gen/aidl -Isystem/memory/libmeminfo/include -Isystem/memory/libmeminfo/libdmabufinfo/include -Isystem/core/libusbhost/include -Iexternal/pdfium/public -Iframeworks/av/media/img_utils/include -Isystem/netd/include -Iart/libnativebridge/include -Iart/libnativeloader/include -Isystem/memory/libmemunreachable/include -Isystem/libvintf/include -Isystem/libvintf -Isystem/tools/aidl/metadata/include -Isystem/tools/hidl/metadata/include -Ipackages/modules/Gki/libkver/include -Isystem/tools/hidl/utils/include -Iframeworks/native/libs/nativedisplay/include -Iframeworks/native/libs/nativedisplay/include-private -Iframeworks/native/libs/cputimeinstate -Isystem/server_configurable_flags/libflags/include -Iexternal/libcxx/include -Iexternal/jemalloc_new/include -Ibionic/libc/system_properties/include -Isystem/core/property_service/libpropertyinfoparser/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Wno-unused-parameter -Wno-non-virtual-dtor -Wno-parentheses -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -DU_USING_ICU_NAMESPACE=0 -Wall -Werror -Wno-error=deprecated-declarations -Wunused -Wunreachable-code -std=gnu++17 -Wno-conversion-null -fno-rtti -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include  -Werror=bool-operation -Werror=implicit-int-float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=string-compare -Werror=xor-used-as-pow -Wno-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-string-compare -Wno-pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -MD -MF out/soong/.intermediates/frameworks/base/core/jni/libandroid_runtime/android_arm64_armv8-a_cortex-a72_shared/obj/frameworks/base/core/jni/android_hardware_Camera.o.d -o out/soong/.intermediates/frameworks/base/core/jni/libandroid_runtime/android_arm64_armv8-a_cortex-a72_shared/obj/frameworks/base/core/jni/android_hardware_Camera.o frameworks/base/core/jni/android_hardware_Camera.cpp
frameworks/base/core/jni/android_hardware_Camera.cpp:541:71: error: too many arguments to function call, expected 2, have 3
    status_t rc = Camera::getCameraInfo(cameraId, overrideToPortrait, &cameraInfo);
                  ~~~~~~~~~~~~~~~~~~~~~                               ^~~~~~~~~~~
frameworks/av/camera/include/camera/CameraBase.h:129:26: note: 'getCameraInfo' declared here
    static status_t      getCameraInfo(int cameraId,
                         ^
frameworks/base/core/jni/android_hardware_Camera.cpp:571:47: error: too many arguments to function call, expected 5, have 6
                            targetSdkVersion, overrideToPortrait);
                                              ^~~~~~~~~~~~~~~~~~
frameworks/av/camera/include/camera/Camera.h:82:25: note: 'connect' declared here
    static  sp<Camera>  connect(int cameraId,
                        ^
frameworks/base/core/jni/android_hardware_Camera.cpp:599:71: error: too many arguments to function call, expected 2, have 3
    status_t rc = Camera::getCameraInfo(cameraId, overrideToPortrait, &cameraInfo);
                  ~~~~~~~~~~~~~~~~~~~~~                               ^~~~~~~~~~~
frameworks/av/camera/include/camera/CameraBase.h:129:26: note: 'getCameraInfo' declared here
    static status_t      getCameraInfo(int cameraId,
                         ^
3 errors generated.
08:30:35 ninja failed with: exit status 1

#### failed to build some targets (02:33 (mm:ss)) ####
@Assunzain
Copy link

try to commit with this Assunzain/frameworks_base@c1636a8

@mihaimacarie98
Copy link
Author

try to commit with this Assunzain/frameworks_base@c1636a8

I've tried but I get other errors now:
frameworks/base/core/jni/android_hardware_Camera.cpp:482:34: error: use of undeclared identifier 'CAMERA_CMD_LONGSHOT_ON' rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_ON, 0, 0); ^ frameworks/base/core/jni/android_hardware_Camera.cpp:484:34: error: use of undeclared identifier 'CAMERA_CMD_LONGSHOT_OFF' rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_OFF, 0, 0); ^ frameworks/base/core/jni/android_hardware_Camera.cpp:500:29: error: use of undeclared identifier 'CAMERA_CMD_HISTOGRAM_SEND_DATA' rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_SEND_DATA, 0, 0); ^ frameworks/base/core/jni/android_hardware_Camera.cpp:515:32: error: use of undeclared identifier 'CAMERA_CMD_HISTOGRAM_ON' rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_ON, 0, 0); ^ frameworks/base/core/jni/android_hardware_Camera.cpp:517:32: error: use of undeclared identifier 'CAMERA_CMD_HISTOGRAM_OFF' rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_OFF, 0, 0); ^ frameworks/base/core/jni/android_hardware_Camera.cpp:591:71: error: too many arguments to function call, expected 2, have 3 status_t rc = Camera::getCameraInfo(cameraId, overrideToPortrait, &cameraInfo); ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~ frameworks/av/camera/include/camera/CameraBase.h:129:26: note: 'getCameraInfo' declared here static status_t getCameraInfo(int cameraId, ^ frameworks/base/core/jni/android_hardware_Camera.cpp:621:47: error: too many arguments to function call, expected 5, have 6 targetSdkVersion, overrideToPortrait); ^~~~~~~~~~~~~~~~~~ frameworks/av/camera/include/camera/Camera.h:82:25: note: 'connect' declared here static sp<Camera> connect(int cameraId, ^ frameworks/base/core/jni/android_hardware_Camera.cpp:649:71: error: too many arguments to function call, expected 2, have 3 status_t rc = Camera::getCameraInfo(cameraId, overrideToPortrait, &cameraInfo); ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~ frameworks/av/camera/include/camera/CameraBase.h:129:26: note: 'getCameraInfo' declared here static status_t getCameraInfo(int cameraId, ^ frameworks/base/core/jni/android_hardware_Camera.cpp:845:34: error: use of undeclared identifier 'CAMERA_CMD_METADATA_ON' rc = camera->sendCommand(CAMERA_CMD_METADATA_ON, 0, 0); ^ frameworks/base/core/jni/android_hardware_Camera.cpp:847:34: error: use of undeclared identifier 'CAMERA_CMD_METADATA_OFF' rc = camera->sendCommand(CAMERA_CMD_METADATA_OFF, 0, 0); ^ 10 errors generated. [ 17% 6034/33626] //frameworks/base/services/incremental:service.incremental clang-tidy IncrementalService.cpp out/soong/.intermediates/frameworks/base/services/incremental/service.incremental.proto/android_arm64_armv8-a_cortex-a72_static/gen/proto/frameworks/base/services/incremental/Metadata.pb.h:503:17: warning: operator=() does not handle self-assignment properly [bugprone-unhandled-self-assignment] inline Mount& operator=(const Mount& from) { ^ 17:02:12 ninja failed with: exit status 1

@jonas-tl
Copy link

I face the same error, then I change to use this branch and issue is gone: android-13.0.0_r30

repo init -u https://android.googlesource.com/platform/manifest -b android-13.0.0_r30

@losgobbi
Copy link

losgobbi commented Jun 6, 2024

Hi, all. This is very old and recently I've also build for rpi4 using Ubuntu and faced no errors.
Please, close if this is not a issue anymore.
Tks and regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants