Problem compiling wkhtmltopdf-qt
-
wrote on 21 Mar 2014, 12:52 last edited by
Hi, I have a problem compiling the wkhtmltopdf-qt library, there it is what I have done:
aptitude install openssl build-essential xorg libssl-dev libxrender-dev libxext-dev git-core libqt4-dev qt4-dev-tools
git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt
cd wkhtmltopdf-qt
git checkout 4.8.4
QTDIR=. ./bin/syncqt
cd wkhtmltopdf-qt
./configure -nomake tools,examples,demos,docs,translations -opensource -prefix "../wkqt"
make -j3I have basically followed this guide: https://code.google.com/p/wkhtmltopdf/wiki/compilation installing some other libraries I needed
When I do the "make" this is the output:
make[2]: *** [../../../../../../lib/libQtWebKit.so.4.9.3] Error 1
make[2]: Leaving directory/root/wkhtmltopdf-qt/src/3rdparty/webkit/Source/WebKit/qt' make[1]: *** [sub-WebKit-qt-QtWebKit-pro-make_default-ordered] Error 2 make[1]: Leaving directory
/root/wkhtmltopdf-qt/src/3rdparty/webkit/Source'
make: *** [sub-webkit-make_default-ordered] Error 2Note that I am using Debian in case that matters.
This is getting a little bit on my nerves, if someone could help me I would really appreciate it, thank you very much -
Hi,
Read the last comment (2 Feb 2014) at https://code.google.com/p/wkhtmltopdf/wiki/compilation -- the user seemed to use slightly different steps from yours.
Anyway, have you tried downloading Qt from the Debian repo? You won't have to build it yourself then.
-
wrote on 23 Mar 2014, 19:57 last edited by
Hi, sorry for aswering that late.
Yes I read the last comment, he basically add some libraries.
You mean download and installing wkhtmltopdf the .deb, or the wkhtmltopdf-qt .deb¿?
The problem is that I need the features of the patched QT library, and I have to compile it for that, so the .deb wouldn't work I think.
If someone have tried and know exactly what .deb to download and works tell me please, otherwise I would appreciate if someone put me on the right way to compile it ! Thank you very much -
wrote on 24 Mar 2014, 17:37 last edited by
Hello everyone, it seems that I have finally got this working, but I don't want to mark the post as [SOLVED] cause I would like to ask for your help with understanding the process I did, which I think is completly stupid and it shows the low knowledge I have with this library. This is what I did :
-
apt-get intall wkhtmltopdf xvfb git-core build-essential libqt4-dev qt4-dev-tools
-
git clone git://github.com/antialize/wkhtmltopdf.git wkhtmltopdf
-
cd wkhtmltopdf
-
qmake-qt4
-
make && make install
-
cd..
-
git clone git://gitorious.org/~antialize/qt/antializes-qt.git wkhtmltopdf-qt
-
cd wkhtmltopdf-qt
-
git checkout 4.8.4
-
QTDIR=. ./bin/syncqt
-
./configure -nomake tools,examples,demos,docs,translations -opensource -prefix "../wkqt"
-
make && make install
-
apt-get remove wkhtmltopdf
-
cd ..
-
cd wkhtmltopdf
-
../wkqt/bin/qmake
-
make && make install
Well I do that, and I get this working, but, as maybe someone have seen, it seems completly stupid what I do, because I am installing 3 times wkhtmltopdf, the problem is, I have seen the dependancies of wkhtmltopdf (apt-rdepends wkhtmtopdf), I have installed the libraries related to where I have the problems (libwebqkit4 among others), and I can't compile the wkhtmltopdf library, I have the error I mentioned in the first post (error related to the libwebkit).
Even worse is, that I skip steps 4 and 5:
-
qmake-qt4
-
make && make install
and I do the process exactly, I can only compile the wkhtmtopdf-qt but not the wkhtmltopdf, where I get this error:
../lib/multipageloader.hh:32:20: fatal error: QWebPage: No such file or directory
compilation terminated.
make[1]: *** [../../build/multipageloader.o] Error 1
make[1]: Leaving directory `/root/wkhtmltopdf/src/lib'
make: *** [sub-src-lib-make_default-ordered] Error 2I need to document the process for compiling and installing it, but I can't to this that way, installing 1 program 3 times, for getting that working, I don't know why if I do like that it works and not if I do the "normal" way.
Sorry for this so long post, but I didn't know how to explain it in a shorter way =(, I just tried to expose the problem as best as I could, thank you very much in advance -
-
Hi,
Since wkhtmltopdf has patched Qt, then it's best if you ask the project maintainers themselves to see if the patch changed any part of the build process.
Normally it's quite straightforward to build Qt on a modern computer.
-
wrote on 25 Mar 2014, 23:21 last edited by
Hey, yes it should be easy but... for me it wasn't, I spent so much time with it.
Sorry for my noob question but, any suggestion about how to get in contact with the maintainers ¿? Never done that before sorry, Thank you !!! -
[quote author="adon90" date="1395789699"]Sorry for my noob question but, any suggestion about how to get in contact with the maintainers ¿? Never done that before sorry, Thank you !!![/quote]I don't know, sorry. Try searching their website: http://wkhtmltopdf.org/
Note: wkhtmltopdf is a 3rd-party tool that is not affiliated with the Qt Project. We don't know how their patches affect the Qt build process -- that's why it's difficult for us to help you with building wkhtmltopdf-qt. (We can, however, help you if you want to build the official version of Qt)
By the way, the first link you gave (https://code.google.com/p/wkhtmltopdf/wiki/compilation ) says that page is deprecated. Are you sure you are looking at the latest version of wkhtmltopdf? See http://wkhtmltopdf.org/ instead.
1/7