[ubuntu-za] php compiler

Morgan Collett morgan at ubuntu.com
Mon Mar 23 13:22:24 GMT 2009


2009/3/23 Charl Wentzel <charl.wentzel at vodamail.co.za>:
> Hi Guys
>
> I've downloaded and compiled the Roadsend PHP compiler mentioned in my
> previous post.  Still getting to know it, but it seems to be a great system.
>
> However, I have one problem which affects its operation, but I'm sure
> there's a general fix for it.  RoadSend installed its main executables in
> /usr/local/bin and a few libraries in /usr/local/lib.  However when I run
> the Roadsend compiler it complains about not finding the libraries which are
> located in the /usr/local/lib directory.
>
> To get it to run I have to first execute: "export
> LD_LIBRARY_PATH=/usr/local/lib", after which the compiler works.
> Unfortunately this only applies to the open terminal window.  When I open a
> new terminal I have to do it again.
>
> The "LD_LIBRARY_PATH" variable (and "ld" for that sake) is not specific to
> Roadsend? In fact "/usr/local/lib" is also a common directory for libraries.
> It is also specified in /etc/ld.so.conf.d/libc.conf file.  Admittedly, I
> don't know too much about how ld (and shared libraries) work.
>
> Could there be a general fix for this?

Not sure if it's the best fix, but you can put "export
LD_LIBRARY_PATH=/usr/local/lib" into your .bashrc, and then it will be
set for every terminal.

You might want to make it "export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" in case something
else is already setting it - this would just add /usr/local/lib to the
existing value.

AFAIK the default search paths for ld are /lib and /usr/lib, which is
where Ubuntu packages would put their libraries. A clean Ubuntu
install has nothing in /usr/local/lib - it is for anything you're
building from source, using it isn't automatic, to prevent conflicts.
You therefore need to specify it explicitly.

HTH
Morgan



More information about the ubuntu-za mailing list