Operating System - HP-UX
1823062 Members
3348 Online
109645 Solutions
New Discussion юеВ

problems when configuring php-4.1.2 on HP-UX11.11

 
yue
Occasional Advisor

problems when configuring php-4.1.2 on HP-UX11.11

Hi,i meet a headache while configuring php-4.1.2 on HP-UX11.11,errors are as follows:
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for bison... no
checking for byacc... no
configure: warning: You will need bison if you want to regenerate the PHP parser
s.
checking for gcc... no
checking for cc... cc
checking whether the C compiler (cc ) works... yes
checking whether the C compiler (cc ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cc accepts -g... no
checking how to run the C preprocessor... cc -E
checking for AIX... no
checking for cc option to accept ANSI C... no
checking for ranlib... ranlib
checking whether cc understands -c and -o together... yes
checking whether ln -s works... yes
checking for flex... lex
checking for yywrap in -ll... yes
checking lex output file root... ./configure[2584]: lex: not found.
configure: error: cannot find output from lex; giving up


I used the command: "./configure --prefix=/usr/php --with-apache=ApacheSourcePath"

system environment are HP-UX11.11,apache included in HP-UX11.11,php-4.1.2.tar.gz.

The ApacheSourcePath is a path of downloaded source package.

Anyone can help me?

Any help will be appreciated !
21 REPLIES 21
Karvendhan M
Frequent Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Better to have all the gnu tools installed first. Including bison, gawk, flex, automake, autoconf and gcc.

But you will find this link helpful.

http://www.hp.com/products1/unix/webservers/apache/index.html


HP has added quite a few things and we get an ready to run software.

If your requirements are different, I will always suggest you to have all the GNU tools and LIBs installed in your system. and ofcourse you have to spend considerable time.


~ Kars
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi,
I cannot let a php question without an answer !
First, you should downlaod a latest version of php, the 4.1.2 has a secutiy hole !
Second , you should use gcc , binutils, flex to compile it ! you can downlaod it on
http://hpux.cs.utah.edu
download precompiled version and install it with swinstall, it will go faster.

Don't forget to change your PATH variable before the configure script to access to these tools !!

And tell us all the troubles you may have later !!!

hope that help..
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
yue
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Thanks for your warm-hearted reply.
As you said,i have installed the patches,but,what plagues me is that i don't know how to edit /etc/PATH file. Should i add these patches' path into the PATH file in accordance with PATH'S format?Could you be kind enough to direct me how to solve this headache?

Thanks again!
steven Burgess_2
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi

To edit your current PATH on the fly

export PATH=$PATH:

You can either edit /etc/PATH or the users .profile

simply add the path of your command at the end of either

HTH

Steve

take your time and think things through
Rajeev  Shukla
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi Yue,
Firstly there are few problems with version of GCC the only version works well is 2.95.2. By using this you can install Apache 1.3.26 and PHP 4.1.2 or PHP 4.2.3.
First confirm that you have following installed on your server.
Binutils 2.11.2
bison 1.29d
flex 2.5.4a
gcc 2.95.2
After this just follow this step.
#tar xvf apache_1.3.26.tar
#cd apache_1.3.26
#./configure --prefix=/opt/apache
#cd ../
#gunzip php-4.1.2.tar.gz
#tar xvf php-4.1.2.tar
#cd php-4.1.2
#./configure --with-apache=../apache_1.3.26
#make
#make install
#cd ../apache_1.3.26
#./configure --prefix=/opt/apache
#make
#make install
#cd ../php-4.1.2
#cp php.ini-dist /usr/local/lib/php.ini

Regards
Rajeev
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi,
Steven and Rajeev gave good advices,
I will just add that export PATH=$PATH:/opt/gcc/....
works only on korn shell (ksh),
To be sure, you should make it in 2 steps :
first :
#PATH=$PATH:/opt/gcc/bin
Do again with the other tools (lex,...)
and at the end :
#export PATH
Then run ./configure....

hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
yue
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi
I have resolved the gcc PATH,thanks my friends.
but i meet a problem when executing the command as follows:
"./configure --prefix=/usr/local/php --with-apache=../apache_1.3.27 --enable-track-vars".

It occured errors:checking for object suffix... o
checking for executable suffix... configure: error: installation or configuratio
n problem: compiler cannot create executables.


I don't know how to resolve it .

Please help me,thanks!
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Well,
your trouble seems to be on the linker, when you type which ar, you should have /opt/binutils/bin/ar and not the /usr/bin/ar (which is the HP one). If it's the case, then your PATH doesn't include the binutils/bin directory.
Did you try to compile with gcc a dumb program like :
main()
{
printf ("HEllo world\n");
}
and gcc it ? it should generate a running a.out file !!
ANd in you php sources directory, remove the config.cache before running configure,
AND finally, could you post the output of the config script (eventually the config.log).

regards
Benoit
___
Si les imb??ciles volaient, il ferait nuit.
Fr??d??ric Dare
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
yue
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Firstly, I have to express my thanks for your help again.
I logined the system as root, and edited .profile, adding binutils path to it, but, the same error remains. The following is part of ./configure, is it necessary for me to show you the whole config.log file, I hope you would be kind enough to help me out the trouble again. I'm from Harbin, a southeast city in China, it's very nice to make friends with you.
Thanks again.
Output of ./configure is as follows:
checking for kill... no
checking for strtod... no
checking for strtol... no
checking for finite... (cached) no
checking for fpclass... no
checking whether sprintf is broken... (cached) yes
checking for finite... (cached) no
checking for isfinite... no
checking for isinf... no
checking for isnan... no
checking whether fp_except is defined... no
checking whether to enable experimental ZTS... no
checking whether to enable inline optimization for GCC... no
checking whether to enable a memory limit... no
checking whether to enable Zend debugging... no
checking for inline... (cached) inline

Configuring TSRM
checking for stdarg.h... (cached) yes

Configuring libtool
checking for Cygwin environment... no
checking for mingw32 environment... no
checking build system type... hppa2.0w-hp-hpux11.11
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking how to recognise dependant libraries... file_magic (s[0-9][0-9][0-9]|PA
-RISC[0-9].[0-9]) shared library
checking for object suffix... o
checking for executable suffix... configure: error: installation or configuratio
n problem: compiler cannot create executables.

I'm waiting for you warm-hearted reply, thanks.
Rajeev  Shukla
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi Yue,
Beleive me dont use any other versions that what i had mentioned before. Specially GCC and Apache2.0 which comes with HP-UX 11.11 supports dynamic loadable modules.
Just install what ever i has specified and include them in your path and go through each steps. I bet it will work its a tested method.

Cheers
Rajeev
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi Yue,
Could you please post the config.log file in order to see exactly what is the trouble.
I don't think it's PHP, but something about gcc...
In the config.log, there is exactly the line used by gcc which give this answer !!

regards
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
Rajeev  Shukla
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi Yue,
I am very sure its gcc problem please use the versions of softwares which i suggested and let us know

cheers
Rajeev
yue
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi,I have watched the file and found that the file end.o is necessary under path: /opt/langtools/lib/pa20_64/, the path of gcc in .profile is: /opt/gcc/usr/local/.../pa20_64, gcc works well, whose version is 3.2.

Should I replace these pathces in accordance with Rajeev Shukla's suggestion? Or only substitute gcc?

Config.log is in attachment.

Thanks.

Yue
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

HI Yue,
Well that's funny, I think there's something strange with the gcc install, Did you had a previous install with another version ??
What you can do to solve it is to create the /opt/libtools/lib directory and copy / link it with the /usr/local/... where the tools are installed !!
And then try again.
Install gcc 2.95.2, But if you have 3.2, it should work also...

Hope that help
Benoit

_____
quote of the day :
This software said it requires Win95 or better, so I installed Linux.
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
yue
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Thanks for your reply.

I have tried to do it as you said,But i can't find the tools in my system.

What should i do?

Can you help me agagin?

Thanks.

yue

benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Well, you have to install libtools,
to get it :
http://hpux.cs.utah.edu
(this is the latest version).
And if you prefer installation in /opt :
http://hpux.cict.fr but it's not the latest version , but works fine (it's the one I used for my php install)

hth
Benoit

Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Oups Mistake !!!
the touble is not libtool but langtools (no need to install libtool at all !!)
langtools is installed with the HP C Ansi Compiler,
I succeded to compile PHP with gcc 3.1 (I didn't try with gcc 3.2), may the use of 3.1 or 2.95.2 is the best way to make it works !!!
Can you try a find /var -name ld -print to see if you had a previous version of ld which could work ?? I Or may be a patch is not install (check PHSS_21947) I remember I had a trouble with ld, and this patch solved it !!
but I don't know for HPUX11.11 (I'm 11.00).
hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
benoit Bruckert
Honored Contributor

Re: problems when configuring php-4.1.2 on HP-UX11.11

From another thread :
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x1a5e5c7609e9d61190050090279cd0f9,00.htm

I found this patch ref :
PHSS_26560
May be it could help

Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi, I am yue,i have solved the problem by editting configure file and introducing php_4.2.3, all work well (apache,php,mysql), but, when i recompile php, apache and add oracle support, errors are as follow:

Configuring for Apache, Version 1.3.27
+ using installation path layout: Apache (config.layout)
+ activated php4 module (modules/php4/libphp4.a)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
+ configured for HP-UX 11 platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
o php4_module uses ConfigStart/End
+ using builtin Expat
+ checking sizeof various data types
+ doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed. The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.

======== Error Output for sanity check ========
cd ..; gcc -DHPUX11 -I/web/src/php-4.2.3 -I/web/src/php-4.2.3/main -I/w
eb/src/php-4.2.3/main -I/web/src/php-4.2.3/Zend -I/web/src/php-4.2.3/Zend -I/web
/src/php-4.2.3/TSRM -I/web/src/php-4.2.3/TSRM -I/web/src/php-4.2.3 -DUSE_EXPAT -
I./lib/expat-lite -DNO_DL_NEEDED `./apaci` -o helpers/dummy helpers/dummy.c
-L/u01/app/oracle/product/8.1.7/lib -L/u01/app/oracle/product/8.1.7/lib -Lmod
ules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -lm -ldl -lnsl -l:
libcl.a -l:librt.sl -l:libnss_dns.1 -l:libdld.sl -lclntsh -lm -lpthread -lm
ld: Mismatched ABI (not an ELF file) for -lclntsh
Fatal error.
collect2: ld returned 1 exit status
*** Error exit code 1

Stop.
============= End of Error Report =============

Aborting!


What I use are apache_1.3.27, php_4.2.3, mysql_3.23, oracle_8.1.7.
Is any patch necessary?
Could you help me solve this problem?

Thanks.

Yue
Mukesh_4
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi Yue,
Did you get the solution for your problem. Am facing the same error message, Could you have a look at

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x99529c196a4bd71190080090279cd0f9,00.html
Mukesh_4
Occasional Advisor

Re: problems when configuring php-4.1.2 on HP-UX11.11

Hi Yue,
Did you get the solution for your problem. Am facing the same error message, Could you have a look at

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x99529c196a4bd71190080090279cd0f9,00.html
Thanks,