# AMD64 and libdir Broken?

- Thread: https://externals.io/message/14651
- Original archive: https://news-web.php.net/php.internals/14651
- Started by Hans Zaunere on 2005-02-06T00:03:52+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #14651 — Hans Zaunere — 2005-02-06T00:03:52+00:00

URL: https://externals.io/message/14651#14651

Some time ago we talked about compiling PHP on an AMD64.  Joe Orton was kind enough to patch the 5.1 branch to include the --with-libdir directive to ./configure to allow for searching in libs in such places as /lib64 and /usr/lib64 and it worked great.

However, after downloading the php5-200502052330.tar.gz snapshot, things seem broken again.  My ./configure starts out like this:

./configure --with-libdir=lib64 --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs

.....


Which had worked fine before.  However, when compiling this snapshot, I get the original errors during link time, such as:

*** Warning: linker path does not have real file for library -lxml2.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libxml2 and none of the candidates passed a file format test
*** using a file magic. Last file checked: /lib/libdl-2.3.3.so

Thus, libphp5.so isn't created.  Seems like Joe's patch was broken somehow or somehow changed.  Any news or ideas?  Many thanks,


---
Hans Zaunere
President, Founder
New York PHP
http://www.nyphp.org

---

## #14683 — Joe Orton — 2005-02-07T09:30:09+00:00

URL: https://externals.io/message/14651#14683 · In reply to: #14651

...
> However, after downloading the php5-200502052330.tar.gz snapshot,
> things seem broken again.  My ./configure starts out like this:
> 
> ./configure --with-libdir=lib64 --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs
> 
> .....
> 
> Which had worked fine before.  However, when compiling this snapshot,
> I get the original errors during link time, such as:
> 
> *** Warning: linker path does not have real file for library -lxml2.

I think this should only happen with a broken libxml2 installation.  Do
you have both /usr/lib64/libxml2.la and /usr/lib64/libxml2.so?  The PHP
HEAD build works fine for me still.

The version of libtool bundled with PHP is very old and doesn't
correctly support x86_64 Linux (and no doubt many other platforms); you
could try a patch like below, not sure it'll make a difference though:

Index: build/libtool.m4
===================================================================
RCS file: /repository/php-src/build/libtool.m4,v
retrieving revision 1.1
diff -u -r1.1 libtool.m4
--- build/libtool.m4	19 Jan 2005 17:52:32 -0000	1.1
+++ build/libtool.m4	7 Feb 2005 09:28:04 -0000
@@ -3393,7 +3393,7 @@
 # This must be Linux ELF.
 linux-gnu*)
   case $host_cpu in
-  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
+  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
