« Very Suspicious Internet Robots | Home | Building .deb packages on Ubuntu/Debian »
Install Roadsend PHP Compiler on Ubuntu – without compiling anything!
By admin | July 24, 2008
Update (2010-07-21): Due to vast interest in getting the packages to work, we have released a updated version of the Roadsend PHP compiler.
Update (2008-09-06): The binary packages are not AMD64 compatible (thanks to Tom in the comments). You may wish to compile your own packages following the instructions in this article. The binaries are compatible with x86/i386/i686/x86_64 only.
Roadsend PHP is an actively developed PHP compiler. Unfortunately, it is not available for the extremely popular Ubuntu Linux. This post will help you install Roadsend PHP on your Ubuntu Linux machine in 5 easy steps.
- If you have the repository (in other words, from synaptic) version of Bigloo and any roadsend packages installed, remove them now.
- Install the unofficial Bigloo and Roadsend PHP compiler packages: (install unofficial bigloo first)
- bigloo-compdigitec-unoffical.deb – 13.0M
- pcc-compdigitec-unoffical.deb – 4.1M
- If you are setting up Roadsend PHP per-user, add this line to each user’s “~/.profile”. To set Roadsend PHP up system-wide, add it to “/etc/profile”.
export LD_LIBRARY_PATH=/usr/local/lib
- You’re almost done! Compile a test program to test it:
<?php
Save it in index.php . Then compile it and run it:
echo "Hello World! - This is the Roadsend PHP test program.\n";
?>
pcc index.php
./indexYou should get this output: “Hello World! – This is the Roadsend PHP test program.”. If you get this error instead “./index: error while loading shared libraries: libphp-runtime_u-3.0c.so: cannot open shared object file: No such file or directory”, it means that you have not yet set LD_LIBRARY_PATH as in Step 3. Set it manually by executing:
export LD_LIBRARY_PATH=/usr/local/lib - To test the MicroServer backend, compile with the following command:
pcc -s testprog --port 54321 index.php
To avoid another fatal error, copy the PHP core runtime with the following command:
cp /usr/local/lib/libphp-runtime_u-3.0c.so ./
./index
Then browse to http://127.0.0.1:54321/ and you should see “”Hello World! – This is the Roadsend PHP test program.”
If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!
Topics: Linux, PHP | 17 Comments »
September 5th, 2008 at 14:38
I get a config file error trying to compile a test program. Do you have a forum for help?
>>> Config file /y/usr/etc/pcc.conf not found.
Error: problem running command ‘bigloo’, exit status 1
Thanks.
September 5th, 2008 at 14:54
@Tom: Yes, we do. See http://www.compdigitec.com/forums/ for free support.
By the way, I think that your error is caused by you not installing bigloo-compdigitec-unoffical, because the error suggests that Bigloo 3.0c is not installed.
September 5th, 2008 at 14:58
Apparently this is not amd64 compatible installation?
Seems it’s baring on library something.
September 5th, 2008 at 15:08
Confirmed, it’s not amd64 compatible. I’ll compile an amd64 version when I get more time. The compile needs things like bigloo that aren’t in the current Lenny repository.
September 11th, 2008 at 04:24
I’m having problems installing. Firstly – double clicked on the packages and they said they werent valid Archives.
Now trying sudo -i dkpg or whatever it is and its asking for a password?
TIA
A
September 11th, 2008 at 19:20
@Antony: Try using “sudo dpkg –install the_file.deb”.
January 31st, 2009 at 21:50
Decided to play around with these as compiling myself was proving more arduous than i had the patience for… but when I try to compile the test it can’t find “libphp-u_gtk3.0c.so”
November 14th, 2009 at 16:54
FYI I had the same error as Tom:
>>> Config file /y/usr/etc/pcc.conf not found.
Error: problem running command ‘bigloo’, exit status 1
I had added export LD_LIBRARY_PATH=/usr/local/lib to the profile, but I think it might require you to log out & back in – I didn’t do this as I have lots open, but you can just type the same command into the terminal and it works fine:
export LD_LIBRARY_PATH=/usr/local/lib
January 10th, 2010 at 10:04
I got the ‘/y/usr/etc/pcc.conf not found’ error too.
Without really working out what Roadsend is doing, this seems to be due to assumptions about the location of standard directories that aren’t true in my case (Ubuntu 9.04). It’s nothing to do with LD_LIBRARY_PATH not being set.
First, /y is a symlink to /, so /y/usr/etc/pcc.conf is the same file as /usr/etc/pcc.conf. Or it would be if it existed. It’s actually installed to /usr/local/etc/pcc.conf
To fix this, create the dir and symlink to the file:
cd /usr
sudo mkdir etc
cd etc
sudo ln -s /usr/local/etc/pcc.conf pcc.conf
This will make pcc.conf visible to the program.
Then the next error shows up: it can’t find libphp-u_gtk3.0c.so. In my Ubuntu 9.04, it and other libraries are in /usr/local/lib.
To fix this we must edit pcc.conf
sudo gedit /usr/local/etc/pcc.conf
in pcc.conf, under the line
(library “./” “/y/usr/lib”)
add these lines
;ADDED because that’s where libphp and other libraries are
(library “./” “/usr/local/lib/”)
The next error I got was because I don’t have php-gtk installed. You may already have it, or want to install it, but I simply removed ‘ php-gtk’ from the two lines which contain it. Recommend you save the old line versions to comments in case you need them and forget what you did.
This has got me to the ‘hello world’ stage. I’ll report on further issues as they come up.
June 2nd, 2010 at 22:28
hoangquan@ubuntu:/var/www$ pcc -h
Warning: /y/usr/etc/pcc.conf: Specified directory does not exist: “./” in unknown on line 0
Warning: /y/usr/etc/pcc.conf: Specified directory does not exist: “/usr/local/lib/” in unknown on line 0
Anybody help me, please?
Thanks all. I very like this topic.
July 25th, 2011 at 05:22
[…] Install Roadsend PHP Compiler on Ubuntu – without compiling anything! at Compdigitec Labs […]
January 23rd, 2013 at 21:20
como se compila con pcc librerias de snmp,net-snmp, php-snmp
August 2nd, 2024 at 20:04
… [Trackback]
[…] There you will find 28572 more Info on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]
August 13th, 2024 at 21:50
… [Trackback]
[…] Here you can find 37038 more Information on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]
August 23rd, 2024 at 21:22
… [Trackback]
[…] Read More on on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]
August 26th, 2024 at 19:24
… [Trackback]
[…] Here you can find 74244 additional Information on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]
September 28th, 2024 at 04:06
… [Trackback]
[…] Read More on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]