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

Cannot build for linux in QtCreator - undefined reference #5713

Open
maciek252 opened this issue Oct 4, 2024 · 1 comment
Open

Cannot build for linux in QtCreator - undefined reference #5713

maciek252 opened this issue Oct 4, 2024 · 1 comment

Comments

@maciek252
Copy link

maciek252 commented Oct 4, 2024

Describe the issue

I wanted to experiment with building in QtCreator under linux. All went fine until the linking stage, where there is an error with missing references.

Reproduction steps

Steps to reproduce the behavior:

  1. cloned QField repo (tried with both master and release-3_4 branches)
  2. issued scripts/builf-for-linux.sh (it went fine and has built the working executable)
  3. as described in the manual, created first the QtSetup in the qtCreator
  4. and then the kit on its basis
  5. imported the project into QtCreator and run build
  6. Then linking ended up with the error:

/usr/bin/ld: /home/maciek/p/QField2/QField/build-x64-linux/vcpkg_installed/x64-linux/lib/libQt6Positioning.so.6.6.3: undefined reference to symbol '_ZN3p2t3CDT11TriangulateEv'
/usr/bin/ld: /home/maciek/p/QField2/QField/build-x64-linux/vcpkg_installed/x64-linux/lib/libpoly2tri.so: error adding symbols: DSO missing from command line

Expected behavior

It should produce the executable without this error.

QField (please complete the following information)

  • Device: PC
  • OS: Ubuntu 24.04
  • QField version: release-3_4 and master
@m-kuhn
Copy link
Member

m-kuhn commented Oct 5, 2024

This sounds like the qt positioning cmake config is missing a dependency to poly2tri (likely somewhere in vcpkg_installed/x64-linux/share/Qt6Positioning).
Possibly this could be worked around (in QField) by patching this dependency in cmake/qgis-cmake-wrapper.cmake , we already do some "magic" and make QGIS::Core depend on poly2tri::poly2tri, I guess we could do the same for Qt::Positioning.
A proper fix would need to be implemented in https://github.com/microsoft/vcpkg/tree/master/ports/qtpositioning (or directly work upstream with qt to allow building with an external poly2tri library).

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

No branches or pull requests

2 participants