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

fix buildroot crosscompile #1

Merged

Commits on Feb 11, 2021

  1. cmake: remove unsafe host include path for libdrm (use pkgconfig inst…

    …ead)
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    1b40d2a View commit details
    Browse the repository at this point in the history
  2. cmake: add option ENABLE_COMPILE_FLAGS_FOR_TARGET

    Add cmake option ENABLE_COMPILE_FLAGS_FOR_TARGET, defaulting to armv8
    enabling the previous hard coded compiler options.
    
    Run cmake with -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled for no extra
    compiler options.
    
    Fixes:
    
      aarch64-buildroot-linux-gnu-g++.br_real: error: unrecognized command-line option ‘-mfpu=neon-fp-armv8’
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    0ee3a46 View commit details
    Browse the repository at this point in the history
  3. libcamera_vid: fix getline call (needs size_t)

    Fixes:
    
    .../libcamera-apps-custom/libcamera_vid.cpp:39:26: error: cannot convert ‘unsigned int*’ to ‘size_t*’ {aka ‘long unsigned int*’}
       39 |    getline(&user_string, &len, stdin);
          |                          ^~~~
          |                          |
          |                          unsigned int*
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    faab2a4 View commit details
    Browse the repository at this point in the history
  4. libcamera_still: fix getline call (needs size_t)

    Fixes:
    
    .../build/libcamera-apps-custom/libcamera_still.cpp:152:26: error: cannot convert ‘unsigned int*’ to ‘size_t*’ {aka ‘long unsigned int*’}
      152 |    getline(&user_string, &len, stdin);
          |                          ^~~~
          |                          |
          |                          unsigned int*
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    93501d2 View commit details
    Browse the repository at this point in the history
  5. libcamera_app: fix int64_t constants

    Fixes:
    
    .../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libcamera/libcamera/controls.h: In instantiation of ‘void libcamera::ControlList::set(const libcamera::Control<T>&, const std::initializer_list<_Up>&) [with T = libcamera::Span<const long int>; V = long long int]’:
    .../libcamera_app.hpp:331:18:   required from ‘void LibcameraApp<OPTIONS>::StartCamera() [with OPTIONS = StillOptions]’
    .../libcamera_jpeg.cpp:35:18:   required from here
    .../host/aarch64-buildroot-linux-gnu/sysroot/usr/include/libcamera/libcamera/controls.h:399:14: error: no matching function for call to ‘libcamera::ControlValue::set<libcamera::Span<const long int, 18446744073709551615> >(libcamera::Span<const long long int, 18446744073709551615>)’
      399 |   val->set<T>(Span<const typename std::remove_cv_t<V>>{ value.begin(), value.size() });
          |   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    a6e9792 View commit details
    Browse the repository at this point in the history
  6. cmake: fix linking with exif, jpeg

    Fixes:
    
      [ 66%] Linking CXX executable libcamera-hello
      .../aarch64-buildroot-linux-gnu/bin/ld: libcommon.so: undefined reference to `jpeg_std_error'
      .../aarch64-buildroot-linux-gnu/bin/ld: libcommon.so: undefined reference to `exif_set_slong'
    
      [ 92%] Linking CXX executable libcamera-vid
      .../aarch64-buildroot-linux-gnu/bin/ld: libcommon.so: undefined reference to `exif_set_slong'
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    b0c4097 View commit details
    Browse the repository at this point in the history
  7. cmake: add install target

    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    0658594 View commit details
    Browse the repository at this point in the history
  8. cmake: no need to link against ipa_rpi.so

    Fixes:
    	$ libcamera-hello
    	libcamera-hello: error while loading shared libraries: ipa_rpi.so: cannot open shared object file: No such file or directory
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    1c4a6ae View commit details
    Browse the repository at this point in the history
  9. circular_output: fix size_t vs. unsigned int narrowing conversion

    Fixes:
    
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/circular_output.cpp: In member function ‘virtual void CircularOutput::outputBuffer(void*, size_t, int64_t, uint32_t)’:
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/circular_output.cpp:72:62: warning: narrowing conversion of ‘size’ from ‘size_t {aka long unsigned int}’ to ‘unsigned int’ inside { } [-Wnarrowing]
        Header header = { size, flags & FLAG_KEYFRAME, timestamp_us };
                                                                    ^
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    6c0202a View commit details
    Browse the repository at this point in the history
  10. egl_preview: fix XVisualInfo initializer

    Fixes:
    
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/egl_preview.cpp: In member function ‘void EglPreview::makeWindow(const char*)’:
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/egl_preview.cpp:219:65: sorry, unimplemented: non-trivial designated initializers not supported
        XVisualInfo visTemplate = { .visualid = (long unsigned int)vid };
                                                                       ^
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    8d73f00 View commit details
    Browse the repository at this point in the history
  11. jpeg: fix long unsigned int vs. size_t mismatch

    Introduce a custom jpeg_mem_len_t as the jpeg_mem_dest() signature
    changed since jpegsrc.v9d from 'unsigned long * outsize' to
    'size_t * outsize'.
    
    Fixes:
    
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/jpeg.cpp:270:41: error: invalid conversion from ‘long unsigned int*’ to ‘size_t*’ {aka ‘unsigned int*’} [-fpermissive]
        270 |     jpeg_mem_dest(&cinfo, &jpeg_buffer, &jpeg_len);
            |                                         ^~~~~~~~~
            |                                         |
            |                                         long unsigned int*
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    465870e View commit details
    Browse the repository at this point in the history
  12. jpeg: fix bool vs. boolean mismatch

    Fixes:
    
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/mjpeg_encoder.cpp:57:22: error: cannot convert ‘bool’ to ‘boolean’ in assignment
         57 |  cinfo.raw_data_in = true;
            |                      ^~~~
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    79dbe78 View commit details
    Browse the repository at this point in the history
  13. mjpeg_encoder: fix long unsigned int vs. size_t mismatch

    Introduce a custom jpeg_mem_len_t as the jpeg_mem_dest() signature
    changed since jpegsrc.v9d from 'unsigned long * outsize' to
    'size_t * outsize'.
    
    Fixes:
    
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/mjpeg_encoder.cpp:61:44: error: invalid conversion from ‘long unsigned int*’ to ‘size_t*’ {aka ‘unsigned int*’} [-fpermissive]
         61 |     jpeg_mem_dest(&cinfo, &encoded_buffer, &buffer_len);
            |                                            ^~~~~~~~~~~
            |                                            |
            |                                            long unsigned int*
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    3611988 View commit details
    Browse the repository at this point in the history
  14. mjpeg_encoder: fix bool vs. boolean mismatch

    Fixes:
    
      .../libcamera-apps-b1ca8997530f1f0290b291a956de359f2d4ce3e2/mjpeg_encoder.cpp:57:22: error: cannot convert ‘bool’ to ‘boolean’ in assignment
         57 |  cinfo.raw_data_in = true;
            |                      ^~~~
      compilation terminated due to -Wfatal-errors.
    
    Signed-off-by: Peter Seiderer <[email protected]>
    pseiderer committed Feb 11, 2021
    Configuration menu
    Copy the full SHA
    f70d2d3 View commit details
    Browse the repository at this point in the history