Compdigitec Labs

« | Home | »

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.

  1. If you have the repository (in other words, from synaptic) version of Bigloo and any roadsend packages installed, remove them now.
  2. Install the unofficial Bigloo and Roadsend PHP compiler packages: (install unofficial bigloo first)
  3. 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
  4. You’re almost done! Compile a test program to test it:<?php
    echo "Hello World! - This is the Roadsend PHP test program.\n";
    ?>
    Save it in index.php . Then compile it and run it:
    pcc index.php
    ./index

    You 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

  5. 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 | 25 Comments »

25 Responses to “Install Roadsend PHP Compiler on Ubuntu – without compiling anything!”

  1. Tom Says:
    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.

  2. admin Says:
    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.

  3. Tom Says:
    September 5th, 2008 at 14:58

    Apparently this is not amd64 compatible installation?
    Seems it’s baring on library something.

  4. Tom Says:
    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.

  5. Antony Says:
    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

  6. admin Says:
    September 11th, 2008 at 19:20

    @Antony: Try using “sudo dpkg –install the_file.deb”.

  7. Justin Says:
    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”

  8. James Says:
    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

  9. Adrian Says:
    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.

  10. Quan Bui Says:
    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.

  11. FootPrints Says:
    July 25th, 2011 at 05:22

    […] Install Roadsend PHP Compiler on Ubuntu – without compiling anything! at Compdigitec Labs […]

  12. maxim Says:
    January 23rd, 2013 at 21:20

    como se compila con pcc librerias de snmp,net-snmp, php-snmp

  13. concur solutions api Says:
    April 14th, 2022 at 21:10

    … [Trackback]

    […] Find More on on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  14. สล็อตวอเลท ไม่มีขั้นต่ำ Says:
    May 8th, 2022 at 18:45

    … [Trackback]

    […] Info on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  15. cc dumps Says:
    May 22nd, 2022 at 16:02

    … [Trackback]

    […] Info to that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  16. เว็บบาคาร่า Says:
    June 24th, 2022 at 18:19

    … [Trackback]

    […] There you can find 19427 additional Information on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  17. ASC AR 15 5.56 30rd Mag Aluminum Black Says:
    July 5th, 2022 at 03:10

    … [Trackback]

    […] Read More here on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  18. s&w model 327 Says:
    July 22nd, 2022 at 13:53

    … [Trackback]

    […] Find More on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  19. sbobet Says:
    August 13th, 2022 at 04:17

    … [Trackback]

    […] Here you will find 55779 additional Info to that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  20. สล็อตวอเลท ไม่มีขั้นต่ำ Says:
    August 16th, 2022 at 18:29

    … [Trackback]

    […] Here you can find 59478 more Info to that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  21. dumps carding Says:
    September 6th, 2022 at 12:01

    … [Trackback]

    […] Find More Information here to that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  22. เงินด่วน Says:
    October 30th, 2022 at 02:59

    … [Trackback]

    […] There you will find 18441 additional Info on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  23. baixar Says:
    November 25th, 2022 at 08:33

    … [Trackback]

    […] Find More on to that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  24. อ่านมังงะ Says:
    November 27th, 2022 at 00:12

    … [Trackback]

    […] Find More on that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

  25. sbobet Says:
    November 28th, 2022 at 23:31

    … [Trackback]

    […] Read More Information here to that Topic: compdigitec.com/labs/2008/07/24/install-roadsend-php-compiler-on-ubuntu-without-compiling-anything/ […]

Comments