Forum > QT

[SOLVED] QT5 with latest Lazarus has undefined references

(1/7) > >>

ChrisR:
I am unalbe to compile event he simplest default project with Lazarus to the Linux QT5 widgetset. This is new, as previously I had no problem, even with complex projects. My libqt5pas seems to be the latest. I am using Ubuntu 20.04



$svn up
Updating '.':
At revision 64929.


$sudo apt install libqt5pas-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libqt5pas-dev is already the newest version (2.8).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

sudo apt install libqt5pas1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libqt5pas1 is already the newest version (2.8).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.


$lazbuild -B project1.lpr --ws=qt5
TProject.DoLoadStateFile Statefile not found: /home/chris/Downloads/QT5/lib/x86_64-linux/project1.compiled
Hint: (11030) Start of reading config file /home/chris/.fpc.cfg
Hint: (11031) End of reading config file /home/chris/.fpc.cfg
Free Pascal Compiler version 3.2.0 [2020/07/07] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
(3104) Compiling project1.lpr
(3104) Compiling unit1.pas
(9022) Compiling resource /home/chris/Downloads/QT5/lib/x86_64-linux/project1.or
(9015) Linking /home/chris/Downloads/QT5/project1
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS_$$_QTAXFACTORY$QSTRINGH$QOBJECTH$$QACCESSIBLEINTERFACEH':
qtwidgets.pas:(.text.n_qtwidgets_$$_qtaxfactory$qstringh$qobjecth$$qaccessibleinterfaceh+0xdf): undefined reference to `QLCLAccessibleWidget_Create'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS$_$TQTACCESSIBLEOBJECT_$__$$_CREATE$TLAZACCESSIBLEOBJECT$QWIDGETH$$TQTACCESSIBLEOBJECT':
qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibleobject_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibleobject+0x14c): undefined reference to `QAccessible_queryAccessibleInterface'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibleobject_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibleobject+0x16a): undefined reference to `QLCLAccessibleWidget_override_child'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibleobject_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibleobject+0x183): undefined reference to `QLCLAccessibleWidget_override_childCount'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibleobject_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibleobject+0x19c): undefined reference to `QLCLAccessibleWidget_override_role'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibleobject_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibleobject+0x1b5): undefined reference to `QLCLAccessibleWidget_override_text'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS$_$TQTACCESSIBLEOBJECT_$__$$_CHILDOVERRIDE$LONGINT$QACCESSIBLEINTERFACEH':
qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibleobject_$__$$_childoverride$longint$qaccessibleinterfaceh+0x73): undefined reference to `QAccessible_queryAccessibleInterface'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS$_$TQTACCESSIBLETREE_$__$$_CREATE$TLAZACCESSIBLEOBJECT$QWIDGETH$$TQTACCESSIBLETREE':
qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletree_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletree+0x9b): undefined reference to `QAccessible_queryAccessibleInterface'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletree_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletree+0xb9): undefined reference to `QLCLAccessibleWidget_override_child'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletree_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletree+0xd2): undefined reference to `QLCLAccessibleWidget_override_childCount'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS$_$TQTACCESSIBLETREE_$__$$_CHILDOVERRIDE$LONGINT$QACCESSIBLEINTERFACEH':
qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletree_$__$$_childoverride$longint$qaccessibleinterfaceh+0xc3): undefined reference to `QAccessible_queryAccessibleInterface'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS$_$TQTACCESSIBLETREEROW_$__$$_CREATE$TLAZACCESSIBLEOBJECT$QWIDGETH$$TQTACCESSIBLETREEROW':
qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0x9b): undefined reference to `QAccessible_queryAccessibleInterface'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0xb9): undefined reference to `QLCLAccessibleWidget_override_actionNames'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0xc7): undefined reference to `QLCLAccessibleWidget_override_child'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0xd5): undefined reference to `QLCLAccessibleWidget_override_childAt'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0xee): undefined reference to `QLCLAccessibleWidget_override_childCount'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0x107): undefined reference to `QLCLAccessibleWidget_override_doAction'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0x120): undefined reference to `QLCLAccessibleWidget_override_parent'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0x139): undefined reference to `QLCLAccessibleWidget_override_rect'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0x152): undefined reference to `QLCLAccessibleWidget_override_role'
/usr/bin/ld: qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_create$tlazaccessibleobject$qwidgeth$$tqtaccessibletreerow+0x16b): undefined reference to `QLCLAccessibleWidget_override_text'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwidgets.o: in function `QTWIDGETS$_$TQTACCESSIBLETREEROW_$__$$_PARENTOVERRIDE$QACCESSIBLEINTERFACEH':
qtwidgets.pas:(.text.n_qtwidgets$_$tqtaccessibletreerow_$__$$_parentoverride$qaccessibleinterfaceh+0x25): undefined reference to `QAccessible_queryAccessibleInterface'
/usr/bin/ld: /home/chris/lazarus/lcl/units/x86_64-linux/qt5/qtwscontrols.o: in function `QTWSCONTROLS$_$TQTWSLAZACCESSIBLEOBJECT_$__$$_CREATEHANDLE$TLAZACCESSIBLEOBJECT$$HWND':
qtwscontrols.pp:(.text.n_qtwscontrols$_$tqtwslazaccessibleobject_$__$$_createhandle$tlazaccessibleobject$$hwnd+0x13): undefined reference to `QAccessible_installFactory'
/home/chris/Downloads/QT5/project1.lpr(25,1) Error: (9013) Error while linking
/home/chris/Downloads/QT5/project1.lpr(25,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Error: (lazarus) Compile Project, Target: project1: stopped with exit code 1
Error: (lazbuild) failed compiling of project /home/chris/Downloads/QT5/project1.lpi

zeljko:
You must use libQt5Pas from lazarus trunk - in other words you must rebuild libQt5Pas on your own since I've added QAccessibility* in trunk.
If you don't want to build libQt5Pas then use stable Lazarus release.

MarkMLl:

--- Quote from: zeljko on April 06, 2021, 08:57:08 am ---You must use libQt5Pas from lazarus trunk - in other words you must rebuild libQt5Pas on your own since I've added QAccessibility* in trunk.
If you don't want to build libQt5Pas then use stable Lazarus release.

--- End quote ---

Where is it best installed? Do you have any notes on doing that? I've always assumed that Lazarus + Qt was just a combination that stopped working on occasion.

I can confirm the same problem with lazarus-trunk and Debian "Bullseye" i.e. testing/not-yet-stable.

MarkMLl

zeljko:
On my linuxmint libQt5Pas is inside /usr/lib/x86_64-linux-gnu
linda@linda-Lenovo-Y520-15IKBN /usr/lib/x86_64-linux-gnu $ ls -al libQt5Pas.so*
lrwxrwxrwx 1 root root       18 tra   4 12:35 libQt5Pas.so -> libQt5Pas.so.1.2.9
lrwxrwxrwx 1 root root       18 tra   4 12:35 libQt5Pas.so.1 -> libQt5Pas.so.1.2.9
lrwxrwxrwx 1 root root       18 tra   4 12:35 libQt5Pas.so.1.2 -> libQt5Pas.so.1.2.9
-rwxr-xr-x 1 root root 88692504 lip   5  2019 libQt5Pas.so.1.2.7
-rwxr-xr-x 1 root root  3663888 tra   4 12:34 libQt5Pas.so.1.2.9

cd lcl/interfaces/qt5/cbindings
qmake -query && qmake && make

You must install qt5 dev packages (don't know exact names)

I've copied libQt5Pas.so.1.2.9 manually after compilation.



MarkMLl:

--- Quote from: zeljko on April 06, 2021, 11:09:48 am ---cd lcl/interfaces/qt5/cbindings
qmake -query && qmake && make

You must install qt5 dev packages (don't know exact names)

I've copied libQt5Pas.so.1.2.9 manually after compilation.

--- End quote ---

Install from where: the distro or Lazarus svn?

I'm entirely used to installing libqt*pas from the distro, but your suggestion earlier was that it also existed as part of Lazarus.

MarkMLl

Navigation

[0] Message Index

[#] Next page

Go to full version