0

I have built Qt 5 libs from source into Ubuntu 12.04 and made a Qt test app. In .pro file I have written QT += core gui webkitwidgets to use Qwebview in my test project.

But when I run qmake into Qt creator then it gives me error:

Unknown module(s) in QT: webkitwidgets

I think webkit or webkitwidgets module is not build by source when I built Qt 5 libs from source.

So I have build qtwebkit or webkitwdgtes module from source as per below.

cd qtwebkit    
qmake    
make -jX 

where X is number of cores * 2 + 1

But when I run make command then I got below errors.

StringImpl.cpp:(.text+0x64ad): undefined reference to u_strToUpper_51'
StringImpl.cpp:(.text+0x6636): undefined reference to u_toupper_51'
DatePrototype.cpp:(.text+0x328): undefined reference to udat_open_51'
DatePrototype.cpp:(.text+0x366): undefined reference to udat_close_51'
JSGlobalObjectFunctions.cpp:(.text+0x99f): undefined reference tou_charType_51'
StringImpl.cpp:(.text+0xa00): undefined reference tou_foldCase_51'
CollatorICU.cpp:(.text+0x1f1): undefined reference to ucol_getLocaleByType_51' CollatorICU.cpp:(.text+0x20f): undefined reference toucol_getAttribute_51'
CollatorICU.cpp:(.text+0x25b): undefined reference to ucol_open_51'
CollatorICU.cpp:(.text+0x27f): undefined reference toucol_open_51'
CollatorICU.cpp:(.text+0x2a4): undefined reference to ucol_setAttribute_51'

and many more such undefined reference errors.

Also I have found that qtwebkit module uses ICU library (which are missing at my machine).

So how can I build ICU libraries into Ubuntu so that qtwebkit module can take reference of complied ICU libraries and I can able to fix these reference error and build qtwebkit successfully.

jophab
  • 5,356
  • 14
  • 41
  • 60
User2546
  • 33
  • 1
  • 8
  • Is there a good reason for not using Ubuntu's own Qt version? – Braiam Jul 23 '15 at 16:14
  • Thanks for your comment. I have build icu libs from source as per below. cd source && ./configure --prefix=/usr && make and install the same by make install, now I am able to get icu libs at path /usr/lib/ but still I am getting the same undefined reference errors when I build qtwebkit module from source. – User2546 Jul 24 '15 at 06:00
  • Just FYI, I was getting by default Qt 4.8.1 compatible .so libs at path /usr/lib/i386-linux-gnu/ in Ubuntu 12.04. But I want make deb of QT 5.2.1 app into Ubuntu 12.04. So I have installed QT 5.2.1 installer into Ubuntu 12.04 and then I am able to run the QT 5 app into qt creator successfully. But when I tried to make deb of the same app then it takes the reference of machine's qt5 libs instead of QT 5 which I installed from installer. – User2546 Jul 24 '15 at 06:00
  • So that is why I build QT 5.2.1 from source but I got issues regarding webkitwidget when I run my app into Qt creator using Qt 5.2.1 ( which I have build from source ). Then I tried to build qtwebkit and got undefined reference errors which I have mentioned above in my post. – User2546 Jul 24 '15 at 06:01
  • Wouldn't you consider using a VM or upgrading the system? – Braiam Jul 24 '15 at 17:12

3 Answers3

0

I have fixed a similar error by removing ICU libraries from Qt/lib folder. If there is another version of ICU installed to os libs, it makes conflict.

IGHOR
  • 691
  • 6
  • 22
0

Did you try this?:

sudo apt-get install libqt5webkit5-qmlwebkitplugin libqt5webkit5.

RESOURCES += \
    resources.qrc

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkit webkitwidgets

However, and even when I made it work for my project, webkit gives more issues down the road, like being missing from the UI toolbar or not compiling at the time to publish your programme to the Store. I would suggest to look into alternative solutions like QWebEngineView.

Antoine L
  • 3
  • 3
-2

Try installing the package with apt-get:

sudo apt-get install libqt5webkit5-dev
Undo
  • 25,519
  • 37
  • 106
  • 129
Alireza Soori
  • 645
  • 9
  • 25