Giter VIP home page Giter VIP logo

ipu6-camera-hal's Introduction

ipu6-camera-hal

This repository supports MIPI cameras through the IPU6 on Intel Tiger Lake and Alder Lake platforms. There are 4 repositories that provide the complete setup:

Content of this repository:

  • IPU6 HAL

Build instructions:

  • Dependencies: ipu6-camera-bins
  • Dependencies: libexpat-dev automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
  • For cameras supporting privacy mode (ov01a1s, ov02c10, ov2740), add a dummy image for it:
     cd config/linux/ipu6ep
     ffmpeg -i <input_file> -pix_fmt nv12 privacy_image_<sensor_name>-uf_<width>_<height>.yuv
  • Build and install:
  1. Set IPU6 version and product name for build

    • For Tiger Lake, set:

      IPU6_VER=ipu6
    • For Alder Lake, set:

      IPU6_VER=ipu6ep
  2. Then continue:

    cd ipu6-camera-hal
    mkdir -p ./build/out/install/usr && cd ./build/
    
    cmake -DCMAKE_BUILD_TYPE=Release \
    -DIPU_VER=${IPU6_VER} \
    -DENABLE_VIRTUAL_IPU_PIPE=OFF \
    -DUSE_PG_LITE_PIPE=ON \
    -DUSE_STATIC_GRAPH=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr ..
    # if don't want install to /usr, use -DCMAKE_INSTALL_PREFIX=./out/install/usr, export PKG_CONFIG_PATH="$workdir/build/out/install/usr/lib/pkgconfig"
    
    make -j`nproc`
    sudo make install
  3. Move user space driver for different platforms (if you build for either ipu6-only or ipu6ep-only support, skip this step):

    mkdir /usr/lib/${IPU6_VER}
    mkdir /usr/share/defaults/etc/${IPU6_VER}
    
    mv /usr/lib/libtbd.so.0.0.0 /usr/lib/${IPU6_VER}/libtbd.so.0.0.0
    
    mv /usr/lib/libSkyCamAIC.so /usr/lib/${IPU6_VER}/libSkyCamAIC.so
    mv /usr/lib/libSkyCamAICKBL.so /usr/lib/${IPU6_VER}/libSkyCamAICKBL.so
    mv /usr/lib/libStatsConverter.so /usr/lib/${IPU6_VER}/libStatsConverter.so
    mv /usr/lib/libbroxton_ia_pal.so /usr/lib/${IPU6_VER}/libbroxton_ia_pal.so
    mv /usr/lib/libia_aec.so /usr/lib/${IPU6_VER}/libia_aec.so
    mv /usr/lib/libia_aic.so /usr/lib/${IPU6_VER}/libia_aic.so
    mv /usr/lib/libia_aic_engine.so /usr/lib/${IPU6_VER}/libia_aic_engine.so
    mv /usr/lib/libia_aic_myriad.so /usr/lib/${IPU6_VER}/libia_aic_myriad.so
    mv /usr/lib/libia_aiq.so /usr/lib/${IPU6_VER}/libia_aiq.so
    mv /usr/lib/libia_aiq_file_debug.so /usr/lib/${IPU6_VER}/libia_aiq_file_debug.so
    mv /usr/lib/libia_aiqb_parser.so /usr/lib/${IPU6_VER}/libia_aiqb_parser.so
    mv /usr/lib/libia_bcomp.so /usr/lib/${IPU6_VER}/libia_bcomp.so
    mv /usr/lib/libia_cca.so /usr/lib/${IPU6_VER}/libia_cca.so
    mv /usr/lib/libia_cca_file_debug.so /usr/lib/${IPU6_VER}/libia_cca_file_debug.so
    mv /usr/lib/libia_ccat.so /usr/lib/${IPU6_VER}/libia_ccat.so
    mv /usr/lib/libia_cmc_parser.so /usr/lib/${IPU6_VER}/libia_cmc_parser.so
    mv /usr/lib/libia_coordinate.so /usr/lib/${IPU6_VER}/libia_coordinate.so
    mv /usr/lib/libia_dpc.so /usr/lib/${IPU6_VER}/libia_dpc.so
    mv /usr/lib/libia_dvs.so /usr/lib/${IPU6_VER}/libia_dvs.so
    mv /usr/lib/libia_dvs_file_debug.so /usr/lib/${IPU6_VER}/libia_dvs_file_debug.so
    mv /usr/lib/libia_emd_decoder.so /usr/lib/${IPU6_VER}/libia_emd_decoder.so
    mv /usr/lib/libia_exc.so /usr/lib/${IPU6_VER}/libia_exc.so
    mv /usr/lib/libia_intrinsics.so /usr/lib/${IPU6_VER}/libia_intrinsics.so
    mv /usr/lib/libia_isp_bxt.so /usr/lib/${IPU6_VER}/libia_isp_bxt.so
    mv /usr/lib/libia_isp_bxt_file_debug.so /usr/lib/${IPU6_VER}/libia_isp_bxt_file_debug.so
    mv /usr/lib/libia_lard.so /usr/lib/${IPU6_VER}/libia_lard.so
    mv /usr/lib/libia_log.so /usr/lib/${IPU6_VER}/libia_log.so
    mv /usr/lib/libia_ltm.so /usr/lib/${IPU6_VER}/libia_ltm.so
    mv /usr/lib/libia_ltm_file_debug.so /usr/lib/${IPU6_VER}/libia_ltm_file_debug.so
    mv /usr/lib/libia_me_corner.so /usr/lib/${IPU6_VER}/libia_me_corner.so
    mv /usr/lib/libia_mkn.so /usr/lib/${IPU6_VER}/libia_mkn.so
    mv /usr/lib/libia_nvm.so /usr/lib/${IPU6_VER}/libia_nvm.so
    mv /usr/lib/libia_ob.so /usr/lib/${IPU6_VER}/libia_ob.so
    mv /usr/lib/libia_pd.so /usr/lib/${IPU6_VER}/libia_pd.so
    mv /usr/lib/libia_view.so /usr/lib/${IPU6_VER}/libia_view.so
    mv /usr/lib/libpvl_blink_detection.so /usr/lib/${IPU6_VER}/libpvl_blink_detection.so
    mv /usr/lib/libpvl_eye_detection.so /usr/lib/${IPU6_VER}/libpvl_eye_detection.so
    mv /usr/lib/libpvl_face_detection.so /usr/lib/${IPU6_VER}/libpvl_face_detection.so
    mv /usr/lib/libpvl_face_recognition.so /usr/lib/${IPU6_VER}/libpvl_face_recognition.so
    mv /usr/lib/libpvl_mouth_detection.so /usr/lib/${IPU6_VER}/libpvl_mouth_detection.so
    mv /usr/lib/libpvl_object_tracking.so /usr/lib/${IPU6_VER}/libpvl_object_tracking.so
    mv /usr/lib/libpvl_smile_detection.so /usr/lib/${IPU6_VER}/libpvl_smile_detection.so
    
    mv /usr/lib/libcisu.so.0.0.0 /usr/lib/${IPU6_VER}/libcisu.so.0.0.0
    mv /usr/lib/libcisu_os_plugin.so.1.0.0 /usr/lib/${IPU6_VER}/libcisu_os_plugin.so.1.0.0
    mv /usr/lib/libgcss.so.0.0.0 /usr/lib/${IPU6_VER}/libgcss.so.0.0.0
    mv /usr/lib/libia_camera.so.0.0.0 /usr/lib/${IPU6_VER}/libia_camera.so.0.0.0
    mv /usr/lib/libia_cipf.so.0.0.0 /usr/lib/${IPU6_VER}/libia_cipf.so.0.0.0
    
    mv /usr/lib/libcamhal.so /usr/lib/${IPU6_VER}/libcamhal.so
    mv /usr/share/defaults/etc/camera /usr/share/defaults/etc/${IPU6_VER}/
  4. Copy ipu6-camera-hal/config/linux/rules.d/*.rules to /lib/udev/rules.d/:

    cp ../config/linux/rules.d/*.rules /lib/udev/rules.d/
  5. Reboot to make udev rules take effect.

Tagged for removal:

The folder icamerasrc contains a gst plugin. This has been moved to https://github.com/intel/icamerasrc and will eventually be removed.

ipu6-camera-hal's People

Contributors

cjechlitschek avatar fourdollars avatar hao-yao avatar jwrdegoede avatar kaichuan-hsieh avatar onceforall avatar vicamo avatar wytintel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ipu6-camera-hal's Issues

1202 release unexpectedly reverted pull #2, #3

In commit e49045f:

commit e49045f495052f3c77fec6dfca2dca149c03a845
Author: Hao Yao <[email protected]>
Date:   Thu Dec 2 17:56:08 2021 +0800

    [ipu6][ipu6ep] camera hal release on 2021-12-02
    
    Signed-off-by: Hao Yao <[email protected]>

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85fc090..3b3b653 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,8 +68,6 @@ message(STATUS "install prefix: " ${CMAKE_INSTALL_PREFIX})
 
 #------------------------- Compilation settings -------------------------
 
-include(GNUInstallDirs)
-
 # -fPIC in xos way
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 
@@ -245,11 +243,6 @@ set_target_properties(camhal_static PROPERTIES OUTPUT_NAME "camhal")
 target_link_libraries(camhal ${CMAKE_DL_LIBS})
 target_link_libraries(camhal_static ${CMAKE_DL_LIBS})
 
-set (THREADS_PREFER_PTHREAD_FLAG ON)
-find_package (Threads REQUIRED)
-target_link_libraries(camhal ${CMAKE_THREAD_LIBS_INIT})
-target_link_libraries(camhal_static ${CMAKE_THREAD_LIBS_INIT})
-
 target_link_libraries(camhal expat rt)
 target_link_libraries(camhal_static expat rt)
 

Build errors of the gst src plugin

However I can not find the declaration of camera_view_rotation_t.

gstcamerawfovinterface.h:103:70: error: ‘camera_view_projection_t’ has not been declared
  103 |   gboolean      (*set_view_projection)   (GstCamerasrcWFOV *camWFOV, camera_view_projection_t projection);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:111:70: error: ‘camera_view_projection_t’ has not been declared
  111 |   gboolean      (*get_view_projection)   (GstCamerasrcWFOV *camWFOV, camera_view_projection_t &projection);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:119:68: error: ‘camera_view_rotation_t’ has not been declared
  119 |   gboolean      (*set_view_rotation)   (GstCamerasrcWFOV *camWFOV, camera_view_rotation_t rotation);
      |                                                                    ^~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:127:68: error: ‘camera_view_rotation_t’ has not been declared
  127 |   gboolean      (*get_view_rotation)   (GstCamerasrcWFOV *camWFOV, camera_view_rotation_t &rotation);
      |                                                                    ^~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:135:76: error: ‘camera_view_fine_adjustments_t’ has not been declared
  135 |   gboolean      (*set_view_fine_adjustments)   (GstCamerasrcWFOV *camWFOV, camera_view_fine_adjustments_t fine_adjustments);
      |                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:143:76: error: ‘camera_view_fine_adjustments_t’ has not been declared
  143 |   gboolean      (*get_view_fine_adjustments)   (GstCamerasrcWFOV *camWFOV, camera_view_fine_adjustments_t &fine_adjustments);
      |                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:151:70: error: ‘camera_view_rotation_t’ has not been declared
  151 |   gboolean      (*set_camera_rotation)   (GstCamerasrcWFOV *camWFOV, camera_view_rotation_t camRotation);
      |                                                                      ^~~~~~~~~~~~~~~~~~~~~~
gstcamerawfovinterface.h:159:70: error: ‘camera_view_rotation_t’ has not been declared
  159 |   gboolean      (*get_camera_rotation)   (GstCamerasrcWFOV *camWFOV, camera_view_rotation_t &camRotation);
      |

Fedora 37 make -j`nproc` error

Good morning,

I just tried to build this repo, following all the README instructions. I had the #18 issue, where it was solved moving the files to /usr/lib64/.

Reaching the next step, make -j`nproc`, I got the following errors:

make[2]: *** [CMakeFiles/camhal_static.dir/build.make:314: CMakeFiles/camhal_static.dir/src/3a/AiqResult.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/camhal_static.dir/build.make:300: CMakeFiles/camhal_static.dir/src/3a/intel3a/Intel3AParameter.cpp.o] Error 1
make[2]: *** [CMakeFiles/camhal_static.dir/build.make:286: CMakeFiles/camhal_static.dir/src/3a/AiqUtils.cpp.o] Error 1
In file included from /home/work/Documents/ipu6-camera-hal/src/platformdata/PlatformData.h:37,
                 from /home/work/Documents/ipu6-camera-hal/src/3a/I3AControlFactory.cpp:20:
/home/work/Documents/ipu6-camera-hal/src/v4l2/MediaControl.h:20:10: fatal error: expat.h: No such file or directory
   20 | #include <expat.h>
      |          ^~~~~~~~~
cc1plus: all warnings being treated as errors
compilation terminated.
make[2]: *** [CMakeFiles/camhal_static.dir/build.make:272: CMakeFiles/camhal_static.dir/src/3a/I3AControlFactory.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:356: CMakeFiles/camhal_static.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
/usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
  412 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~

The command user to build before this step was:
cmake -DCMAKE_BUILD_TYPE=Release -DIPU_VER=${IPU6_VER} -DENABLE_VIRTUAL_IPU_PIPE=OFF -DUSE_PG_LITE_PIPE=ON -DUSE_STATIC_GRAPH=OFF -DCMAKE_INSTALL_PREFIX=/usr ..

I also checked the issue #19, since I'm getting the same error, but I'm using the correct flag '-DCMAKE_BUILD_TYPE=Release'

build fails with IA_IMAGING not found

Attempting to build on a Fedora36 system, and the initial cmake command fails:

$ make -DCMAKE_BUILD_TYPE=Release -DIPU_VER=${IPU6_VER} -DENABLE_VIRTUAL_IPU_PIPE=OFF -DUSE_PG_LITE_PIPE=ON -DUSE_STATIC_GRAPH=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
CMake Deprecation Warning at CMakeLists.txt:17 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- install prefix: /usr
INFOadd definition -DIPU_SYSVER_ipu6v5 for ipu6ep
-- Checking for module 'ia_imaging'
--   Package 'ia_imaging', required by 'virtual:world', not found
CMake Error at cmake/FindIA_IMAGING.cmake:28 (message):
  IA_IMAGING not found
Call Stack (most recent call first):
  CMakeLists.txt:269 (find_package)


-- Configuring incomplete, errors occurred!

I've definitely got the headers installed from ipu6-camera-bins, so I'm not clear why they're not being found:

'ipu6ep/include/ia_imaging/ia_types.h' -> '/usr/include/ia_imaging/ia_types.h'
'ipu6ep/include/ia_imaging/ia_view.h' -> '/usr/include/ia_imaging/ia_view.h'
'ipu6ep/include/ia_imaging/ia_view_types.h' -> '/usr/include/ia_imaging/ia_view_types.h'

Non-existing libraries listed in README and UDev rules

After building and installing things from the https://github.com/intel/ipu6-drivers, https://github.com/intel/ipu6-camera-bins and this repository, I got multiple failures when running the mv commands listed in the README because of many of the library files missing. And after installing the UDev rules and rebooting, I have many broken symlinks in the /usr/lib directory. For example, libSkyCamAIC.so is missing and the link is broken.

Where are these libraries supposed to come from?

implement a proper backend discovery/loading mechanism

Problem description

Currently ipu6-camera-hal supports multiple flavors under the control of build time variables. This brings several problems for downstream packaging maintainers, and can so far be worked around by playing all kinds of dirty binary tricks with assumptions of no base. The problems in the suggested installation steps are:

switching referenced binary set at runtime.

The very first thing this violates is the possibility to package for/install to a read-only root filesystem. The files installed to /usr should be immutable.

Second, as a prerequisite project of icamerasrc, this must be installed in the build environment for constructing icamerasrc. However, since there are multiple flavors of ipu6-camera-hal, and they're supposed to be switched based on hardware driven udev as suggested, it breaks the build system's assumption especially when the process is done automatically on virtual machines or chroots.

shared library linkage

As stated above, switching install binary set also brings out a problem that the down stream project is actually built against either one of the flavors. The ABI compatibility against other flavors that were not active at build time remains unknown and can only be identified at runtime tested on each supporting hardware platform. This introduces great uncertainty, human interaction, and is generally unacceptable in the packaging systems among distributions.

complexity and maintenance effort

This should be pretty obvious. While the suggested installation method doesn't meet the actual requirement of packaging systems, work-arounds are currently deployed to try resolve the violations. The efforts pile as new flavors being added, and the complexity expands linearly.

Proposed alternatives

  1. libcamhal should hide hardware flavors from the down stream projects as its name, camera hardware abstraction layer, suggests. There should one sole libcamhal share library that icamerasrc depends on and links to,
  2. To achieve 1., hardware model related configure parameters should be eliminated, and bits corresponding to all supporting hardware models should be built along with the major parts,
  3. To achieve 1., hardware related object types should be pushed behind, and the public interface (to icamerasrc) must remain genuine,
  4. To achieve 2. and 3., a proper designed backend discovering/loading should be implemented, probably in src/hal/CameraHal.cpp.

_FORTIFY_SOURCE requires compiling with optimization (-O)

On a Fedora36 system, attempting to run the make command throws a large number of warnings such as the following:

[ 80%] Building CXX object CMakeFiles/camhal_static.dir/modules/ia_cipr/src/Command.cpp.o
In file included from /usr/include/c++/12/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/12/x86_64-redhat-linux/bits/c++config.h:2892,
                 from /usr/include/c++/12/bits/stl_algobase.h:59,
                 from /usr/include/c++/12/vector:60,
                 from /root/stuff/ipu6-camera-hal/modules/ia_cipr/include/Command.h:19,
                 from /root/stuff/ipu6-camera-hal/modules/ia_cipr/src/Command.cpp:19:
/usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
  412 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~

This patch makes the failures go away, but I don't understand whether there will be performance impact as a result of the change:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a930feb..a79682f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,7 +83,7 @@ set (CMAKE_CXX_STANDARD 11)
 add_compile_options(-Wall -Werror
                     -fstack-protector
                     -fPIE -fPIC
-                    -D_FORTIFY_SOURCE=2
+                    -D_FORTIFY_SOURCE=0
                     -DDCHECK_ALWAYS_ON
                     -Wformat -Wformat-security
                     )

Unexpected warning message

四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:00.990] CamHAL[INF] aiqb file name ov01a10.aiqb
四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:00.991] CamHAL[INF] aiqb file name ov01a10.aiqb
四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:09.835] CamHAL[WAR] ipu6_bb_video_bayer: wait executors timeout
四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:09.968] CamHAL[WAR] ipu6_bb_video_bayer: wait executors timeout
四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:12.638] CamHAL[WAR] ipu6_bb_video_bayer: wait executors timeout
四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:24.250] CamHAL[WAR] ipu6_bb_video_bayer: wait executors timeout
四 19 19:11:08 TRBA-DVT2-C3 sh[925]: [04-19 19:10:27.320] CamHAL[WAR] ipu6_bb_video_bayer: wait executors timeout
ipu6_bb_video_bayer.log

The full log is

The README should be updated

Hi, the README seems to be very outdated, I can see the following errors when trying to compile the current master.

Note that I am using cmake 3.25.2, not sure why I get that deprecation warning…

CMake Deprecation Warning at CMakeLists.txt:17 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- install prefix: /usr
-- Performing Test COMPILER_SUPPORTS_ALIGNED_NEW
-- Performing Test COMPILER_SUPPORTS_ALIGNED_NEW - Success
INFOadd definition -DIPU_SYSVER_ipu6v5 for ipu6ep
-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_BUT_SET_VAR
-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_BUT_SET_VAR - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for module 'ia_imaging'
--   Found ia_imaging, version VERSION
-- Found IA_IMAGING: /usr/include/ia_imaging  
-- Checking for module 'libgcss'
--   Found libgcss, version 
-- Found LIBGCSS: /usr/include/ia_camera  
-- Checking for module 'libipu6ep'
--   Found libipu6ep, version VERSION
-- Found LIBIPU: /usr/include/libipu  
Install ADL IPU6EP configure files
-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
IA_EMD_LIB
    linked by target "camhal_static" in directory /home/victor/ipu6-camera-hal
    linked by target "camhal" in directory /home/victor/Tools/ipu6-camera-hal

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    ENABLE_VIRTUAL_IPU_PIPE
    USE_STATIC_GRAPH

build failed with gcc 11.2.0 compiler and glibc 2.35

In file included from /home/u/ipu6/ipu6-camera-hal/ipu6-camera-hal/include/api/ICamera.h:76,
from /home/u/ipu6/ipu6-camera-hal/ipu6-camera-hal/src/hal/ICamera.cpp:19:
/home/u/ipu6/ipu6-camera-hal/ipu6-camera-hal/include/api/Parameters.h:2545:56: error: ‘size_t’ has not been declared
2545 | int setLensShadingMap(const float *lensShadingMap, size_t lensShadingMapSize);
| ^~~~~~
/home/u/ipu6/ipu6-camera-hal/ipu6-camera-hal/include/api/Parameters.h:2555:51: error: ‘size_t’ has not been declared
2555 | int getLensShadingMap(float **lensShadingMap, size_t &lensShadingMapSize) const;
| ^~~~~~
make[2]: *** [CMakeFiles/camhal_static.dir/build.make:790: CMakeFiles/camhal_static.dir/src/hal/ICamera.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:312: CMakeFiles/camhal_static.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Try to add diff below can make it build successfully.
diff --git a/include/api/Parameters.h b/include/api/Parameters.h
index 5808252..e2d7e77 100644
--- a/include/api/Parameters.h
+++ b/include/api/Parameters.h
@@ -76,6 +76,7 @@
#include
#include
#include <stdint.h>
+#include <cstddef>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.