Skip to content

Add support for QNX#25832

Merged
asmorkalov merged 5 commits intoopencv:4.xfrom
chachoi-world:4.x
Aug 6, 2024
Merged

Add support for QNX#25832
asmorkalov merged 5 commits intoopencv:4.xfrom
chachoi-world:4.x

Conversation

@chachoi
Copy link
Copy Markdown
Contributor

@chachoi chachoi commented Jun 28, 2024

Build and test instruction for QNX:
https://github.com/chachoi-world/qnx-ports/blob/main/opencv/README.md

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

if(${CMAKE_SYSTEM_NAME} MATCHES QNX)
include_directories(AFTER "${dir}")
else()
include_directories(AFTER SYSTEM "${dir}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the problem? message?

If there is no SYSTEM headers support then it should be disabled on CMake level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cd /home/chachoi/chachoi-world/qnx-ports/opencv/nto-aarch64-le/build/modules/imgcodecs && /home/chachoi/qnx800/host/linux/x86_64/usr/bin/qcc -lang-c++ -DCVAPI_EXPORTS -DHAVE_IMGCODEC_HDR -DHAVE_IMGCODEC_PFM -DHAVE_IMGCODEC_PXM -DHAVE_IMGCODEC_SUNRASTER -DHAVE_WEBP -DOPJ_STATIC -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/chachoi/chachoi-world/opencv/3rdparty/openjpeg/openjp2 -I/home/chachoi/chachoi-world/qnx-ports/opencv/nto-aarch64-le/build/3rdparty/openjpeg/openjp2 -I/home/chachoi/chachoi-world/opencv/3rdparty/libwebp/src -I/home/chachoi/chachoi-world/opencv/modules/imgcodecs/include -I/home/chachoi/chachoi-world/qnx-ports/opencv/nto-aarch64-le/build/modules/imgcodecs -I/home/chachoi/chachoi-world/opencv/modules/core/include -I/home/chachoi/chachoi-world/opencv/modules/imgproc/include -Wp,-isystem,/home/chachoi/chachoi-world/qnx-ports/opencv/nto-aarch64-le/build -Wp,-isystem,/home/chachoi/qnx800/target/qnx/usr/include -Vgcc_ntoaarch64le   -I. -I/home/chachoi/chachoi-world/qnx-ports/opencv/nto-aarch64-le -I/home/chachoi/chachoi-world/qnx-ports/opencv -I/home/chachoi/qnx800/target/qnx/usr/include   -I/home/chachoi/qnx800/target/qnx/aarch64le//usr/local/include -D_QNX_SOURCE   -fsigned-char    -O3 -DNDEBUG -O3 -DNDEBUG  -fPIC -std=c++17 -o CMakeFiles/opencv_imgcodecs.dir/src/loadsave.cpp.o -c /home/chachoi/chachoi-world/opencv/modules/imgcodecs/src/loadsave.cpp
cc: warning - lang-c++ is deprecated
In file included from /home/chachoi/qnx800/target/qnx/usr/include/c++/v1/__type_traits/remove_reference.h:13,
                 from /home/chachoi/qnx800/target/qnx/usr/include/c++/v1/__type_traits/apply_cv.h:15,
                 from /home/chachoi/qnx800/target/qnx/usr/include/c++/v1/__functional/invoke.h:15,
                 from /home/chachoi/qnx800/target/qnx/usr/include/c++/v1/type_traits:421,
                 from /home/chachoi/qnx800/target/qnx/usr/include/c++/v1/limits:827,
                 from /home/chachoi/chachoi-world/opencv/modules/core/include/opencv2/core/cvdef.h:185,
                 from /home/chachoi/chachoi-world/opencv/modules/core/include/opencv2/core.hpp:52,
                 from /home/chachoi/chachoi-world/opencv/modules/imgcodecs/include/opencv2/imgcodecs.hpp:46,
                 from /home/chachoi/chachoi-world/opencv/modules/imgcodecs/src/precomp.hpp:45,
                 from /home/chachoi/chachoi-world/opencv/modules/imgcodecs/src/loadsave.cpp:46:
/home/chachoi/qnx800/target/qnx/usr/include/c++/v1/cstddef:46:5: error: #error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
   46 | #   error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \

QNX headers at -isystem,/home/chachoi/qnx800/target/qnx/usr/include being treated as system headers causes the compile issue above. I tried setting CMAKE_NO_SYSTEM_FROM_IMPORTED to ON, but it did not work.

@asmorkalov asmorkalov added this to the 4.11.0 milestone Jul 3, 2024
@asmorkalov
Copy link
Copy Markdown
Contributor

@opencv-alalek could you take a look?

CMakeLists.txt Outdated
endif()

if(CMAKE_SYSTEM_NAME MATCHES QNX)
set(OPENCV_PYTHON_INSTALL_PATH ${QNX_PYTHON_INSTALL_PATH})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to introduce QNX_PYTHON_INSTALL_PATH (google doesn't know that anyway).
Just specify OPENCV_PYTHON_INSTALL_PATH value to CMake thorugh command-line or via cmake/OpenCVInstallLayout.cmake

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I removed this and passed OPENCV_PYTHON_INSTALL_PATH via toolchain.

@asmorkalov
Copy link
Copy Markdown
Contributor

@chachoi @opencv-alalek What are the next steps here?

@asmorkalov
Copy link
Copy Markdown
Contributor

Friendly reminder.

Copy link
Copy Markdown
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thank you for contribution!

@asmorkalov asmorkalov merged commit 582a7f3 into opencv:4.x Aug 6, 2024
@chachoi
Copy link
Copy Markdown
Contributor Author

chachoi commented Aug 6, 2024

Thanks everyone 👍

fengyuentau pushed a commit to fengyuentau/opencv that referenced this pull request Aug 15, 2024
Add support for QNX opencv#25832

Build and test instruction for QNX:
https://github.com/chachoi-world/qnx-ports/blob/main/opencv/README.md

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
@asmorkalov asmorkalov mentioned this pull request Aug 27, 2024
thewoz pushed a commit to CobbsLab/OPENCV that referenced this pull request Feb 13, 2025
Add support for QNX opencv#25832

Build and test instruction for QNX:
https://github.com/chachoi-world/qnx-ports/blob/main/opencv/README.md

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants