Going forward, what will happen in PhantomJS land:
[x] Use system-installed QtWebKit. Also part of the above pull request. Ideally of course this is using the latest QtWebKit (see annulen/webkit project from @annulen).
Compared to vanilla QtWebKit of Qt 5.x, this latest QtWebKit enables lots of new modern web platform features, check Comparison with QtWebKit 5.6 for more details.
[x] Remove build.py. It won't work anymore with the two above changes. Consequently, building PhantomJS will be similar to building any other Qt-based projects (qmake && make
).
We may need to supply a simple configure
script and a convenient make install
to make packaging easier for the distribution packagers (Debian/Ubuntu/Fedora/Nix/Homebrew/NuGet/etc). See qconf for details.
We need to ensure that the Linux version can still operate in pure headless mode (without X11).
Regression: it won't be possible to disable web security.
@annulen Is there any news on a distribution packager's willingness to make an official package of QtWebKit TP2 (or later releases)? How about Homebrew @MikeMcQuaid?
This becomes important as it will ensure that a future distribution-packaged PhantomJS does not deviate (get "crippled") regarding its feature sets. For instance, if a distribution contains a PhantomJS 2.5 release built using the outdated Qt 5.2 and its QtWebKit module, it will potentially confuse the users since it will not support all the latest web platform features.
Reference issue: https://github.com/annulen/webkit/issues/115
Any plan to port phantomjs to Qt Webengine , since now Qt WebKit will not see new features ?
@ariya I think it's even more important to ensure that crippled versions are not distributed at all, so users don't get confused and go straight to official release binaries.
@moimael Read the topic plz
@moimael Check this post. In all cases, feel free to start a separate discussion (this issue is focusing on our 2.5 effort).
@annulen Is there any news on a distribution packager's willingness to make an official package of QtWebKit TP2 (or later releases)? How about Homebrew @MikeMcQuaid?
@ariya We'll package it when it's a stable version but are open to having a PR open at any point.
This becomes important as it will ensure that a future distribution-packaged PhantomJS does not deviate (get "crippled") regarding its feature sets. For instance, if a distribution contains a PhantomJS 2.5 release built using the outdated Qt 5.2 and its QtWebKit module, it will potentially confuse the users since it will not support all the latest web platform features.
From a packagers perspective the best way around this would be to check for such things in your configure
/CMakeLists.txt
/qmake
and refuse to build if you're using an outdated version. Similarly, you could consider bumping PhantomJS' version when new Qt 5 releases come out with bumped requirements to note the minimum features that are required.
I don't think it's always possible to prevent a modified/tweaked/crippled version of PhantomJS: take a look at Debian package https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277.
Not having a bundled Qt/QtWebKit certainly will simplify the packager's life. That said, it won't help much if the available system Qt/QtWebKit is still outdated.
In Debian Stable you'll always have QtWebKit version, outdated by a couple of years
In other distros (except rolling-release ones) it may be slightly less outdated, but not much
https://blogs.gnome.org/mcatanzaro/2016/02/01/on-webkit-security-updates/
I don't think it's always possible to prevent a modified/tweaked/crippled version of PhantomJS: take a look at Debian package https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277.
Sure. Some package managers (i.e. Homebrew) frown on patching, though, so if you want to require a certain version of a dependency the best way to do that is to ensure you do so in your build system.
@annulen That package (https://packages.debian.org/sid/web/phantomjs) is intended for stretch. But you're right, in the near future it will be the _next_ Debian stable.
if you want to require a certain version of a dependency the best way to do that is to ensure you do so in your build system.
Solid advice! Thank you.
@ariya QtWebKit requires somewhat more work to be suitable for shipping in Stretch than just to be usable by PhantomJS, work is in progress
Why no support for printing footer and header ?
Why no support for printing footer and header ?
Please track #14461.
Quick question, given that build.py is removed now how do we build at the moment?
@samlinbris Check the description, i.e. "Consequently, building PhantomJS...".
@ariya Yeah, I've seen that bit. As I'm relatively new to this field I don't really know how qmake works. I've downloaded qmake and made it available on my mac. However, I'm not sure what's the next step after this. Surely it's not qmake deploy/build-and-package.sh
@samlinbris See if you can familiarize yourself with Qt and/or consult a Qt expert.
Hi, i just created a new pull request (https://github.com/ariya/phantomjs/pull/14505), i rearranged build.py and i'm able to build phantomjs with new webkit. With this approach it is not needed to install qt in the system.
Let me know
Thanks @matteoceraico, but we're not planning to go back to that route. The plan is to treat PhantomJS as a normal Qt application and building it with the system-installed Qt and QtWebKit.
I wouldn't recommend using "normal" Qt installation for static builds where you want to throw away everything unnecessary (from both Qt and WebKit), so you still need some kind of build recipe.
For example, testing environment of QtWebKit now uses jhbuild modules which build Qt, Qt's dependencies and WebKit dependencies in an automatic way, applying patches when necessary. You may want to use something like that instead of simple script.
we're not planning to go back to that route. The plan is to treat PhantomJS as a normal Qt application and building it with the system-installed Qt and QtWebKit.
@ariya If I understand correctly, once it will be done, it will be less maintenance for you to keep PhantomJS up to date with a modern QtWebKit right? (as it will use the system's one)
Hi @ariya - could you please explain "Regression: it won't be possible to disable web security."
What is it about the upcoming 2.5 release that would not allow for disabling web security? Would a work around be possible?
Thank you.
@samir-mahendra Don't worry. It will be possible.
Current ldd output:
linux-vdso.so.1 => (0x00007ffcebbba000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f73a8e78000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f73a8c18000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f73a89f0000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f73a8780000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f73a8338000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f73a8118000)
libicui18n.so.55 => /usr/lib/x86_64-linux-gnu/libicui18n.so.55 (0x00007f73a7cb0000)
libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f73a7918000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f73a7710000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f73a7508000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f73a72e8000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f73a6f28000)
libxslt.so.1 => /usr/lib/x86_64-linux-gnu/libxslt.so.1 (0x00007f73a6ce8000)
libhyphen.so.0 => /usr/lib/x86_64-linux-gnu/libhyphen.so.0 (0x00007f73a6ae0000)
libwebp.so.5 => /usr/lib/x86_64-linux-gnu/libwebp.so.5 (0x00007f73a6880000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f73a64f8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f73a61e8000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f73a5fd0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f73a5c00000)
/lib64/ld-linux-x86-64.so.2 (0x00005556fc041000)
libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f73a4148000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f73a3f20000)
/cc @ariya
Not that static, huh?
i love you so much bro
2.5.0 Beta announcement: https://groups.google.com/forum/#!topic/phantomjs/AefOuwkgBh0
2.5.0 download page here : https://bitbucket.org/ariya/phantomjs/downloads
Sure - but that only has the binaries of the v2.5 release for Linux and
macOS. The download repository link looks like a snapshot for some old
code. I am looking for the source code, not binaries.
Cheers,
-pete
On Fri, Jan 13, 2017 at 12:22 PM, Norbert de Langen <
[email protected]> wrote:
2.5.0 download page here : https://bitbucket.org/ariya/phantomjs/downloads
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ariya/phantomjs/issues/14458#issuecomment-272538508,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH-D0wHR4DXU3DRO6E2RmTaHkMByjlAnks5rR90bgaJpZM4Jew0u
.
--
pete wright
www.nycbug.org
@nomadlogicLA
@Vitallium Ah great, the new beta works fine for me on Windows, although it fails when running it on CentOS (Redhat based), as already discussed on the forum.
A few questions:
Hope to hear from you soon!
Thanks in advance and keep up the good work!
For future reference; i've moved to using Chrome in Docker (https://gist.github.com/addyosmani/5336747). At the moment it's not completely headless yet, but they're working on it (https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md).
I don't want to talk down PhantomJS, because it's great in its own purpose.
Unfortunately it doesn't keep up with the latest browser features and graphic rendering, making it less convenient to use in cases where exact rendering is needed (as it was in my case).
I'm still hoping PhantomJS 2.5 will be released as a stable version, because it still rocks in running unit tests that need some kind of DOM 👍
Is 2.5 development taking place in some public repository that we can download? Or could you maybe release 2.5beta for Ubuntu Yakkety?
Thanks!
@ktecho it seems that you can build 2.5 yourself.
For Ubuntu binaries you need to install some dependencies:
png
jpeg
webp
openssl
zlib
fontconfig and freetype
libicu
source: https://groups.google.com/forum/#!topic/phantomjs/AefOuwkgBh0
See comment above.
No. If you look at the next comment, it's me pointing out that 2.5 sources
are not to be found.
2017-04-11 18:12 GMT+02:00 Jon Ege Ronnenberg notifications@github.com:
@ktecho https://github.com/ktecho it seems that you can build 2.5
yourself.For Ubuntu binaries you need to install some dependencies:
png
jpeg
webp
openssl
zlib
fontconfig and freetype
libicu
source: https://groups.google.com/forum/#!topic/phantomjs/AefOuwkgBh0See comment <#m_-2266175595424881957_issuecomment-272538508> above.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ariya/phantomjs/issues/14458#issuecomment-293314115,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAhZYXlfybA7RwN5YZdfa06S6Uxg8xGYks5ru6ZhgaJpZM4Jew0u
.
@ktecho In the google groups announcement there is a link to https://github.com/ariya/phantomjs/issues/14835 which links to build instructions for 2.5: https://gist.github.com/Vitallium/f84664eb2d71a4dd91e7e5f1bd8c915e
I can only assume that the 2.5 source code is in the master branch of this repo.
Vitallium fork is up to date with this repo: https://github.com/ariya/phantomjs/compare/master...Vitallium:master
Yes, that's correct. The current master branch contains 2.5 version. But remember you need this QtWebKit version - https://github.com/annulen/webkit
Thanks Jon and Vitaly,
Couldn't find it when I give a look into it. Thanks a lot for pointing me
to the correct place with the solution.
It has been difficult to compile QT and start compiling qtwebkit. Lots of
libraries missing (just installed with apt) and lots of problems. The last
one which I couldn't resolve is this one:
[ 43%] Building CXX object
Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/texmap/TextureMapper.cpp.o
In file included from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WTF/wtf/StdLibExtras.h:32:0,
from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WTF/wtf/FastMalloc.h:26,
from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/config.h:75,
from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:20:
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
In member function ‘void
WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded()’:
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:549:78:
error: ‘dynamic_cast’ not permitted with -fno-rtti
*
ASSERT(dynamic_cast
*
^*
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WTF/wtf/Assertions.h:250:11:
note: in definition of macro ‘ASSERT’
Cheers,
Luis Miguel GarcĂa Mancebo
2017-04-11 18:31 GMT+02:00 Vitaly Slobodin notifications@github.com:
Yes, that's correct. Current master branch contains 2.5 version. But
remember you need this QtWebKit version - https://github.com/annulen/
webkit—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ariya/phantomjs/issues/14458#issuecomment-293319468,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAhZYcc16tmjMYtGe1ZFQgDr7zSGtVKdks5ru6rEgaJpZM4Jew0u
.
You are missing -DCMAKE_BUILD_TYPE=Release. (I think I should make it default, I didn't because someone told me it's a bad practice, btw WebKitGTK doesn't do it either)
Thanks a lot for your reply, Konstantin.
Unfortunately, it doesn't work even when your flag added. I'm compiling
with this line right now based on Vitaly's github:
./Tools/Scripts/build-webkit --qt --release --makeargs=-j2
--no-device-orientation --no-web-audio --no-video --no-video-track
--no-touch-events --no-touch-slider --no-geolocation --64-bit
--cmakeargs="-Wno-dev -DCMAKE_PREFIX_PATH=/home/ktecho/qtbase-build
-DQT_INSTALL_PREFIX=/home/ktecho/qtbase-build
-DQMAKE_EXECUTABLE=/home/ktecho/qtbase-build/bin/qmake
-DENABLE_NETSCAPE_PLUGIN_API=OFF -DUSE_GSTREAMER=OFF
-DUSE_THIN_ARCHIVES=OFF -DENABLE_API_TESTS=OFF -DENABLE_TEST_SUPPORT=OFFi
-DCMAKE_BUILD_TYPE=Release"
The problem is the same, I think:
[ 29%] Building CXX object
Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/texmap/TextureMapperBackingStore.cpp.o
In file included from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WTF/wtf/StdLibExtras.h:32:0,
from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WTF/wtf/FastMalloc.h:26,
from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/config.h:75,
from
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:20:
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
In member function ‘void
WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded()’:
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:549:78:
error: ‘dynamic_cast’ not permitted with -fno-rtti
ASSERT(dynamic_cast
^
/home/ktecho/webkit/webkit-qtwebkit-stable/Source/WTF/wtf/Assertions.h:250:11:
note: in definition of macro ‘ASSERT’
if (!(assertion)) { \
^~~~~
Source/WebCore/CMakeFiles/WebCore.dir/build.make:36888: fallo en las
instrucciones para el objetivo
'Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp.o'
Cheers,
Luis Miguel GarcĂa Mancebo
2017-04-13 10:48 GMT+02:00 Konstantin Tokarev notifications@github.com:
You are missing -DCMAKE_BUILD_TYPE=Release. (I think I should make it
default, I didn't because someone told me it's a bad practice, btw
WebKitGTK doesn't do it either)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ariya/phantomjs/issues/14458#issuecomment-293830707,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAhZYStSDMWdma3PiUbP8TloMoBOinR1ks5rveFjgaJpZM4Jew0u
.
ok, you have --release already so you don't need -DCMAKE_BUILD_TYPE=Release
-DQT_INSTALL_PREFIX and -DQMAKE_EXECUTABLE are not used
Please try building it from scratch after removing WebKitBuild directory
Hi Konstantin,
I added that -DQT_INSTALL_PREFIX and -DQMAKE_EXECUTABLE because it didn't
work with the default QT from Ubuntu, so I compiled QT5.8 just before
compiling webkit. The -DQMAKE_EXECUTABLE is needed because Ubuntu Yakkety
doesn't have qt5-qmake (or was it qmake-qt5?).
EDIT: I just re-downloaded the webkit from your github repo and now it
works with the "Configure and build WebKit" line from Vitaly's github. It
seems you changed something two days ago, but I don't know if it's because
of that. It's compiling again right now. Will report back in hours as this
is a very slow test machine.
Thanks,
Luis Miguel GarcĂa Mancebo
2017-04-13 12:04 GMT+02:00 Konstantin Tokarev notifications@github.com:
ok, you have --release already so you don't need -DCMAKE_BUILD_TYPE=Release
-DQT_INSTALL_PREFIX and -DQMAKE_EXECUTABLE are not used
Please try building it from scratch after removing WebKitBuild directory
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ariya/phantomjs/issues/14458#issuecomment-293847540,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAhZYaB1C8XWKqad6qtk1OnyNrEvyKfGks5rvfMvgaJpZM4Jew0u
.
Wow... compiling QT in Ubuntu is a mess. Just a few things to help others with some problems I found:
1- In QT 5.8 -no-gtkstyle
is no longer supported: ERROR: Unknown command line option -no-gtkstyle
.
2- Using -fontconfig -system-freetype
don't find the libraries in Ubuntu Yakkety even when they're installed. I just removed both modifiers.
3- Compilation fails with a wayland related problem, even when I specified -skip wayland
modifier:
/usr/bin/ld.gold: error: cannot find -lqwayland-generic
4- It doesn't honor -nomake tools
modifier, because my compile is failing trying to compile qttools:
make[3]: Entering directory '/home/ktecho/qt-everywhere-opensource-src-5.8.0/qttools/src/qtdiag'
linking ../../bin/qtdiag
/usr/bin/ld.gold: error: cannot find -lqwayland-generic
collect2: error: ld returned 1 exit status
Makefile:83: recipe for target '../../bin/qtdiag' failed
make[3]: *** [../../bin/qtdiag] Error 1
It seems like it's a known problem since Jan/13: https://bugreports.qt.io/browse/QTBUG-28909
In my very-slow test server (same Ubuntu Yakketi), QT5.8 has compiled ok (Âż?), but compiling qtwebkit is taking ages. Will report back.
You can use official Qt 5.8.0 binaries and Linux binaries of QtWebKit from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp5
@annulen Thanks a lot for the help. The process is a bit harsh for someone who has never made anything with QT.
For anyone using Ubuntu Yakketi, a version not supported by 2.5beta binaries provided by Vitaly, the best option is to download @nkovacs static binary from here, that works fine: https://github.com/nkovacs/selenium-standalone-phantomjs/tree/11420aaf2174428b56086673232365c820f98a42
Hi @ariya are there plans to continue with phantomjs after @Vitallium has stepped down?
Or is it really dead in the water now?
Headless chrome seems to use a lot more CPU resources, so want to stick with phantomjs for now.
I have been doing some work on a fix to phantomjs 2.1.1 but not sure if it's worth me making a pull request.
hi. Where is the 2.5.0 version of the code.
@344389541 It's in master.
When are you gonna release the 2.5.0 version?
@victorhazbun @Vitallium is releasing the 2.5 beta v2 this weekend. :)
@Vitallium I know you've relased beta 2 for windows. Do you know when we can get the updated beta binaries for linux please?
Can somebody please tell me how I can get source code for PhantomJS 2.5? The comments above say that it's there in the master, so is there any specific tag associated with it? I was expecting it to be v2.5 etc., but I am not sure. I want to evaluate 2.5 code along with system installed Qt. Any definitive help in this regard is much appreciated! Thanks.
2.5 is not out yet. The latest is 2.5beta2. If you want the master branch, click the green "Clone or download" on https://github.com/ariya/phantomjs and choose ZIP. There is apparently no tag.
Correct! We tag release after it has been published.
Thank you very much! I have cloned the master locally. Am I correct in
assuming that build procedure is exactly the same as v2.1? Or are there any
differences?
Best regards,
Atul.
On Tue, Jul 25, 2017 at 8:26 PM, Vitaly Slobodin notifications@github.com
wrote:
Correct! We tag release after it has been published.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ariya/phantomjs/issues/14458#issuecomment-317764376,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK9wbzttWke8Ry8z60fygBdkwS-y4u-qks5sRgI6gaJpZM4Jew0u
.
@sowani Almost. First of all you need to build new QtWebKit - https://github.com/annulen/webkit/wiki
After that, you can build PJS as usual.
Any news about the header/footer "issue" in the coming release? Will it be possible to print headers and footers in PDF documents? :)
@clarkk Feature would be welcome in QtWebKit if someone prepared a pull request to https://github.com/annulen/webkit with all necessary parts from PhantomJS' fork
Medium.com has declared this project dead...
(not that anyone with any sense of software quality or stability uses Chrome for anything)
then again most posts on medium.com are from developers with framework fad attention spans of a can of coke... causing their company to rebuild all their apps every three months to support the latest fad and remove last years fad that is no longer maintained, and for zero net benefit. #sodumb
@dawesi
Medium.com has declared this project dead
Someone on their Medium.com page has declared this project dead...
Otherwise, Facebook.com, Twitter.com, etc declare a lot of things :P
@tuxayo Good to hear your comment! So does that imply that phantomjs has a new maintainer and a defined roadmap?
Any plan for version > 2.1.1 is effectively abandoned. Please see #15344 for more details.
Most helpful comment
2.5.0 Beta announcement: https://groups.google.com/forum/#!topic/phantomjs/AefOuwkgBh0