Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : gmp / bcmath extensions



Threaded Mode | Print  

 gmp / bcmath extensions (5 Replies, Read 11190 times)
xaurion
Group: Member
Post Group: Newbie
Posts: 4
Status:
There are any way to enable this extensions?

I'm trying to compile from php sources on osx 10.8 but without success.

I get this error:

Code

Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.3/lib/extensions/ext/gmp.so' - dlopen(/Applications/AMPPS/php-5.3/lib/extensions/ext/gmp.so, 9): no suitable image found.  Did find:
    /Applications/AMPPS/php-5.3/lib/extensions/ext/gmp.so: mach-o, but wrong architecture in Unknown on line 0

IP: --   

gmp / bcmath extensions
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Did you paste the .so file in /Applications/AMPPS/php-5.3/lib/extensions/ext/ ?

How did you compile, can you give me the steps ?

Steps we follow are :
1. cd /<ext-source>
2. /Applications/AMPPS/php/bin/phpize
3. ./configure (with required options, you can take use --help for more options)
4. make
5. sudo make install
6. chown the .so to your user
7. copy it into /Applications/AMPPS/php-5.3/lib/extensions/ext/.
8. enable it from AMPPS -> PHP Tab -> PHP Extension
9. Restart Apache.

To check you can run the following command in terminal:
/Applications/AMPPS/php/bin/php -m

you should be able to see the extension name.


-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

gmp / bcmath extensions
xaurion
Group: Member
Post Group: Newbie
Posts: 4
Status:
Quote From : tidus August 2, 2013, 2:05 pm
Hi,

Did you paste the .so file in /Applications/AMPPS/php-5.3/lib/extensions/ext/ ?

How did you compile, can you give me the steps ?

Steps we follow are :
1. cd /<ext-source>
2. /Applications/AMPPS/php/bin/phpize
3. ./configure (with required options, you can take use --help for more options)
4. make
5. sudo make install
6. chown the .so to your user
7. copy it into /Applications/AMPPS/php-5.3/lib/extensions/ext/.
8. enable it from AMPPS -> PHP Tab -> PHP Extension
9. Restart Apache.

To check you can run the following command in terminal:
/Applications/AMPPS/php/bin/php -m

you should be able to see the extension name.


I followed you instructions, but I get the same error.

I thing that the problem is in .config flags, I tried to compile the extension in 32 bits with no success:

➜  gmp  MACOSX_DEPLOYMENT_TARGET=10.8 CFLAGS='-O3 -fno-common -arch i386 -arch x86_64' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64' make -j6;sudo make install

but the result file is 64 bits!

➜  gmp  file /Users/v4ticini/Downloads/php-5.3.21/ext/gmp/modules/gmp.so
/Users/v4ticini/Downloads/php-5.3.21/ext/gmp/modules/gmp.so: Mach-O 64-bit bundle x86_64

IP: --   

gmp / bcmath extensions
tidus
Group: Member
Post Group: Super Member
Posts: 1121
Status:
Hi,

Try removing -arch x86_64 from all *FLAGS variables.


Edited by tidus : August 8, 2013, 9:25 am

-----------------------
Follow AMPPS on,
Twitter : https://twitter.com/AMPPS_Stack
Facebook :  http://www.facebook.com/softaculousampps
Google+ : https://plus.google.com/+AmppsStack
IP: --   

gmp / bcmath extensions
xaurion
Group: Member
Post Group: Newbie
Posts: 4
Status:
Quote From : tidus August 8, 2013, 9:25 am
Hi,

Try removing -arch x86_64 from all *FLAGS variables.


The same result:

file /Users/v4ticini/Downloads/php-5.3.21/ext/gmp/modules/gmp.so
/Users/v4ticini/Downloads/php-5.3.21/ext/gmp/modules/gmp.so: Mach-O 64-bit bundle x86_64

I don't understand!
IP: --   

gmp / bcmath extensions
xaurion
Group: Member
Post Group: Newbie
Posts: 4
Status:
BINGOO!!!

This is the good way!!

CFLAGS=-m32 CPPFLAGS=-m32 CCASFLAGS=-m32 ./configure --with-php-config=/Applications/AMPPS/php/bin/php-config


Thank you tidu for your help!

IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is May 25, 2024, 8:52 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:0.275