Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble installing custom php 5 on 10.5.4 with mcrypt




On Jul 24, 2008, at 17:53 PM, Jeremy Bush wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm hoping someone here has encountered this problem and can help me out with an answer.

I'm trying to compile my own PHP (which I've done plenty of times in the past on other systems), but
I need libmcrypt support. Because 10.5 OS X Server is all 64 bit, I need a 64bit php binary, which
means all my linked libraries need to be 64 bit as well.


I tried to compile libmcrypt by hand and with the SVN version of macports, but both versions give me
the following error when I do `make test` after compiling php with them:


dyld: Symbol not found: _arcfour_LTX__is_block_algorithm
  Referenced from: /usr/local/lib/libmcrypt.4.dylib
  Expected in: flat namespace

Googling for this error just brings up a forum post on entropy.org, which isn't much help. How can I
get my 64bit php to play nice?


I'm using CFLAGS='-arch x86_64' before all my ./configure statements to get a x86_64 build.

So you have established you build the object files to support 64bit architecture but it should also contain "-arch i386" as well.


So what are you doing for 64bit linking cause you didn't post any LDFLAGS and you don't say if you compensate for other flags either.

Try the following:
for libmcrypt :
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -pipe -no-cpp-precomp - arch i386 -arch x86_64" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " \
LDFLAGS="-arch i386 -arch x86_64 " \
./configure \
--disable-dynamic-loading \
--disable-dependency-tracking \
--prefix=/usr/local \
--enable-shared \
--disable-static \
--mandir=/usr/local/man


make
sudo make install



for PHP: (mcrypt will be a loadable module)
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -pipe -no-cpp-precomp - arch i386 -arch x86_64" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " \
LDFLAGS="-arch i386 -arch x86_64 " \
./configure \
--disable-dependency-tracking \
--with-mcrypt=shared,/usr/local \
--prefix=/usr/local/php \
<REST OF CONFIGURE ARGS>


make
sudo make install



possible extra steps:
sudo mv /usr/local/php /usr/local/php-5.2.x
sudo ln -shf /usr/local/php-5.2.x /usr/local/php


The use of the dynamic link allows it to continue working and allows you to have different versions which you can switch between by just changing the dynamic link.


If you build it from the same version as installed by apple then all you really need to so build it with the extra modules as shared and then install those modules rather than the whole thing.


Thanks for any help. - -- Jeremy Bush Image Management LLC http://www.imagemanagement.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32)

iD8DBQFIiPn0Q66b+fgziNURAkyQAJ4yu8XqLvR1PwsdotbvxGmXNpCtXwCggOfX
xOhZauoJNJ0u6LIWMuSaqBc=
=aAlO
-----END PGP SIGNATURE-----
begin:vcard
fn:Jeremy Bush
n:Bush;Jeremy
org:Image Management LLC
adr;dom:Suite 200;;610 Main St;Racine;Wi;53403
email;internet:email@hidden
title:Web Master
tel;work:262-898-9137
tel;fax:262-898-9138
url:http://www.imagemanagement.com
version:2.1
end:vcard

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/webmaster% 40macftphttp.serverbox.org


This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden

References: 
 >Trouble installing custom php 5 on 10.5.4 with mcrypt (From: Jeremy Bush <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.