php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26908 Unable to create shared libraries in HPUX
Submitted: 2004-01-14 14:06 UTC Modified: 2004-01-15 10:48 UTC
From: knarayan97 at yahoo dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.4 OS: HP-UX 11.00
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: knarayan97 at yahoo dot com
New email:
PHP Version: OS:

 

 [2004-01-14 14:06 UTC] knarayan97 at yahoo dot com
Description:
------------
I'm trying to compile PHP4.3.4 as a DSO module (Apache 2) with HP ANSI C. I am unable to configure it to build shared libraries. I have tried the simplest configuration without any options other that shared but I'm still unable to configure for shared libraries.





Reproduce code:
---------------

./configure --prefix=/usr/local --enable-shared

Actual result:
--------------
Configuring libtool
checking for Cygwin environment... no
checking for mingw32 environment... no
checking build system type... hppa2.0w-hp-hpux11.00
checking for non-GNU ld... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking for a sed that does not truncate output... /usr/bin/sed
checking how to recognise dependent 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... no
checking command to parse /usr/bin/nm -p output... ok
checking for ranlib... (cached) ranlib
checking for strip... strip
checking for objdir... .libs
checking for /opt/ansic/bin/cc option to produce PIC... +Z
checking if /opt/ansic/bin/cc PIC flag +Z works... yes
checking if /opt/ansic/bin/cc static flag -Wl,-a -Wl,archive works...
yes
checking if /opt/ansic/bin/cc supports -c -o file.o... yes
checking if /opt/ansic/bin/cc supports -c -o file.lo... yes
checking whether the linker (/usr/bin/ld) supports shared libraries...
yes
checking how to hardcode library paths into programs... relink
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... hpux11.00 dld.sl
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
creating libtool


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-14 14:07 UTC] knarayan97 at yahoo dot com
I have been able to get shared libraries with PHP4.2.1 but have been unsuccessful with PHP 4.3.0
 [2004-01-14 14:33 UTC] sniper@php.net
The provided configure line is invalid.
Please show the actual configure line you used which does not work.  (to get an apache2 dso use --with-apxs2)

 [2004-01-14 14:50 UTC] knarayan97 at yahoo dot com
env CFLAGS=' -D_REENTRANT -I/usr/local/myutils/include ' \
     CXXFLAGS=' -D_REENTRANT -I/usr/local/myutils/include\
 ./configure --prefix=/usr/local/php      \
  --with-apxs2=/usr/local/apache2/bin/apxs   \
  --with-mysql=/usr/local/mysql     \
  --enable-shared \
;


Configuring libtool
checking for Cygwin environment... no
checking for mingw32 environment... no
checking build system type... config.sub: missing argument
Try `config.sub --help' for more information.

checking for non-GNU ld... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking for a sed that does not truncate output... /usr/bin/sed
checking how to recognise dependent libraries... unknown
checking for object suffix... o
checking for executable suffix... no
checking command to parse /usr/bin/nm -p output... failed
checking for -ranlib... (cached) ranlib
checking for -strip... no
checking for strip... strip
checking for objdir... .libs
checking for /opt/ansic/bin/cc option to produce PIC... none
checking if /opt/ansic/bin/cc static flag  works... yes
checking if /opt/ansic/bin/cc supports -c -o file.o... yes
checking if /opt/ansic/bin/cc supports -c -o file.lo... yes
checking whether the linker (/usr/bin/ld) supports shared libraries...
no
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... no
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
creating libtool
 [2004-01-15 01:11 UTC] sniper@php.net
DO NOT set any CFLAGS or CXXFLAGS yourself. The configure (libtool, etc) is perfectly capable of determining the correct values..

 [2004-01-15 09:37 UTC] knarayan97 at yahoo dot com
I fixed the problem with my configuration and am able to compile and obtain a shared library. I still have not tested it yet (I am seeing a few tests fail) but that is not relevant to this bug report. 
It was (loo)user error. I escaped new lines so that the options were in spearate lines - it so happened that the line with apxs2 had a space after the escape (\ ) and that caused $ac_option variable in the configure script to set $nonopt=" " and this cascaded into failures in lines 1631-1655 which did not evaluate the $host_alias variable and this led to the problems with not being able to build shared library. Sorry for taking up space with a bogus request.
 [2004-01-15 09:38 UTC] knarayan97 at yahoo dot com
I am closing the report.
 [2004-01-15 10:48 UTC] mgf@php.net
user error -> Bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Aug 13 13:00:03 2025 UTC