I'm using os X and 64-bit mysql on a G5 and I'm trying to compile
a 64-bit PHP but I seem to be having trouble with the libraries.
If I run configure as so:
CFLAGS="-mpowerpc64 -mcpu=G5 -mtune=G5 -arch ppc64"
CPPFLAGS="-mpowerpc64 -mcpu=G5 -mtune=G5 -arch ppc64"
CXXFLAGS="-mpowerpc64 -mcpu=G5 -mtune=G5 -arch ppc64" ./configure
--with-apxs=/usr/sbin/apxs --with-mysqli=
/usr/local/mysql/bin/mysql_config --with-libxml-dir=/usr
... then it dies with this stuff in the config.log:
ld64 warning: in /usr/lib/libxml2.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libz.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
... however if I don't use the various CFLAGS it dies trying to link to
libmysqlclient with this in the config.log:
/usr/bin/ld: truncated or malformed archive:
/usr/local/mysql/lib/libmysqlclient.a (ranlib structures in table of
contents extends past the end of the table of contents, can't load from it)
/usr/bin/ld: truncated or malformed archive:
/usr/local/mysql/lib/libmysqlclient.a (ranlib structures in table of
contents extends past the end of the table of contents, can't load from it)
Has anyone out there had any luck doing this? I'd really like to be
able to use php in 64 bit glory and additionally I want to be able to
use a feature of proc_open()
that can only be enabled with a source-code
edit.
Any advice would be appreciated.
~jon
Sounds like those libraries are not 64-bit.
--Wez.
I'm using os X and 64-bit mysql on a G5 and I'm trying to compile
a 64-bit PHP but I seem to be having trouble with the libraries.ld64 warning: in /usr/lib/libxml2.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libz.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
Sounds like those libraries are not 64-bit.
.. and you need to use --with-libdir=lib64
--
Wbr,
Antony Dovgal
Ok, its pretty clear what the problem is. I must not have all 64 bit
libraries on my system. Does this mean that I've gotta find and
recompile ALL of them for PHP to be able to work with them?
Jon wrote:
I'm using os X and 64-bit mysql on a G5 and I'm trying to compile
a 64-bit PHP but I seem to be having trouble with the libraries.
[snip]
... then it dies with this stuff in the config.log:ld64 warning: in /usr/lib/libxml2.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libz.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architecture
Most libraries on Mac OS X only ship as 32-bit.
Since these are standard open-source components you could probably recompile
them and link against those instead of the system copies; but do you really need
to compile PHP as 64-bit in the first place?
Unless you really want 64-bit integers in PHP for some reason, you could simply
link against the 32-bit MySQL libraries. (Install a 32-bit package in another
directory, if they're not shipping them with the 64-bit server.) Communication
with the server happens over a socket, so you don't have to compile as the same
arch as the server.
-- brion vibber (brion @ pobox.com)
Ok, I may do that. Thanks for the tip.
Brion Vibber wrote:
Jon wrote:
I'm using os X and 64-bit mysql on a G5 and I'm trying to compile
a 64-bit PHP but I seem to be having trouble with the libraries.
[snip]
... then it dies with this stuff in the config.log:ld64 warning: in /usr/lib/libxml2.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libz.dylib, file does not contain requested
architecture
ld64 warning: in /usr/lib/libiconv.dylib, file does not contain
requested architectureMost libraries on Mac OS X only ship as 32-bit.
Since these are standard open-source components you could probably recompile
them and link against those instead of the system copies; but do you really need
to compile PHP as 64-bit in the first place?Unless you really want 64-bit integers in PHP for some reason, you could simply
link against the 32-bit MySQL libraries. (Install a 32-bit package in another
directory, if they're not shipping them with the 64-bit server.) Communication
with the server happens over a socket, so you don't have to compile as the same
arch as the server.-- brion vibber (brion @ pobox.com)