Skip to content

[ffmpeg] build failure for QNX. Portfile patch suggestion #35208

@Arech

Description

@Arech

Operating system

host: Ubuntu20.04
cross-compiling target: QNX710

Compiler

ntoaarch64-g++ from QNX SDP 710

Steps to reproduce the behavior

I was trying to cross-compile (to QNX SDP 710) OpenCV 4.7.0 port that uses ffmpeg feature, but attempting to crosscompile it without OpenCV will also result in the same issue:

string(APPEND OPTIONS " --target-os=android")
doesn't set --target-os when it's compiled for QNX (QNX is not covered by any if condition there, including VCPKG_TARGET_IS_LINUX)

Failure logs

I didn't save the log, sorry, it mentioned that --target-os argument for configure.sh script must be specified. Portfile.cmake doesn't do it.

Additional context

ffmpeg itself seems to support QNX for a very long time already.

Here's a patch to apply to that portfile.cmake to make it compile successfully:

--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -59,6 +59,8 @@ elseif(VCPKG_TARGET_IS_OSX)
     string(APPEND OPTIONS " --target-os=darwin --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox --enable-videotoolbox")
 elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android")
     string(APPEND OPTIONS " --target-os=android")
+elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "QNX")
+    string(APPEND OPTIONS " --target-os=qnx")
 else()
 endif()

disclaimer: this makes ffmpeg to crosscompile with QNX SDP 710 and then (after applying other fixes) OpenCV 4.7.0. -based apps will be able to read video files successfully on QNX (presumably using ffmpeg support). I didn't run ffmpeg tests & whatever to make sure it's really proper resolution. I'll be thankful for amendments.

Metadata

Metadata

Assignees

Labels

category:port-featureThe issue is with a library, which is requesting new capabilities that didn’t exist

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions