niklasb / dryscrape

[not actively maintained] A lightweight Python library that uses Webkit to enable easy scraping of dynamic, Javascript-heavy web pages
http://dryscrape.readthedocs.io/
MIT License
533 stars 67 forks source link

installing dryscrape / webkit-server on Mac El Capitan fails with C++ linking step #54

Closed GullyAPCBurns closed 8 years ago

GullyAPCBurns commented 8 years ago

Trying to build dryscrape fails, manually trying to install webkit-server returns the following error... (I'm running python using Anaconda)

$ sudo python setup.py install running install running build cd src/ && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o webkit_server build/Version.o build/EnableLogging.o build/Authenticate.o build/SetConfirmAction.o build/SetPromptAction.o build/SetPromptText.o build/ClearPromptText.o build/JavascriptAlertMessages.o build/JavascriptConfirmMessages.o build/JavascriptPromptMessages.o build/IgnoreSslErrors.o build/ResizeWindow.o build/CurrentUrl.o build/ConsoleMessages.o build/main.o build/WebPage.o build/Server.o build/Connection.o build/Command.o build/SocketCommand.o build/Visit.o build/Reset.o build/Node.o build/JavascriptInvocation.o build/Evaluate.o build/Execute.o build/FrameFocus.o build/Response.o build/NetworkAccessManager.o build/NetworkCookieJar.o build/Header.o build/Render.o build/body.o build/Status.o build/Headers.o build/UnsupportedContentHandler.o build/SetCookie.o build/ClearCookies.o build/GetCookies.o build/CommandParser.o build/CommandFactory.o build/SetProxy.o build/NullCommand.o build/PageLoadingCommand.o build/SetTimeout.o build/GetTimeout.o build/SetSkipImageLoading.o build/WebPageManager.o build/WindowFocus.o build/GetWindowHandles.o build/GetWindowHandle.o build/TimeoutCommand.o build/SetUrlBlacklist.o build/NoOpReply.o build/JsonSerializer.o build/InvocationResult.o build/ErrorMessage.o build/Title.o build/FindCss.o build/JavascriptCommand.o build/FindXpath.o build/NetworkReplyProxy.o build/IgnoreDebugOutput.o build/Source.o build/SetHtml.o build/SetAttribute.o build/moc_Version.o build/moc_EnableLogging.o build/moc_Authenticate.o build/moc_SetConfirmAction.o build/moc_SetPromptAction.o build/moc_SetPromptText.o build/moc_ClearPromptText.o build/moc_JavascriptAlertMessages.o build/moc_JavascriptConfirmMessages.o build/moc_JavascriptPromptMessages.o build/moc_IgnoreSslErrors.o build/moc_ResizeWindow.o build/moc_CurrentUrl.o build/moc_ConsoleMessages.o build/moc_WebPage.o build/moc_Server.o build/moc_Connection.o build/moc_Command.o build/moc_SocketCommand.o build/moc_Visit.o build/moc_Reset.o build/moc_Node.o build/moc_JavascriptInvocation.o build/moc_Evaluate.o build/moc_Execute.o build/moc_FrameFocus.o build/moc_Response.o build/moc_NetworkAccessManager.o build/moc_NetworkCookieJar.o build/moc_Header.o build/moc_Render.o build/moc_Body.o build/moc_Status.o build/moc_Headers.o build/moc_UnsupportedContentHandler.o build/moc_SetCookie.o build/moc_ClearCookies.o build/moc_GetCookies.o build/moc_CommandParser.o build/moc_CommandFactory.o build/moc_SetProxy.o build/moc_NullCommand.o build/moc_PageLoadingCommand.o build/moc_SetSkipImageLoading.o build/moc_WebPageManager.o build/moc_WindowFocus.o build/moc_GetWindowHandles.o build/moc_GetWindowHandle.o build/moc_GetTimeout.o build/moc_SetTimeout.o build/moc_TimeoutCommand.o build/moc_SetUrlBlacklist.o build/moc_NoOpReply.o build/moc_JsonSerializer.o build/moc_ErrorMessage.o build/moc_Title.o build/moc_FindCss.o build/moc_JavascriptCommand.o build/moc_FindXpath.o build/moc_NetworkReplyProxy.o build/moc_Source.o build/moc_SetHtml.o build/moc_SetAttribute.o build/qrc_webkit_server.o -L/Users/Gully/anaconda/lib -lQtWebKit -lQtGui -L/Users/Gully/anaconda/lib -lQtNetwork -lQtCore Undefined symbols for architecture x86_64: "__Unwind_Resume", referenced from: Version::start() in Version.o Authenticate::start() in Authenticate.o SetConfirmAction::start() in SetConfirmAction.o SetPromptAction::start() in SetPromptAction.o SetPromptText::start() in SetPromptText.o ClearPromptText::start() in ClearPromptText.o JavascriptAlertMessages::start() in JavascriptAlertMessages.o ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: * [webkit_server] Error 1 make: * [sub-src-webkit_server-pro-make_default-ordered] Error 2 error: [Errno 2] No such file or directory: 'src/webkit_server'

GullyAPCBurns commented 8 years ago

The issue was that I was using qt version 4.8 instead of qt5.5. This got installed in my Anaconda distribution which then obscured any attempts to install qt5.5 in my main system.

Calling qmake -v showed which version of qmake I was using which then made it easy to fix.

bmetge commented 7 years ago

Hi !

Could you please give more details on how you end up solving this issue ? I have the exact same problem, but struggle to force my system using qt5.5 instead of 4.8. Thanks a lot for your help :)