Compdigitec Labs

« 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 (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.”

We hope this guide was very useful. If you did find it useful, please tell all your friends about it and spread the word!

Topics: Linux, PHP |

6 Responses to “Install Roadsend PHP Compiler on Ubuntu - without compiling anything!”

  1. Tom Says:
    September 5th, 2008 at 2:38 pm

    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 2:54 pm

    @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 2:58 pm

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

  4. Tom Says:
    September 5th, 2008 at 3:08 pm

    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 4:24 am

    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 7:20 pm

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

Comments