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: Check if Arch and Use correct GStreamer paths for Arch Linux #12401

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Aram-Vn
Copy link

@Aram-Vn Aram-Vn commented Feb 6, 2025

Fix: Correct GStreamer Paths for Arch Linux in FindGStreamer.cmake

Description

QGroundControl’s FindGStreamer.cmake assumes a Debian-based library path structure (/usr/lib/x86_64-linux-gnu/). This causes build failures on Arch Linux, where libraries are located in /usr/lib/ instead.

This PR:

  • Dynamically detects Arch Linux using /etc/os-release.
  • Sets PKG_CONFIG_PATH and GSTREAMER_LIB_PATH correctly for Arch (/usr/lib/).
  • Preserves Debian-based paths for Ubuntu, Debian, etc.
  • Ensures QGroundControl builds successfully on Arch Linux

Test Steps

To Reproduce the Original Issue (Before Fix):

  1. Clone the QGroundControl repository on Arch Linux.
  2. run
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build --config Debug
./build/Debug/QGroundControl      

Checklist:

Related Issue

N/A (first report)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

QGroundControl’s FindGStreamer.cmake assumed a Debian-based path structure (/usr/lib/x86_64-linux-gnu/), causing build failures on Arch Linux. This fix dynamically detects Arch Linux using /etc/os-release and correctly sets PKG_CONFIG_PATH and GSTREAMER_LIB_PATH for Arch (/usr/lib/). This preserves Debian-based paths for other Linux distributions while enabling successful builds on Arch.
@HTRamsey
Copy link
Collaborator

HTRamsey commented Feb 6, 2025

Probably need to rebase because I cleaned up that file a bit more yesterday

@Aram-Vn Aram-Vn changed the title Fix: Use correct GStreamer paths for Arch Linux Fix: Check if Arch and Use correct GStreamer paths for Arch Linux Feb 12, 2025
@Aram-Vn
Copy link
Author

Aram-Vn commented Feb 12, 2025

Probably need to rebase because I cleaned up that file a bit more yesterday

Thanks, that worked!

@HTRamsey
Copy link
Collaborator

Did my method solve your problem? Trying to avoid manually listing distributions

@Aram-Vn
Copy link
Author

Aram-Vn commented Feb 17, 2025

Did my method solve your problem? Trying to avoid manually listing distributions

image
same problem
i did git pull --rebase

@Aram-Vn
Copy link
Author

Aram-Vn commented Feb 17, 2025

Did my method solve your problem? Trying to avoid manually listing distributions

and other problem

find_program(QMAKE_EXECUTABLE NAMES qmake HINTS ${QT_ROOT_DIR} ${QTDIR} ENV QTDIR PATH_SUFFIXES bin)
execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION)
if(QT_VERSION LESS QT_MINIMUM_VERSION)
    MESSAGE(FATAL_ERROR "Minimum supported Qt version: ${QT_MINIMUM_VERSION}.
    Installed version: ${QT_VERSION}")
endif()

include(Qt6QGCConfiguration)

this didnt work well

image

i have both wersion but it sees 5.15.16

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants