ls 3.3 -- error compile php

#1
hi,

When i use the Compile PHP function in GUI admin to compile either PHP 4 or 5.

I get this error:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 24434 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
29 24434 29 7300 0 0 44323 0 --:--:-- --:--:-- --:--:-- 285k
100 24434 100 24434 0 0 133k 0 --:--:-- --:--:-- --:--:-- 627k
Forcing buildconf
using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.59 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
Running cvsclean for you.
To avoid this, install autoconf-2.13.
rebuilding configure
aclocal.m4:2141: PHP_PROG_LEX is expanded from...
rebuilding main/php_config.h.in
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader: [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.
aclocal.m4:2141: PHP_PROG_LEX is expanded from...
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
shtool:echo:Warning: unable to determine terminal sequence for bold mode
shtool:echo:Warning: unable to determine terminal sequence for bold mode
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
What can i do to make it work?
I have Plesk 8 installed.
 

mistwang

LiteSpeed Staff
#2
Looks like something wrong with your gcc.
Will you get the same result if you go to lsws/phpbuild/php-4.4.7, then run ./configure?
You may have to check config.log for the detail of the error.
 

mistwang

LiteSpeed Staff
#4
OK, I think I knew what is wrong.
The default PATH environment variable under LSWS was set to "/bin:/usr/bin", and other environment variables are cleared out. so "gcc" may fail under LSWS.
Where are gcc installed to? What is your PATH environment under shell?
 

gboudreau

Well-Known Member
#5
I got the same error. Looking in config.log, I saw this:

configure:2535: checking for C compiler default output file name
configure:2538: gcc conftest.c >&5
collect2: cannot find 'ld'
configure:2541: $? = 1
configure: failed program was:

Trying to find ld from a shell:
# which ld
/usr/bin/ld

Looks like ld is under /usr/bin, but the 'apache' user running LSWS can't see it..?
Where can I see the PATH that LSWS uses to compile PHP ?
(I can't login using that user on the shell... su apache - results in "This account is currently not available.")
 

mistwang

LiteSpeed Staff
#6
Please check if /usr/bin/ld is a real binary executable or a shell wrapper. Maybe 'ld' need something else to run.
Looks like we need to add an option to allow user to set custom environment variables.
 

gboudreau

Well-Known Member
#7
/usr/bin/ld is a real executable. (365,300b size; vi shows binary data starting with ..ELF...)

I tried to enable the apache account temporarily to try ld:

[root@myself /]# su apache -
bash-3.1$ which ld
/usr/bin/ld
bash-3.1$ ld
ld: no input files
bash-3.1$

and ./configure in lsws/phpbuild/php-5.2.5/ works fine with the apache user, even if I export PATH=/bin:/usr/bin prior to ./configure
 
Last edited:

mistwang

LiteSpeed Staff
#8
We found that "PATH" environment variable has not been set for admin_php, some system will add "PATH" environment automatically, some does not. So, it should be fixed in 3.3.1 release.
 
#9
We found that "PATH" environment variable has not been set for admin_php, some system will add "PATH" environment automatically, some does not. So, it should be fixed in 3.3.1 release.
So in the mean while. What is the solution for this?

Does that mean i need to compile PHP manualy?
 

felosi

Well-Known Member
#11
I know on the c compiler cannot create executable errors you are missing some libraries or compilers.
Install all the gcc, cpp, g++. libs and it should be able to compile
 

mistwang

LiteSpeed Staff
#13
You can download our 3.3.1 release package, the final package will be available soon.
For now, just change the version number in the download link.
 
Top