I've been trying for the past 2 days to install IP2Location on my Mac. I've managed to install IP2Location C Library, now PECL extesion is causing issues.
I've ran phpize and then 'sudo ./configure' and I get the following error:
checking for ip2location support... yes, shared
checking for ip2location files in default path... found in /usr/local
checking for IP2Location_open_mem in -lIP2Location... no
configure: error: wrong ip2location, lib version >= 6.x.x is required or library not found
I'm using the latest version of IP2Location, so I know it's the right version.
Can someone shed some light on this error?
I had a look into config.log and found this as the last error:
227 configure:4112: checking for ip2location files in default path
228 configure:4117: result: found in /usr/local
229 configure:4269: checking for IP2Location_open_mem in -lIP2Location
230 configure:4294: cc -o conftest -g -O2 -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lIP2Location >&5
231 ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '/usr/local/lib/libIP2Location.so' for architecture x86_64
232 clang: error: linker command failed with exit code 1 (use -v to see invocation)
233 configure:4294: $? = 1
234 configure: failed program was:
235 | /* confdefs.h */
236 | #define PACKAGE_NAME ""
237 | #define PACKAGE_TARNAME ""
238 | #define PACKAGE_VERSION ""
239 | #define PACKAGE_STRING ""
240 | #define PACKAGE_BUGREPORT ""
241 | #define PACKAGE_URL ""
242 | /* end confdefs.h. */
243 |
244 | /* Override any GCC internal prototype to avoid an error.
245 | Use char because int might match the return type of a GCC
246 | builtin and then its argument prototype would still apply. */
247 | #ifdef __cplusplus
248 | extern "C"
249 | #endif
250 | char IP2Location_open_mem ();
251 | int
252 | main ()
253 | {
254 | return IP2Location_open_mem ();
255 | ;
256 | return 0;
257 | }
258 configure:4304: result: no
259 configure:4419: error: wrong ip2location, lib version >= 6.x.x is required or library not found
I've checked and can confirm that /usr/local/lib/libIP2Location.so exists.
Run 'file' gives the following:
$ file libIP2Location.so
libIP2Location.so: Mach-O 64-bit bundle x86_64