GhostDriver into PhantomJS: it's finally ready!

1,008 views
Skip to first unread message

Ivan De Marino

unread,
Nov 18, 2012, 7:12:00 PM11/18/12
to phan...@googlegroups.com
https://twitter.com/detronizator/status/270316928873156608

I haven't prepared a Pull Request just yet for few reasons:
- I'd love to have people build it and try it out
- I have few bits of work to finish on GhostDriver before I can tag it 1.0

The last point brings me to a question for Ariya: when is next release planned?

Ariya Hidayat

unread,
Nov 18, 2012, 7:15:16 PM11/18/12
to phan...@googlegroups.com
Excellent work! And of course it'll bring a lot of good news :)

As for the next release: http://phantomjs.org/release-1.8.html is
already prepared as a stub.




--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat

Ivan De Marino

unread,
Nov 18, 2012, 7:22:01 PM11/18/12
to phan...@googlegroups.com
21st of Dec.
I think I can do it.

And, as I said, testing would be invaluable help ;)



--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.





--
Ivan De Marino
Coder, Technologist, Cook, Italian

blog.ivandemarino.me | www.linkedin.com/in/ivandemarino | twitter.com/detronizator

Alex Anderson

unread,
Nov 19, 2012, 4:07:25 AM11/19/12
to phan...@googlegroups.com
Hi Ivan, great news!

To build, is it simply the following?

git clone git://github.com/detro/phantomjs.git && cd phantomjs &&
git checkout ghostdriver-dev && ./build.sh

Then check in deploy/ for the binary?

I've built this before, but have a new machine. Really sorry if this
is a dumb question, but I'm getting the following error:

./build.sh: line 90: src/qt/bin/qmake: No such file or directory

However:

$ ls -al src/qt/bin/qmake
-rwxrwxr-x 1 user user 12670083 Nov 19 11:31 src/qt/bin/qmake

This is an executable file. When run from the root directory, there
is no output, but when run from src/qt/bin it has output:

~/workspaces/ghostdriver/phantomjs$ src/qt/bin/qmake
~/workspaces/ghostdriver/phantomjs$ cd src/qt/bin/
~/workspaces/ghostdriver/phantomjs/src/qt/bin$ qmake
The program 'qmake' is currently not installed. You can install it
by typing:
sudo apt-get install qt4-qmake
~/workspaces/ghostdriver/phantomjs/src/qt/bin$ ./qmake
Usage: ./qmake [mode] [options] [files]
...more helpful output...

Running on Xubuntu 12.10 64-bit.

Thanks for any help,

ALex

Ivan De Marino

unread,
Nov 20, 2012, 5:17:10 AM11/20/12
to phan...@googlegroups.com
Yes, you should compile it in the exact same way you compile phantomjs/master by Ariya.

Try to checkout the code, reset to HEAD and do `git clean -xdf`. This will delete everything is NOT part of the git repo.
After that, `./build.sh` again.

Ivan

Alex Anderson

unread,
Nov 20, 2012, 7:59:41 AM11/20/12
to phan...@googlegroups.com
On 20 November 2012 13:17, Ivan De Marino <detron...@gmail.com> wrote:
> Yes, you should compile it in the exact same way you compile
> phantomjs/master by Ariya.
>
> Try to checkout the code, reset to HEAD and do `git clean -xdf`. This will
> delete everything is NOT part of the git repo.
> After that, `./build.sh` again.

No luck :-(

...snip...
In file included from ../../include/QtGui/private/qfontengine_ft_p.h:1:0,
from painting/qtextureglyphcache.cpp:48:
../../include/QtGui/private/../../../src/gui/text/qfontengine_ft_p.h:58:22:
fatal error: ft2build.h: No such file or directory
compilation terminated.
make[1]: *** [.obj/release-static/qtextureglyphcache.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory
`/home/user/workspaces/ghostdriver/phantomjs/src/qt/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2
./build.sh: line 90: src/qt/bin/qmake: No such file or directory
user@florin:~/workspaces/ghostdriver/phantomjs$ ls -al src/qt/bin/qmake
-rwxrwxr-x 1 user user 12670083 Nov 20 15:53 src/qt/bin/qmake
user@florin:~/workspaces/ghostdriver/phantomjs$

Ivan De Marino

unread,
Nov 20, 2012, 8:52:12 AM11/20/12
to phan...@googlegroups.com
Very weird.
There might be something weird in your setup.
Ubuntu-based distro should be all fine...


--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.


Alex Anderson

unread,
Nov 20, 2012, 9:18:22 AM11/20/12
to phan...@googlegroups.com
On 20 November 2012 16:52, Ivan De Marino <detron...@gmail.com> wrote:
> Very weird.
> There might be something weird in your setup.
> Ubuntu-based distro should be all fine...

Not sure what it could be - I don't have qmake installed or an alias set up:

$ qmake
The program 'qmake' is currently not installed. You can install it
by typing:
sudo apt-get install qt4-qmake

Should I install it separately and remove the one from phantomjs repo?

Alex Anderson

unread,
Nov 20, 2012, 9:31:07 AM11/20/12
to phan...@googlegroups.com
On 20 November 2012 17:18, Alex Anderson
<alexanderande...@gmail.com> wrote:
> On 20 November 2012 16:52, Ivan De Marino <detron...@gmail.com> wrote:
>> Very weird.
>> There might be something weird in your setup.
>> Ubuntu-based distro should be all fine...

Sorry for stupid questions. Obviously something is failing earlier -
added a call to `pwd` before `qmake ...` and get:

/home/user/workspaces/ghostdriver/phantomjs/src/qt
./build.sh: line 91: src/qt/bin/qmake: No such file or directory

Will investigate further.

Alex Anderson

unread,
Nov 20, 2012, 9:36:14 AM11/20/12
to phan...@googlegroups.com
On 20 November 2012 17:31, Alex Anderson
Could it be something to do with this? I've not knowlingly done
anything to the fonts directory, or any other - should be a clean
checkout.

user@florin:~/workspaces/ghostdriver/phantomjs$ ls
/home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts
ls: cannot access
/home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts: Too many
levels of symbolic links
user@florin:~/workspaces/ghostdriver/phantomjs$ ls -al
/home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts
lrwxrwxrwx 1 user user 60 Nov 20 15:53
/home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts ->
/home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts
user@florin:~/workspaces/ghostdriver/phantomjs$

Will delete project dir and checkout fresh.

Alex Anderson

unread,
Nov 20, 2012, 10:45:53 AM11/20/12
to phan...@googlegroups.com
> Could it be something to do with this? I've not knowlingly done
> anything to the fonts directory, or any other - should be a clean
> checkout.
>
> user@florin:~/workspaces/ghostdriver/phantomjs$ ls
> /home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts
> ls: cannot access
> /home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts: Too many
> levels of symbolic links
> user@florin:~/workspaces/ghostdriver/phantomjs$ ls -al
> /home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts
> lrwxrwxrwx 1 user user 60 Nov 20 15:53
> /home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts ->
> /home/user/workspaces/ghostdriver/phantomjs/src/qt/lib/fonts
> user@florin:~/workspaces/ghostdriver/phantomjs$
>
> Will delete project dir and checkout fresh.

Still happens; any suggestions?

Ariya Hidayat

unread,
Nov 20, 2012, 11:42:14 AM11/20/12
to phan...@googlegroups.com
> ...snip...
> In file included from ../../include/QtGui/private/qfontengine_ft_p.h:1:0,
> from painting/qtextureglyphcache.cpp:48:
> ../../include/QtGui/private/../../../src/gui/text/qfontengine_ft_p.h:58:22:
> fatal error: ft2build.h: No such file or directory

Do you have FreeType2 properly installed?

Just to confirm, ensure all the dependent packages are available, see
http://phantomjs.org/build.html. The exact package names may vary
(different distributions and versions).

Alex Anderson

unread,
Nov 21, 2012, 9:46:01 AM11/21/12
to phan...@googlegroups.com
On 20 November 2012 19:42, Ariya Hidayat <ariya....@gmail.com> wrote:
>> ...snip...
>> In file included from ../../include/QtGui/private/qfontengine_ft_p.h:1:0,
>> from painting/qtextureglyphcache.cpp:48:
>> ../../include/QtGui/private/../../../src/gui/text/qfontengine_ft_p.h:58:22:
>> fatal error: ft2build.h: No such file or directory
>
> Do you have FreeType2 properly installed?
>
> Just to confirm, ensure all the dependent packages are available, see
> http://phantomjs.org/build.html. The exact package names may vary
> (different distributions and versions).

Thanks, works a treat! Here's to reading the manual :-) (and sorry
for wasting peoples time)

I have another newly installed xubuntu machine; would it be helpful if
I tried to make this "fatal error" actually terminate the build
process?

templaries

unread,
Nov 22, 2012, 3:59:04 AM11/22/12
to phan...@googlegroups.com
Congratulations. 

I have used the driver with success, it is working perfect against complex ajax web page. A awesome works.

So, i have a problem, i do not know to close de driver well. I close the driver object (close()), but a instance of phantomjs still is alive (phantomjs.exe windows).

King Regards.

Ivan De Marino

unread,
Nov 22, 2012, 6:52:39 AM11/22/12
to phan...@googlegroups.com
that might be an issue to fix ;)

Can you create an issue report on the GhostDriver github issue tracker?


--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
 
 

Jim Evans

unread,
Nov 22, 2012, 7:29:50 AM11/22/12
to phan...@googlegroups.com
Try driver.quit() instead. That's the preferred method for closing all resources associated with a driver, including the browser executable.

Lukáš Fryč

unread,
Nov 27, 2012, 11:15:36 AM11/27/12
to phan...@googlegroups.com
Hey Ivan,

congrats for huge achievement!

You might be interested in relevant discussion re: distribution of PhantomJS and GhostDriver Java bindings in Maven repositories to make it as much as accessible to Java users:

Cheers,

~ Lukas

Dne pondělí, 19. listopadu 2012 1:12:01 UTC+1 Ivan De Marino napsal(a):

Juhani Keskinarkaus

unread,
Jan 9, 2016, 11:29:31 AM1/9/16
to phantomjs
For me, the `src/qt/bin/qmake: No such file or directory ` was resolved as follows:
    
Reply all
Reply to author
Forward
0 new messages