productsreSupportforums
    Home >> Products >> Compiler >> FAQ
search the manual for     in the  


Roadsend Compiler: FAQ

Is the Roadsend PHP completely free?

Yes, Roadsend PHP is available under the terms of the GNU General Public License (GPL), and the runtime libraries are available under the GNU Lesser General Public License (LGPL). This means you can use it for both open source and commercial projects. Your compiled programs do NOT have to be released under the GPL.


What are the system requirements for the Roadsend Compiler?

Roadsend PHP runs on Linux, FreeBSD, Mac OS X and Microsoft Windows. On Unix-like systems (FreeBSD, Linux, OSX) you will need at least the GNU C compiler (gcc) and linker (ld) installed on your system. On Windows, the installer includes all necessary development files to create graphical (GTK), console, and web applications.

Optionally, you can install the libraries needed for the various extensions: libpcre for the PCRE extension, libxml2 for the XML extension and libmysqlclient for the MySQL extension.

If you wish to run compiled web applications (on Unix or Windows), you will need a web server that supports FastCGI such as Apache, Microsoft IIS or lighthttpd


Is there a native 64 bit version of the Roadsend Compiler?

Since version 2.9.x, Roadsend PHP can compile natively on amd64.


Does Roadsend Compiler for PHP support PHP 5?

Yes, since version 2.9.3, Roadsend PHP is compatible with PHP 5.2.x (ZendEngine 2.x).


Do I need Zend PHP to run the compiled applications?
How is Roadsend PHP related to Zend?

Applications compiled with the Roadsend Compiler do not require Zend or any other interpreter to execute. Roadsend is not affiliated with Zend or the PHP Group and does not share (nor is it derived from) the same code base as their PHP implementation. Roadsend PHP is an entirely new implementation of PHP that is syntactically and semantically compatible with PHP Group's PHP 5.2.x and the Zend Engine 2.


How do I know that my application won't be decompiled back to the PHP source file?

The compiling of a PHP application with the Roadsend Compiler is much the same as compiling a C file to binary format. The program goes through a process that converts the plain text source into a binary format that is suitable for the processor to execute, and which is extremely hard to decompile back to any sort of high level programming language.


Can I compile PHP-GTK programs?

PHP-GTK 2 extension is under development.


Can I compile a web application that runs offline, without a web server installed?

Yes. We call this type of project a "MicroServer Project", because your application will be compiled with an embedded web server. This means you can compile the same code you use online into an EXE file thst can run on a client's computer without being online.

When the binary is run, a web server is automatically started. The client points their web browser to their local system where they can interact with the application as if it were online.


Will the Roadsend Compiler for PHP improve runtime speed?

In general, yes. The compiler generates binary code that is executed directly by the CPU, avoiding the intermediate process of compiling to byte-code and running in a virtual machine. The compilation and optimization stages happen only once.


Do I have to compile my code to test it?

No. The Roadsend Compiler lets you interpret your code directly, without compiling it first. You can even interpret PHP code that uses compiled libraries.


What is the difference between a native compiler and a byte-code compiler?

A native compiler, like the Roadsend Compiler, translates source code into a sequence of binary digits representing instructions which will be directly executed by the CPU. A byte-code compiler, however, translates source code into a sequence of bytes representing instructions which will be executed by what is known as a "virtual machine", a program which translates byte-code instructions to machine instructions and then executes those machine instructions on the actual CPU. The advantage of compiling to byte-codes is that you only need to port the byte-code interpreter (the virtual machine) in order to support a new platform instead of an interpreter/compiler for the source language, which is much more complex. The disadvantage is that, since this translation from byte-code instructions to machine instructions needs to happen every time you run the program, byte-code compilation is inherently slower than native compilation.


Will the program/library/web application I compiled on Windows work on Linux, and vice versa?

The compiler does not currently "cross compile" - the Windows version will make Windows only binaries, and the Linux will make Linux only binaries. This is because the compiler generates native machine code for the platform it's on and not intermediary byte code.

We may offer a cross-compile feature in future releases.


How do compiled web applications work?

Roadsend PHP generates FastCGI enabled web application binaries. FastCGI is an extension to the industry standard Common Gateway Interface (CGI) that was developed as a superior solution for interfacing web servers to high performance applications. FastCGI binaries can be run on Windows and Unix, in all of the major Web Servers including Apache and Microsoft IIS.


When I try to compile I get the message "/usr/bin/ld: cannot find -lmysqlclient"

This means you're compiling with the MySQL extension enabled, but the library could not be found. First, make sure you have MySQL installed. Second, find out where the "libmysqlclient.so" library resides. If it's not in a standard location (like /usr/local/lib) you will have to add the path to the "library" section of /etc/pcc.conf.

For example, on FreeBSD the default location for the MySQL client library is in /usr/local/lib/mysql. This path needs to be added to /etc/pcc.conf, like this:

(library "./" "/usr/local/lib/mysql/")



  Login     Home     Forums     Contact Us     Sign Up  

Copyright © 2010 Roadsend, Inc.