Operating System - HP-UX
1827641 Members
3437 Online
109966 Solutions
New Discussion

Re: Compile PHP-5.3.2 on HP-UX 11.23

 
fotoshack
Occasional Advisor

Compile PHP-5.3.2 on HP-UX 11.23

I compiled PHP-5.2.9 on these systems in June of 2009 and I now need to update the PHP installation to 5.3.2. I'm using the following configure command:
----------------------------------------------
env CC=cc CFLAGS="+DD64 -I/usr/local/include" \
LDFLAGS="-L/usr/local/lib/hpux64" \
./configure \
--prefix=/opt/webhost/hpwpuxs/php-5.3.2 \
--with-libdir=lib/hpux64 \
--without-openssl \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-gd=/usr/local \
--with-iconv=/usr/local \
--with-zlib-dir=/usr/local \
--with-libxml-dir=/usr/local \
--with-config-file-path=/opt/webhost/hpwpuxs/php-5.3.2/conf \
--with-apxs2=/opt/webhost_sw/apache-2.0.58/bin/apxs \
--with-oci8=shared,instantclient,/u01/app/oracle/instantclient_11_1 \
2>&1 | tee configure.log
----------------------------------------------
The configure script completes, but gives these errors at the end:
----------------------------------------------
awk: Line static const char n cannot have more than 199 fields.
The input line number is 27. The file is ext/phar/stub.h.
The source line number is 1.
creating main/internal_functions_cli.c
awk: Line static const char n cannot have more than 199 fields.
The input line number is 27. The file is ext/phar/stub.h.
The source line number is 1.
----------------------------------------------

And make fails immediately.

I've attached configure.log and make.log to this message.

Please let me know what guidance you have.

Thanks.

16 REPLIES 16
James R. Ferguson
Acclaimed Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

Hi:

> awk: Line static const char n cannot have more than 199 fields

The HP-UX 'awk' variant has a limitation of only 199 fields. You could install 'gawk' which removes this limitation (and others).

http://hpux.connect.org.uk/hppd/hpux/Gnu/gawk-3.1.7/

Regards!

...JRF...

Tim Nelson
Honored Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

How about a pre-ported version from here ?
http://hpux.connect.org.uk/hppd/hpux/Languages/php-5.3.2/
fotoshack
Occasional Advisor

Re: Compile PHP-5.3.2 on HP-UX 11.23

I installed gawk, which removed the two errors at the end of the configure. Thanks for that advice.

Make is now dying with a new error (several of them, actually).

ld: Unsatisfied symbol "apr_table_clear" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_get_server_version" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "ap_add_version_component" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_set_last_modified" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_brigade_cleanup" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_bucket_eos_create" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_auth_type" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "unixd_config" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "ap_rflush" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_destroy_sub_req" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "ap_loaded_modules" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "ap_set_content_length" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_pool_cleanup_null" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_add_cgi_vars" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_pool_userdata_get" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_pool_userdata_set" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_get_brigade" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_pool_cleanup_run" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_table_unset" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_hook_child_init" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_brigade_create" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_hook_pre_config" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_update_mtime" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_set_content_type" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_palloc" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_log_rerror" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_pool_cleanup_register" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_hook_post_config" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_mpm_query" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "ap_add_common_vars" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_rwrite" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_table_set" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_server_root_relative" in file sapi/apache2handler/.libs/apache_config.o
ld: Unsatisfied symbol "ap_hook_handler" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_log_error" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_table_elts" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_pass_brigade" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: (Warning) Unsatisfied symbol "main" in file /usr/lib/hpux64/libc.so.1
ld: Unsatisfied symbol "apr_table_get" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_table_add" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "apr_brigade_flatten" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_server_root" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "ap_sub_req_lookup_uri" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "apr_snprintf" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "apr_psprintf" in file sapi/apache2handler/.libs/sapi_apache2.o
ld: Unsatisfied symbol "ap_run_sub_req" in file sapi/apache2handler/.libs/php_functions.o
ld: Unsatisfied symbol "apr_pstrdup" in file sapi/apache2handler/.libs/sapi_apache2.o
1 warnings.
46 errors.
*** Error exit code 1

The reason I don't use the pre-ported one is that it doesn't include some of the things I need (support for Oracle being the main one).

-Kevin
Dennis Handly
Acclaimed Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

>Make is now dying with a new error

(This has nothing really to do with make, these are linker errors.)

ld: Unsatisfied symbol "apr_table_clear"
ld: Unsatisfied symbol "ap_get_server_version"

Where should these functions be defined? Can you search the sources or objects for those symbols?
nm -pxNA *.o | grep -e apr_table_clear -e ap_get_server_version
fotoshack
Occasional Advisor

Re: Compile PHP-5.3.2 on HP-UX 11.23

nm -pxNA *.o | grep -e apr_table_clear -e ap_get_server_version

returns

nm: *.o: cannot open
James R. Ferguson
Acclaimed Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

Hi:

> nm: *.o: cannot open

Are you sure you changed to the directory that contains the object files?

Regards!

...JRF...
fotoshack
Occasional Advisor

Re: Compile PHP-5.3.2 on HP-UX 11.23

Thanks for pointing out my newbie mistake!

cd sapi/apache2handler/.libs
nm -pxNA *.o | grep -e apr_table_clear -e ap_get_server_version

returns

0x0000000000000000 U php_functions.o:ap_get_server_version
0x0000000000000000 U sapi_apache2.o:apr_table_clear
Dennis Handly
Acclaimed Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

>U php_functions.o:ap_get_server_version
>U sapi_apache2.o:apr_table_clear

These are unsats, you need to find definitions. Are there more objects or archive or shared libs you can search?
fotoshack
Occasional Advisor

Re: Compile PHP-5.3.2 on HP-UX 11.23

I'm not sure where else I'd search.

Could these unsatisfied symbols have anything to do with the error that appears just above them?

Bundled) cc: warning 922: "-b" is unsupported in the bundled compiler, ignored.
Dennis Handly
Acclaimed Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

>Could these unsatisfied symbols have anything to do with the error that appears just above them?
>(Bundled) cc: warning 922: "-b" is unsupported in the bundled compiler, ignored.

Most likely. You need to purchase the ANSI C compiler or use gcc.
fotoshack
Occasional Advisor

Re: Compile PHP-5.3.2 on HP-UX 11.23

I was afraid you were going to say that.

I installed gcc, but when I attempt to use it, I get this:

checking for gcc... gcc
checking whether the C compiler (gcc +DD64 -I/usr/local/include -L/usr/local/lib/hpux64) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

Am I not invoking it correctly? I simply changed 'env CC=cc' to 'env CC=gcc'
James R. Ferguson
Acclaimed Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

Hi (again):

> I installed gcc, but when I attempt to use it, I get this...

Did you install all of the run-time dependencies for 'gcc'?

Regards!

...JRF...
fotoshack
Occasional Advisor

Re: Compile PHP-5.3.2 on HP-UX 11.23

Yes. All the dependencies are there.

gcc 4.2.3 gcc
gettext 0.17 gettext
libiconv 1.12 libiconv
libxml2 2.6.31 libxml2
zlib 1.2.3 zlib
Shinji Teragaito_1
Respected Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

Hi :-)

Can you try out CC=gcc CFLAGS="-mlp64 -I/usr/local/include" ?
You don't need to change other parameters.
Steven Schweda
Honored Contributor

Re: Compile PHP-5.3.2 on HP-UX 11.23

> I installed gcc, [...]

How, exactly, did you install what, exactly?

> [...] but when I attempt to use it, [...]

When you "attempt to use it" how, exactly?

> I get this:
> [...]

Did you try your new GCC on anything (simple)
before throwing this big thing at it?

> configure: error: installation or
> configuration problem: C compiler cannot
> create executables.

I'd start by trying to compile any simple
program using gcc. (You could try looking
through the log files produced by whatever
you actually did, but that's probably harder
than doing a simple "gcc hello-world.c"
test.)
Vajith V
HPE Pro
Moved:

Re: Compile PHP-5.3.2 on HP-UX 11.23