Closed ChandanGirish closed 7 months ago
There should be an actual error message somewhere before that.
Have you followed the steps on establishing the build enviroment including installing the additional packages (IIRC libcamera needs some of the additional python libraries)? What Linux distro are you using to build?
Yes, I followed the steps on establishing Android build environment and repo installation. And then I installed additional packages as in Step 2. (https://github.com/raspberry-vanilla/android_local_manifest/tree/android-13.0)
Version: Ubuntu 22.04.3 LTS Refer meson-log.txt : attached log text
Ok, this is strange as I'm also on Ubuntu 22.04.3 LTS and I can't reproduce any issue with building libcamera. One difference I did notice is that I'm on meson version 1.2.3 while you have 1.3.0.
The meson build system that is used for building e.g. libcamera is actually a hack and not how libraries should be built on Android. Generally the AOSP tree also provides the necessary build tools but with the meson build system, the tools you have installed on your host machine also make a difference.
It looks like src/libcamera/base/meson.build:56:21: ERROR: shared_library keyword argument "version" Invalid Shared library version "". Must be of the form X.Y.Z where all three are numbers. Y and Z are optional.
is the actual error. I don't know if newer meson versions need the project's version number to be set. For my libcamera fork I've specifically removed the version as it caused different issues (https://github.com/raspberry-vanilla/android_external_libcamera/commit/f6ffa1b401177788c257367aa55575bf36cb324c).
I had the same issue. downgrading the meson version to 1.2.3 from 1.3.0 did the job.
This is now fixed in android-14.0
and android-13.0
branches. Please sync your sources.
I am trying to build for Android 13.0 and I followed steps in : https://github.com/raspberry-vanilla/android_local_manifest/tree/android-13.0 But I encountered some error after : lunch aosp_rpi4_car-userdebug
[ 87% 124372/142083] build out/target/product/rpi4/obj/MESON_LIBCAMERA/.build.timestamp
FAILED: out/target/product/rpi4/obj/MESON_LIBCAMERA/.build.timestamp
/bin/bash -c "(rm -rf out/target/product/rpi4/obj/MESON_LIBCAMERA/ ) && (mkdir -p out/target/product/rpi4/obj/MESON_LIBCAMERA/ ) && (mkdir -p out/target/product/rpi4/obj/MESON_LIBCAMERA//build ) && (cp -r
external/libcamera//* out/target/product/rpi4/obj/MESON_LIBCAMERA/ ) && (cd out/target/product/rpi4/obj/MESON_LIBCAMERA && PATH=/usr/bin:/usr/local/bin:\$PATH meson ./build --cross-file /home/chandan/new
build/out/target/product/rpi4/obj/MESON_LIBCAMERA_GEN/aosp_cross --buildtype=release -Dwerror=false -Dandroid=enabled -Dipas=raspberrypi -Dpipelines=raspberrypi -Dsysconfdir=/vendor/etc -Dtest=false ) &&
(PATH=/usr/bin:/bin:/sbin:\$PATH ninja -C out/target/product/rpi4/obj/MESON_LIBCAMERA/build ) && (touch out/target/product/rpi4/obj/MESON_LIBCAMERA/.build.timestamp )"
DEPRECATION: "pkgconfig" entry is deprecated and should be replaced by "pkg-config"
DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
The Meson build system
Version: 1.3.0
Source dir: /home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA
Build dir: /home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA/build
Build type: cross build
Project name: libcamera
Project version: 0.0.5
C compiler for the host machine: /home/chandan/newbuild/prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang (clang 14.0.6 "Android (8490178, based on r450784d) clang version 14.0.6 (https://android.g
ooglesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)")
C linker for the host machine: /home/chandan/newbuild/prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang ld.lld 14.0.6
C++ compiler for the host machine: /home/chandan/newbuild/prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ (clang 14.0.6 "Android (8490178, based on r450784d) clang version 14.0.6 (https://andro
id.googlesource.com/toolchain/llvm-project 4c603efb0cca074e9238af8b4106c30add4418f6)")
C++ linker for the host machine: /home/chandan/newbuild/prebuilts/clang/host/linux-x86/clang-r450784d/bin/clang++ ld.lld 14.0.6
C compiler for the build machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the build machine: cc ld.bfd 2.38
C++ compiler for the build machine: c++ (gcc 11.4.0 "c++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C++ linker for the build machine: c++ ld.bfd 2.38
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: aarch64
Host machine cpu: aarch64
Target machine cpu family: aarch64
Target machine cpu: aarch64
Header "unistd.h" has symbol "issetugid" : NO
Header "locale.h" has symbol "locale_t" : YES
Header "stdlib.h" has symbol "secure_getenv" : NO
Compiler for C supports arguments -Wno-c99-designator: YES
Found pkg-config: YES (/usr/bin/pkg-config) 0.29.2
Found CMake: NO
Run-time dependency lttng-ust found: NO (tried pkgconfig and cmake)
Program ./parser.py found: YES (/home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA/utils/ipc/./parser.py)
Program ./generate.py found: YES (/home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA/utils/ipc/./generate.py)
Program ./extract-docs.py found: YES (/home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA/utils/ipc/./extract-docs.py)
Program ./gen-tp-header.py found: YES (/home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA/utils/tracepoints/./gen-tp-header.py)
Configuring version.h using configuration
Program openssl found: YES (/usr/bin/openssl)
Library atomic found: NO
Run-time dependency threads found: YES
Run-time dependency libdw found: NO (tried pkgconfig and cmake)
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Header "execinfo.h" has symbol "backtrace" : YES
src/libcamera/base/meson.build:56:21: ERROR: shared_library keyword argument "version" Invalid Shared library version "". Must be of the form X.Y.Z where all three are numbers. Y and Z are optional.
A full log can be found at /home/chandan/newbuild/out/target/product/rpi4/obj/MESON_LIBCAMERA/build/meson-logs/meson-log.txt
WARNING: Running the setup command as
meson [options]
instead ofmeson setup [options]
is ambiguous and deprecated.17:14:17 ninja failed with: exit status 1
failed to build some targets (04:27:01 (hh:mm:ss))