php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8125 ltconfig out of date
Submitted: 2000-12-05 12:22 UTC Modified: 2000-12-19 17:19 UTC
From: anil at recoil dot org Assigned:
Status: Closed Package: Dynamic loading
PHP Version: 4.0 Latest CVS (05/12/2000) OS: OpenBSD 2.8
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: anil at recoil dot org
New email:
PHP Version: OS:

 

 [2000-12-05 12:22 UTC] anil at recoil dot org
The ltconfig seems to be somewhat out of date with regards to OpenBSD.  On i386,it is unable to detect shared libraries at runtime when compiled out of the box, and on OpenBSD 2.8 onwards, it should use 'cc -shared' instead of the default.  

Currently, this is what I get when trying to start Apache (with the --with-imap option specified):

[root@brick php4]# apachectl startssl
/usr/libexec/ld.so: Undefined symbol "_mail_string" in httpd:/usr/lib/apache/modules/libphp4.so

OpenBSD includes a version of ltconfig that is up-to-date with respect to these changes, and I merged them in here to enable CVS to compile 'out-of-the-box' on my OpenBSD box.  It should not affect previous OpenBSD revisions.

It has only been tested on i386 OpenBSD, and could really use testing on Sparc/PowerPC.

Here is the patch to ltconfig from latest CVS:

Index: ltconfig
===================================================================
RCS file: /repository/php4/ltconfig,v
retrieving revision 1.20
diff -u -r1.20 ltconfig
--- ltconfig    2000/11/04 02:42:10     1.20
+++ ltconfig    2000/12/05 17:11:47
@@ -1105,6 +1105,9 @@
     with_gnu_ld=no
   fi
   ;;
+openbsd*)
+  with_gnu_ld=no
+  ;;
 
 esac
 
@@ -1402,10 +1405,18 @@
     ;;
 
   openbsd*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-    hardcode_libdir_flag_spec='-R$libdir'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
+    case "$host_os" in
+      openbsd2.[01234567])
+       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+       hardcode_libdir_flag_spec='-R$libdir'
+      ;;
+      *)
+       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      ;;
+    esac
     ;;
 
   os2*)
@@ -2019,13 +2030,10 @@
 
 openbsd*)
   version_type=sunos
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-    need_version=no
-  fi
   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
   shlibpath_var=LD_LIBRARY_PATH
+  deplibs_check_method='pass_all'
   ;;
 
 os2*)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-19 17:19 UTC] anil at recoil dot org
Sascha committed this to the php_4_0_4, but not the HEAD branch, so it will have to be reapplied, or the relevant set of patches submitted to libtool-patches(espie@openbsd.org is working on this)

(note: if someone wants, the #8230 and #6657 bug reports can also be closed, as they are related to this problem, and still open)
 [2023-06-25 17:20 UTC] john123 at gmail dot com
Nice Article here good one.










(https://www.tspgov.online)github.com
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 11:01:32 2025 UTC