niklasb / webkit-server

[not actively maintained] The C++ webkit-server from capybara-webkit with useful extensions and Python bindings
MIT License
48 stars 38 forks source link

Doesn't compile. #8

Closed RomeuG closed 10 years ago

RomeuG commented 10 years ago

[plastico@arch dryscrape]$ sudo pip-2.7 install -r requirements.txt Downloading/unpacking git+git://github.com/niklasb/webkit-server.git (from -r requirements.txt (line 2)) Cloning git://github.com/niklasb/webkit-server.git to /tmp/pip-hRkuag-build Running setup.py egg_info for package from git+git://github.com/niklasb/webkit-server.git

warning: no previously-included files matching 'moc_*' found under directory 'src'
warning: no previously-included files matching 'qrc_*' found under directory 'src'

Requirement already satisfied (use --upgrade to upgrade): lxml in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 1)) Requirement already satisfied (use --upgrade to upgrade): cssselect in /usr/lib/python2.7/site-packages (from -r requirements.txt (line 3)) Installing collected packages: webkit-server Running setup.py install for webkit-server cd src/ && ( test -e Makefile.webkit_server || /usr/lib/qt/bin/qmake /tmp/pip-hRkuag-build/src/webkit_server.pro -o Makefile.webkit_server ) && make -f Makefile.webkit_server make[1]: Entering directory '/tmp/pip-hRkuag-build/src' g++ -c -pipe -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt/mkspecs/linux-g++ -I. -I/usr/include/qt -I/usr/include/qt/QtWebKit -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -o ConsoleMessages.o ConsoleMessages.cpp In file included from ConsoleMessages.cpp:2:0: WebPage.h:3:24: error: invalid use of incomplete type ‘class QWebPage’ class WebPage : public QWebPage { ^ In file included from /usr/include/qt/QtWebKit/QtWebKit:5:0, from WebPage.h:1, from ConsoleMessages.cpp:2: /usr/include/qt/QtWebKit/qwebelement.h:157:18: error: forward declaration of ‘class QWebPage’ friend class QWebPage; ^ In file included from ConsoleMessages.cpp:2:0: WebPage.h:17:29: error: ‘Extension’ has not been declared virtual bool extension (Extension extension, const ExtensionOption _option=0, ExtensionReturn output=0); ^ WebPage.h:17:56: error: ‘ExtensionOption’ does not name a type virtual bool extension (Extension extension, const ExtensionOption option=0, ExtensionReturn output=0); ^ WebPage.h:17:80: error: ISO C++ forbids declaration of ‘option’ with no type [-fpermissive] virtual bool extension (Extension extension, const ExtensionOption option=0, ExtensionReturn output=0); ^ WebPage.h:17:83: error: ‘ExtensionReturn’ has not been declared virtual bool extension (Extension extension, const ExtensionOption option=0, ExtensionReturn output=0); ^ Makefile.webkit_server:3552: recipe for target 'ConsoleMessages.o' failed make[1]: _* [ConsoleMessages.o] Error 1 make[1]: Leaving directory '/tmp/pip-hRkuag-build/src' Makefile:38: recipe for target 'sub-src-webkit_server-pro-make_first-ordered' failed make: * [sub-src-webkit_server-pro-make_first-ordered] Error 2 error: src/webkit_server: No such file or directory Complete output from command /usr/bin/python2 -c "import setuptools;file='/tmp/pip-hRkuag-build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file**, 'exec'))" install --record /tmp/pip-k75iV6-record/install-record.txt --single-version-externally-managed: running install

running build

cd src/ && ( test -e Makefile.webkit_server || /usr/lib/qt/bin/qmake /tmp/pip-hRkuag-build/src/webkit_server.pro -o Makefile.webkit_server ) && make -f Makefile.webkit_server

make[1]: Entering directory '/tmp/pip-hRkuag-build/src'

g++ -c -pipe -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wall -W -D_REENTRANT -fPIE -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib/qt/mkspecs/linux-g++ -I. -I/usr/include/qt -I/usr/include/qt/QtWebKit -I/usr/include/qt/QtNetwork -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I. -o ConsoleMessages.o ConsoleMessages.cpp

In file included from ConsoleMessages.cpp:2:0:

WebPage.h:3:24: error: invalid use of incomplete type ‘class QWebPage’

class WebPage : public QWebPage {

                    ^

In file included from /usr/include/qt/QtWebKit/QtWebKit:5:0,

             from WebPage.h:1,

             from ConsoleMessages.cpp:2:

/usr/include/qt/QtWebKit/qwebelement.h:157:18: error: forward declaration of ‘class QWebPage’

 friend class QWebPage;

              ^

In file included from ConsoleMessages.cpp:2:0:

WebPage.h:17:29: error: ‘Extension’ has not been declared

 virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);

                         ^

WebPage.h:17:56: error: ‘ExtensionOption’ does not name a type

 virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);

                                                    ^

WebPage.h:17:80: error: ISO C++ forbids declaration of ‘option’ with no type [-fpermissive]

 virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);

                                                                            ^

WebPage.h:17:83: error: ‘ExtensionReturn’ has not been declared

 virtual bool extension (Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0);

                                                                               ^

Makefile.webkit_server:3552: recipe for target 'ConsoleMessages.o' failed

make[1]: *\ [ConsoleMessages.o] Error 1

make[1]: Leaving directory '/tmp/pip-hRkuag-build/src'

Makefile:38: recipe for target 'sub-src-webkit_server-pro-make_first-ordered' failed

make: *\ [sub-src-webkit_server-pro-make_first-ordered] Error 2

error: src/webkit_server: No such file or directory


Cleaning up... Command /usr/bin/python2 -c "import setuptools;file='/tmp/pip-hRkuag-build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-k75iV6-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-hRkuag-build Storing complete log in /root/.pip/pip.log

niklasb commented 10 years ago

This looks like you're trying to compile against Qt 5? Only Qt 4 is supported for now, but an outstanding pull request hopefully will bring webkit-server up to date again :)

RomeuG commented 10 years ago

Thank you very much. It wasnt JUST that, it actually was something about the directories! It was looking for /usr/lib/qt4 AND /usr/lib/qt . So my fix was basically copying /usr/lib/qt4 and pasting it in /usr/lib and renaming it to just "qt".

Thank you!

niklasb commented 10 years ago

Hmm, I'm glad you fixed the problem, but I'm not sure whether it's a good idea to randomly copy library paths around in a linux distribution? Some other application might expect Qt5 to reside in /usr/lib/qt...

The proper way to do this would be to use qmake-qt4 instead of just qmake, if that's available on your machine.

RomeuG commented 10 years ago

Yes, there's the proper way, you're totally right. And yes, other applications expect qt5 to be in /usr/lib/qt . After compiling i just did delete that one, and did a completely new install of qt5.

Nevertheless, nothing did broke or anything, although it wasnt the best fix.

Once again, thank you!