Author Topic: [PACKAGED] QtWeb - From source - Is it OK ?  (Read 1639 times)

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
[PACKAGED] QtWeb - From source - Is it OK ?
« on: November 21, 2012, 03:57:14 AM »
I got it to build from source with a few fixes.
1. Had to put QtWebkit source in a separate location and point $QTDIR there.
2. Had to patch a few lines after modifying a patch applied by an unknown packager at Chakra.
3. Renamed logo.png to qtweb.png so that it would be displayed in the panel.
4. Added a script to provide a lowercase command to launch QtWeb.

SRPM - http://dl.dropbox.com/u/37931428/qtweb/qtweb-3.7.5.101-1slingshot2012.src.rpm
RPM - http://dl.dropbox.com/u/37931428/qtweb/qtweb-3.7.5.101-1slingshot2012.i586.rpm
SPEC - http://dl.dropbox.com/u/37931428/qtweb/pclos-qtweb.spec
LOG - http://dl.dropbox.com/u/37931428/qtweb/pclos-qtweb.spec.log
PATCH - http://dl.dropbox.com/u/37931428/qtweb/qtweb-libraryfix.patch

Please comment by replying. I will continue to update the links here only.

---------------------------------------------------
The discussion follows below
---------------------------------------------------

Trying to learn building .spec file from scratch
--------------------------------------------------

Selected QtWeb as my starting point.
Got QtCreator installed.
Got the source. Converted to .tar.xz and copied to SOURCES.
Create new file called pclos-qtweb.spec
Entered the following details into it (Followed our pclos-qupzilla.spec as a guide)
Code: [Select]
Name: qtweb
Version: 3.7.5.101
Release: %mkrel 1
Summary: Portable, compact, fast, secure internet browser based on Qt and WebKit.
License: GPLv2 or later
Group: Networking/WWW
URL: http://qtweb.net
Source0: %{name}-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
AutoReqProv: no

%description
QtWeb Internet Browser - lightweight, secure and portable browser having unique user interface and privacy features.
QtWeb is an open source project based on Nokia's Qt framework and Apple's WebKit rendering engine (the same as being used in Apple Safari and Google Chrome).

%prep
%setup -q

%build
qmake -config release
make

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_datadir}/qtweb

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files

%changelog
* Currently under generation

There was this WARNING :
Code: [Select]
+ qmake -config release
Project MESSAGE: Running qmake...
Project MESSAGE: qmake finished.
WARNING: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
WARNING: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/inspector/front-end/WebKit.qrc
/usr/lib/qt4/bin/rcc: File does not exist '/usr/lib/qt4/src/3rdparty/webkit/Source/WebCore/WebCore.qrc'
/usr/lib/qt4/bin/rcc: File does not exist '/usr/lib/qt4/src/3rdparty/webkit/Source/WebCore/inspector/front-end/WebKit.qrc'
+ make

and ultimately the build failed with

Code: [Select]
make: *** No rule to make target `/usr/lib/qt4/src/3rdparty/webkit/Source/WebCore/WebCore.qrc', needed by `tmp/rcc/release_static/qrc_WebCore.cpp'.  Stop.
error: Bad exit status from /home/testinstall/src/tmp/rpm-tmp.iTj5mq (%build)


RPM build errors:
    Bad exit status from /home/testinstall/src/tmp/rpm-tmp.iTj5mq (%build)
« Last Edit: December 27, 2012, 11:27:37 AM by sling-shot »
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1171
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #2 on: November 21, 2012, 04:08:56 AM »
Hi sling-shot,

try the %qmake or the %qmake_qt4 macros for building and %make to speed up the build.
also you are trying to build qt4 app so you need to have installed libqt4-devel and and this to BuildRequires.

not sure but you will probably need webkit devel.

regards
ghostbunny
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #3 on: November 21, 2012, 05:11:35 AM »
Thanks.

I have to read up about %qmake and %qmake_qt4 macros.

I have to check if libqt4-devel has been installed or not.

When I search for "webkit devel" Synaptic only shows:

libseed-devel
libwebkitgtk1.0-devel
python-webkitgtk
webkit-sharp-devel

I doubt if any of these is relevant.

I can confirm that no such directory called /src exists in $(QTDIR) which I take means that particular package is not installed. So that may mean I need to package and install webkit devel first??

------------------

In the absence of any readme.txt or such, where to get the following information for a qt source package?
1. Version
2. BuildRequires
3. Requires

---------------------

There is a build.cmd file with this content:
Code: [Select]
nmake clean
qmake -config release
nmake

There are these lines in QtWeb.pro file:
Code: [Select]
QT += network xml webkit
CONFIG += static
QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs  qgif qjpeg qico
« Last Edit: November 21, 2012, 05:17:59 AM by sling-shot »
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1171
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #4 on: November 21, 2012, 05:40:12 AM »
Quote
There is a build.cmd file with this content:


Code: [Select]
nmake clean
qmake -config release
nmake

don't know whether we have nmake in the repo.

Quote
There are these lines in QtWeb.pro file:


Code: [Select]
QT += network xml webkit
CONFIG += static
QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs  qgif qjpeg qico

maybe libqt4-devel is enough i can't say exactly


Quote
In the absence of any readme.txt or such, where to get the following information for a qt source package?
1. Version
2. BuildRequires
3. Requires

mostly this is a trial and error for BuildRequires when there is not readme but if you know that you are compiling a qt4 app the probability that you need qt4-devel is very high also if you have a gtk app you will mostly need libgtk+2/3-devel.
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #5 on: November 21, 2012, 05:51:17 AM »
I was under the impression that if I install QtCreator, I will get the necessary libs too. But it looks like that is not the case.

I am at work now. Hence cannot boot into my packaging installation which has lost its bluetooth after my trial with Bluez-4.101 as detailed here http://www.pclinuxos.com/forum/index.php/topic,110860.msg946814.html. (I have only Bluetooth Dial Up Networking internet here. DSL at home)

Will do so later and come back with updates.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline ghostbunny

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1171
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #6 on: November 21, 2012, 06:01:59 AM »
i do not know whether qtcreator pulls in qt4-devel i just know that it is a IDE for c/c++ + qt4

i also try it at home i'm currently at the university at a debian pc and it seems like it haven't the files also ;D
The full life is a big mess

PS:
I'm German. Sorry because of possible mistakes in my written messages xD


Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #7 on: November 22, 2012, 07:52:38 AM »
libqt4-devel needs to be installed separately. And even with that webkit does not seem to be available.

But I have tried rebuilding qupzilla which is supposedly another Qt and WebKit based browser which is available in our repos itself. That seems to build fine using the src.rpm downloaded from our repo on my same test rig. Wonder where is it getting its WebKit from?

May I send a PM to whoever built the Qt in our repo - he may have an answer to this problem.

----------------

From whatever documentation I have read online, I got the impression that WebKit is integrated in Qt 4.8.x which is the version in our repository anyway.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #8 on: November 22, 2012, 09:11:51 AM »
Hint:     
libqtwebkit4 ;)     

QTCreator is an IDE. It is used for developing qt based software. It is not needed for packaging. (It does not pull in -devel files.)     

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #9 on: November 22, 2012, 10:27:19 AM »
[Neal]
Now that you have given me the hint, I see that libqtwebkit4 is indeed installed on my system. There is no -devel version of the same package.
But this is what I see :

Code: [Select]
[packager@PCLE450 qtweb-3.7.5.101]$ find / -name libqt* 2>/dev/null
/usr/lib/libqt-mt.prl
/usr/lib/libqt-mt.so.3
/usr/lib/libqt-mt.so.3.3
/usr/lib/qt4/plugins/codecs/libqtwcodecs.so
/usr/lib/qt4/plugins/designer/libqt3supportwidgets.so
/usr/lib/qt4/plugins/imageformats/libqtga.so
/usr/lib/qt4/plugins/imageformats/libqtiff.so
/usr/lib/qt4/plugins/script/libqtscriptdbus.so
/usr/lib/kde4/imports/org/kde/qtextracomponents/libqtextracomponentsplugin.so
/usr/lib/libqt-mt.so.3.3.8

[packager@PCLE450 qtweb-3.7.5.101]$ which libqtwebkit4
which: no libqtwebkit4 in (/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/kde4/libexec:sbin:/usr/sbin:/usr/lib/qt4/bin:/usr/bin:/usr/sbin:/usr/lib/kde4/libexec:/bin:/sbin:/usr/X11R6/bin:/usr/games:/usr/local/bin:/usr/local/sbin:/home/packager/bin:/usr/bin:/usr/sbin:/usr/lib/kde4/libexec:/bin:/sbin:/usr/X11R6/bin:/usr/games:/usr/local/bin:/usr/local/sbin)
[packager@PCLE450 qtweb-3.7.5.101]$

In the particular case of QtWeb, the log seems to indicate that it is looking for 2 .qrc files in source format and that directory is also labelled /src/....

The file structure of QtWeb source compared to the source of QupZilla as seen in src.rpm seem to be different in some way.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #10 on: November 22, 2012, 02:49:42 PM »
I did say, "Hint." :) >>> libqtwebkit4 is part of the QT4 package. Its devel package would be libqt4-devel
Hmm...... compare your spec file to the spec for qupzilla. See if you can find differences that will help you.     

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #11 on: November 23, 2012, 10:14:39 AM »
Not able to locate the part where I am missing the hint :( :( :( This particular error seems to be happening somewhere in the build section and there are only 2 commands there which are identical in both qtweb.spec and qupzilla.spec.

I am probably looking completely in a different direction to that of the solution needed in this situation.
But I did the following:
Looked up QtWeb.pro and QtWeb.pri files in the root of the package. QtWeb.pri has references to the two .pri files lack of which are throwing the error.
Got some strange idea from here http://trac.webkit.org/wiki/QtWebKitRelease20Deployment
Initially I tried to get QtWebKit source thinking that I may be able to place it into the required subdirected in /lib/share/qt4 in the PACKAGER install. But the current one needs Qt5. So I located and downloaded a 500 MB+ source for QtWebKit 2.0 then copied the relevant directory from that to the /usr/share/qt4/..3rdparty...
(This method must be so wrong on multiple levels. I am expecting a nice lashing for this...

Re-ran the build. Now the build progresses nicely until an error with missing
Code: [Select]
main.cpp:(.text+0x89): undefined reference to `qt_plugin_instance_qjpeg()'
main.cpp:(.text+0x95): undefined reference to `qt_plugin_instance_qgif()'
main.cpp:(.text+0xa1): undefined reference to `qt_plugin_instance_qico()'
main.cpp:(.text+0xad): undefined reference to `qt_plugin_instance_qcncodecs()'
main.cpp:(.text+0xb9): undefined reference to `qt_plugin_instance_qjpcodecs()'
main.cpp:(.text+0xc5): undefined reference to `qt_plugin_instance_qkrcodecs()'
main.cpp:(.text+0xd1): undefined reference to `qt_plugin_instance_qtwcodecs()'

Searching for these errors, I gather that these are due to missing dependencies in the form static libraries. However I could only find static libraries for the jpeg thing in our repository.
(Considering that I had missed libqtwebkit4 in my first repository search, I am sure they are there but I am not seeing them)
First three seem to be image handling related and last 4 asian language support.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline tele

  • Full Member
  • ***
  • Posts: 198
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #12 on: November 24, 2012, 09:36:01 AM »
libqtwebkit4  4.8.2-2pclos2012  section : updates , section: System/Libraries ???
---
Sorry, if my language is wrong,
you please write notice where I do mistakes, I will try to learn.

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #13 on: November 24, 2012, 10:43:19 AM »

Code: [Select]
main.cpp:(.text+0x89): undefined reference to `qt_plugin_instance_qjpeg()'
main.cpp:(.text+0x95): undefined reference to `qt_plugin_instance_qgif()'
main.cpp:(.text+0xa1): undefined reference to `qt_plugin_instance_qico()'
main.cpp:(.text+0xad): undefined reference to `qt_plugin_instance_qcncodecs()'
main.cpp:(.text+0xb9): undefined reference to `qt_plugin_instance_qjpcodecs()'
main.cpp:(.text+0xc5): undefined reference to `qt_plugin_instance_qkrcodecs()'
main.cpp:(.text+0xd1): undefined reference to `qt_plugin_instance_qtwcodecs()'

Searching for these errors, I gather that these are due to missing dependencies in the form static libraries. However I could only find static libraries for the jpeg thing in our repository.

First three seem to be image handling related and last 4 asian language support.

1. That bold text in my earlier post misguided you. I have removed it now. I have found libqtwebkit but now am looking for the above things. There seems to libjpeg62-static-devel but there is no sign of others.
2. I could not find an .srpm for libqtwebkit4 in our repository.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 732
Re: Failure to find: $(QTDIR)/src/3rdparty/webkit/Source/WebCore/WebCore.qrc
« Reply #14 on: November 24, 2012, 11:10:22 AM »
The problem here is that the source you have downloaded is for building a completely static version of QtWeb.
That means that the Makefile (generated by qmake) wants to build Webkit from source rather than dynamically link to the webkit which is built into our QT (libqtwebkit4). Without an in-depth knowledge of QT project building you are going to find this very difficult to build from source.  The qupzilla app is different because the project is set up dynamically link to the Webkit lib provided by the distro.

One possible way you could get around this is to see if the statically linked binary they provide works and if does you could package it that way (this is how we do firefox for example).

Terry
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|