Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

cannot find -lQtWebKit #10648

Closed
ariya opened this issue Jul 10, 2012 · 20 comments
Closed

cannot find -lQtWebKit #10648

ariya opened this issue Jul 10, 2012 · 20 comments

Comments

@ariya
Copy link
Owner

ariya commented Jul 10, 2012

[email protected] commented:

Which version of PhantomJS are you using? Tip: run 'phantomjs --version'.

What steps will reproduce the problem?
1.compiling the source code by running the build.sh
2.scripst failed with below erro message
/usr/bin/ld: cannot find -lQtWebKit
collect2: ld returned 1 exit status
make[1]: *** [../bin/phantomjs] Error 1

What is the expected output? What do you see instead?
Build.sh script should end with success message, so that we can run deploy/package-linux-dynamic.sh which creates phantomjs.tar.gz
Which operating system are you using?
uname -a
Linux nyfwpla101.ny.fw.gs.com 2.6.18-128.1.6.el5 #1 SMP Tue Mar 24 12:05:57 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

Did you use binary PhantomJS or did you compile it from source?
Compiling the source code
Please provide any additional information below.
attached error logs.
Kindly suggest

Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #648.
🌟   2 people had starred this issue at the time of migration.

@ariya
Copy link
Owner Author

ariya commented Jul 10, 2012

[email protected] commented:

Below error are coming while compiling the code :-

floatmath.cpp:44: warning: unused parameter âargcâ
floatmath.cpp:44: warning: unused parameter âargvâ
cc1plus: error: unrecognized command line option "-msse4.1"
gmake: *** [sse4_1.o] Error 1
cc1plus: error: unrecognized command line option "-msse4.2"
gmake: *** [sse4_2.o] Error 1
cc1plus: error: unrecognized command line option "-mavx"
gmake: *** [avx.o] Error 1
wayland.cpp:41:28: error: wayland-client.h: No such file or directory
gmake: *** [wayland.o] Error 1
gcc: error trying to exec 'cc1objplus': execvp: No such file or directory
gmake: *** [coreservices.o] Error 1

@gkavaturi
Copy link

[email protected] commented:

sudo apt-get install libwebkit-dev

for a debain based OS should work

the error means you are missing the webkit package.

@ariya
Copy link
Owner Author

ariya commented Jul 23, 2012

[email protected] commented:

That's incorrect, libwebkit-dev is not needed at all since PhantomJS comes with its own copy of WebKit.

@mcoram
Copy link

mcoram commented Jul 27, 2012

[email protected] commented:

I experienced this error after "git checkout 1.6" (as per http://phantomjs.org/build.html). It went away when I switched to "git checkout master".

@ariya
Copy link
Owner Author

ariya commented Dec 1, 2012

[email protected] commented:

Try again with the latest stable branch and see if it still persists.

@damienfa
Copy link

I experienced this error... I'm on the latest stable branch... I don't find any solution. An idea ?
(I'm on MacOs 10.6.8, g++ => i686-apple-darwin10-g++-4.2.1)

@curtisturner
Copy link

Experiencing the same issue. I'm installing on a Virtual Machine via Koding....

@rurabe
Copy link

rurabe commented Oct 25, 2013

getting the same error trying to install on osx 10.9

ld: library not found for -lQtWebKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../bin/phantomjs] Error 1
make: *** [sub-src-phantomjs-pro-make_default-ordered] Error 2
==> Configuration
HOMEBREW_VERSION: 0.9.5
HEAD: 70eb1a50e3440f534a83a36a37297f426ca16635
CPU: quad-core 64-bit haswell
OS X: 10.9-x86_64
CLT: 5.0.1.0.1.1382131676
X11: N/A
==> ENV
HOMEBREW_CC: clang
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9
HOMEBREW_VERBOSE: 1
ACLOCAL_PATH: /usr/local/share/aclocal
OBJC: cc
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin

Error: phantomjs did not build

@crayze
Copy link

crayze commented Nov 8, 2013

I had the same (in my case with phantom 1.9.2).
This error happends when QtWebKit library compilation failed and then while trying build phantomjs -lQtWebKit is missing. If you check previous compilation log, you probably will see what rly happend with QtWebKit compilation error.

In my case I had 2 problems:
1:
missing wayland-client.h file in 1 of cpp files (wayland.cpp as i remember), but when I opened this cpp file, there was just empty C++ main() function, so including wayland-client.h does not matter for this cpp and in this case i commented those:
// #include <wayland-client.h>.
This will fix this problem (only because cpp main code is empty, nomrally don't do that and install needed packages).

2:
Problem 2 says:
/usr/include/unicode/umachine.h:345:17: error: conflicting declaration ‘typedef int32_t UChar32’
and sollution is here:
https://bugs.webkit.org/show_bug.cgi?id=82824
If you open src/3rdparty/webkit/Source/JavaScriptCore/JavaScriptCore.pri you will find commented:
CONFIG += text_breaking_with_icu
uncommenting this 1 and rebuild all fixed the problem.

After that phantomjs/src/qt/lib/libQtWebKit.a were build successfully and phantom build with success

gl with compilations

@nonrational
Copy link

@rurabe your issue (mine as well) may be related to CPU architecture rather than OS version. See SSSE3 fails on latest Haswell based MacBook Pro and Air

This comment outlines the exact failures I see.

hacking in -no-ssse3 to the phantomjs formula allows me to compile via homebrew on a haswell MBP. Note that that formula already incorporates the struct TabletProximityRec patch pointed out by @crayze.

diff --git a/Library/Formula/phantomjs.rb b/Library/Formula/phantomjs.rb
index 475a082..c34e50b 100644
--- a/Library/Formula/phantomjs.rb
+++ b/Library/Formula/phantomjs.rb
@@ -21,34 +21,45 @@ class Phantomjs < Formula
     inreplace 'src/qt/preconfig.sh', '-arch x86', '-arch x86_64' if MacOS.prefer_64_bit?
     args = ['--confirm', '--qt-config']
     # Fix Clang/LLVM 3DNow! intrinsic failure.
-    if MacOS.version >= :lion
-      args << '-no-3dnow'
-    else
-      args << '-no-3dnow -no-ssse3'
-    end
+    args << '-no-3dnow -no-ssse3'
     system './build.sh', *args
     bin.install 'bin/phantomjs'
     (share+'phantomjs').install 'examples'
   end
 end
 __END__

Edit: the homebrew formula for qt now unconditionally adds the -no-ssse3 flag in this commit.

mingww pushed a commit to mingww/phantomjs that referenced this issue Dec 5, 2013
mingww pushed a commit to mingww/phantomjs that referenced this issue Dec 13, 2013
@yukinying
Copy link

It seems the problem of TabletProximityRec is already patched as https://github.com/ariya/phantomjs/blob/master/src/qt/src/gui/kernel/qt_cocoa_helpers_mac_p.h#L113 is now using Qt 4.8.5. However it looks like it is not in the stable release (1.9).

Are there any timeline for 1.10 to incorporate the new Qt?

@artkoshelev
Copy link

reproduces on my mac air in master branch, any workarounds?

@timbru31
Copy link

timbru31 commented Sep 8, 2014

Had the issue today, too.
OS X 10.10 and trying to upgrade to phantomjs-1.9.7_1 with Homebrew.

Any fixes / workarounds?

@jsmestad
Copy link

jsmestad commented Sep 8, 2014

also having this issue with 1.9.7_1 like @xGhostKillerx

==> ./build.sh --confirm --jobs 8 --qt-config -openssl-linked
g++ -headerpad_max_install_names -sectcreate __TEXT __info_plist Info.plist -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o ../bin/phantomjs MachIPC.o phantom.o callback.o webpage.o webserver.o main.o csconverter.o utils.o networkaccessmanager.o cookiejar.o filesystem.o system.o env.o terminal.o encoding.o config.o childprocess.o repl.o gif_err.o gifalloc.o egif_lib.o gif_hash.o quantize.o gifwriter.o mongoose.o linenoise.o utf8.o qcommandline.o minidump_file_writer.o convert_UTF.o md5.o string_conversion.o crash_generation_client.o exception_handler.o minidump_generator.o dynamic_images.o breakpad_nlist_64.o bootstrap_compat.o file_id.o macho_id.o macho_utilities.o macho_walker.o string_utilities.o moc_phantom.o moc_callback.o moc_webpage.o moc_webserver.o moc_networkaccessmanager.o moc_cookiejar.o moc_filesystem.o moc_system.o moc_env.o moc_config.o moc_childprocess.o moc_repl.o moc_qcommandline.o qrc_phantomjs.o qrc_ghostdriver.o qrc_WebKit.o qrc_InspectorBackendStub.o    -L/private/tmp/phantomjs-EDBaRM/phantomjs-1.9.7/src/qt/lib -L/private/tmp/phantomjs-EDBaRM/phantomjs-1.9.7/src/qt/plugins/codecs -lqcncodecs -L/private/tmp/phantomjs-EDBaRM/phantomjs-1.9.7/src/qt/lib -framework ApplicationServices -framework CoreFoundation -framework Security -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -framework Carbon -framework AppKit -framework SystemConfiguration -framework CoreServices -lQtGui -lQtNetwork -lssl -lcrypto -lQtCore -lz -lm
ld: library not found for -lQtWebKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../bin/phantomjs] Error 1
make: *** [sub-src-phantomjs-pro-make_default-ordered] Error 2

@vitallium
Copy link
Collaborator

Provide any build output please. It seems that QtWebkit failed to compile.

@artkoshelev
Copy link

here is my build output for 1.9 branch https://yadi.sk/i/yevi62brbJKh5

@timbru31
Copy link

timbru31 commented Sep 9, 2014

Here is mine, too

http://playground.dustpla.net/phantomjs/build.log

(also this is the same as Homebrew/legacy-homebrew#32179)

Edit: Maybe a qt issue with 10.10? See Homebrew/legacy-homebrew#29988

@zeglin
Copy link

zeglin commented Sep 11, 2014

I had this issue on Debian Wheezy yesterday. Compilation crashed with "cannot find -lQtWebKit". I solved it by installing glib / libgtk:

sudo apt-get install libgtk2.0-dev

and then run the build again:

./buildsh

Hope that helps!

@artkoshelev
Copy link

btw with system provided qtwebkit build is still failed:

./build.sh --confirm --qtwebkit=system
System architecture... (Darwin 13.3.0 x86_64)


Building main PhantomJS application...

Info: creating stash file /Users/artkoshelev/workspace/phantomjs/.qmake.stash
cd src/ && ( test -e Makefile.phantomjs || /usr/local/Cellar/qt5/5.3.1/bin/qmake /Users/artkoshelev/workspace/phantomjs/src/phantomjs.pro -o Makefile.phantomjs ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.phantomjs 
make[1]: *** No rule to make target `qt/mkspecs/macx-g++/qmake.conf', needed by `Makefile.phantomjs'.  Stop.
make: *** [sub-src-phantomjs-pro-make_first-ordered] Error 2

@ariya
Copy link
Owner Author

ariya commented Sep 21, 2014

PhantomJS 1.x will not build on Yosemite. I don't think we'll ever fix this (focusing on 2.x only for now).

@ariya ariya closed this as completed Sep 21, 2014
Repository owner locked and limited conversation to collaborators Sep 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests