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

Does not compile using Qt-Creator (from qt.io) #156

Open
petricf opened this issue Aug 16, 2024 · 11 comments
Open

Does not compile using Qt-Creator (from qt.io) #156

petricf opened this issue Aug 16, 2024 · 11 comments
Labels
platform: Linux Linux platform issues question Further information is requested
Milestone

Comments

@petricf
Copy link

petricf commented Aug 16, 2024

Describe the bug
Does not link - no libraries created

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/maplibre/maplibre-native-qt.git
  2. cd maplibre-native-qt
  3. Open Qt-Creator
  4. Open project file 'CMakeLists.txt'
  5. Configure for Qt 6.6.3 (Linux)
  6. Start compilation
  7. Error

Expected behavior
Compile successful - libraries created

Screenshots
Problems window of qtcreator:

Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_setPara_72' Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_close_72'
Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_getVisualRun_72' Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_countParagraphs_72'
Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_getParagraphByIndex_72' Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_writeReverse_72'
Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_getProcessedLength_72' Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_open_72'
Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_setLine_72' Error: src/core/libQMapLibre.so.3.0.0: undefined reference to u_shapeArabic_72'
Error: src/core/libQMapLibre.so.3.0.0: undefined reference to ubidi_writeReordered_72' Error: src/core/libQMapLibre.so.3.0.0: undefined reference to u_errorName_72'
Error: src/core/libQMapLibre.so.3.0.0: undefined reference to `ubidi_countRuns_72'
Error: collect2: error: ld returned 1 exit status
Error: ninja: build stopped: subcommand failed.

Platform information (please complete the following information):

  • OS: Debian Linux 12.6 (stable)
  • Qt version Qt 6.6.3 from qt.io

Additional context
Using qtcreator ide from http://qt.io

Is this an other ICU problem ?
Remember - the qt-ide package from qt.io bundles icu v. 56 whereas debian delivers icu v.72

I am not firm in cmake. It seems to be that cmake compiles using icu v.72 but linking step uses v.56.

How to tell cmake to take the qt-bundled version (v.56) into account.

@ntadej
Copy link
Collaborator

ntadej commented Aug 16, 2024

Qt does not provide development headers for ICU unfortunately. I propose you use bundled ICU that comes with MapLibre by using -DMLN_QT_WITH_INTERNAL_ICU=ON.

@petricf
Copy link
Author

petricf commented Aug 16, 2024

Thank for the hint - currently compiling.

In meanwhile i tried it using QtCreator delivered by debian 12 and accompanied qt6-dev libs. cmake tell qt6location dev lib is missing. True - debian 12 does not provide it.

@ntadej
Copy link
Collaborator

ntadej commented Aug 16, 2024

I propose you open a ticket against Debian and ask why they do not provide this.

@petricf
Copy link
Author

petricf commented Aug 16, 2024

Already done - requesting QtLocation. Answer was: New packages will not be added to a release (here: Debian 12).
Have to wait for Debian 13 (?) or use unstable line.

@ntadej
Copy link
Collaborator

ntadej commented Aug 16, 2024

OK, but will the package be added to the next release?

@petricf
Copy link
Author

petricf commented Aug 16, 2024

Found a solution: Add path to bin directory of Qt (here: ~/Qt/6.6.3/gcc_64/bin) in front of $PATH environment variable.

Possible reason: I have Debian provided QtCreator also in the system.

For me this bug is solved (circumvented).

@petricf
Copy link
Author

petricf commented Aug 16, 2024

OK, but will the package be added to the next release?

No idea. I hope so.

@petricf
Copy link
Author

petricf commented Aug 16, 2024

Update ...

Checked the libs with ldd. Got:

   libicui18n.so.72 => /lib/x86_64-linux-gnu/libicui18n.so.72 (0x00007ffb59600000)
   libicuuc.so.72 => /lib/x86_64-linux-gnu/libicuuc.so.72 (0x00007ffb59402000)
   libicudata.so.72 => /lib/x86_64-linux-gnu/libicudata.so.72 (0x00007ffb57200000)

I expected to be linked with libicuuc.so.56. Am i wrong ?

cmake configure output (executed by qtcreator):

Führe /usr/bin/cmake -S /home/petric/map/maplibre-native-qt -B /home/petric/map/maplibre-native-qt-Desktop_Qt_6_6_3_GCC_64bit-Debug -DCMAKE_INSTALL_PREFIX:PATH=/home/petric/map/install-6.6.3 in /home/petric/map/maplibre-native-qt-Desktop_Qt_6_6_3_GCC_64bit-Debug aus.
-- Version 3.0.0
-- Using Qt6 (6.6.3)
-- Configuring GL-Native with OpenGL renderer backend
-- Configuring MapLibre Native with Qt platform
-- Using internal ICU
-- Building location module
-- Building widgets module
-- Configuring done
-- Generating done
-- Build files have been written to: /home/petric/map/maplibre-native-qt-Desktop_Qt_6_6_3_GCC_64bit-Debug
Verstrichene Zeit: 00:01.

I think it should be linked with icu v.56 because the other qt libs are linked to it also.

Or do i have to omit the internal ICU and give the lib path manually (how ?)

@ntadej
Copy link
Collaborator

ntadej commented Aug 16, 2024

This is weird. If you use internal ICU, it will not have a shared link at all. Did you do a full rebuild?

@ntadej ntadej added question Further information is requested platform: Linux Linux platform issues labels Aug 16, 2024
@ntadej ntadej added this to the 3.0 milestone Aug 16, 2024
@petricf
Copy link
Author

petricf commented Aug 19, 2024

I have checked out from git again and built the libs (with option --fresh).

Same result - points to icu v.72.

@ntadej
Copy link
Collaborator

ntadej commented Aug 27, 2024

Unfortunately I can not reproduce your issue.

Can you try using -DCMAKE_TOOLCHAIN_FILE="<path-to-qt>/lib/cmake/Qt6/qt.toolchain.cmake" to specify your Qt version (or alternatively use qt-cmake wrapper)?

@petricf petricf changed the title Deoe not compile using Qt-Creator (from qt.io) Does not compile using Qt-Creator (from qt.io) Oct 10, 2024
@ntadej ntadej modified the milestones: 3.0, 3.1 Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Linux Linux platform issues question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants