php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56270 Build error os x
Submitted: 2005-01-18 19:03 UTC Modified: 2005-04-06 03:55 UTC
From: mike at lismal dot ch Assigned:
Status: Closed Package: Fileinfo (PECL)
PHP Version: 5.0.3 OS: os x
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mike at lismal dot ch
New email:
PHP Version: OS:

 

 [2005-01-18 19:03 UTC] mike at lismal dot ch
Description:
------------
Build error  os x

Reproduce code:
---------------
Building this package on os x with pear results in 
following error:

SRM
checking for PHP extension directory... /usr/local/php5/
lib/php/extensions/no-debug-non-zts-20041030
checking for re2c... exit 0;
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for fileinfo support... yes, shared
checking for magic files in default path... not found
configure: error: Please reinstall the libmagic 
distribution
`/private/tmp/tmpbTlPl7/Fileinfo-0.2/configure' failed


I installed libmagick via fink


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-20 04:30 UTC] mike at lismal dot ch
im using os x 10.3.7
 [2005-01-28 04:09 UTC] martinh at solid-state-logic dot com
Surprisingly this doesn't work on FreeBSD 5.3 either. I say surprisingly as MacOS 10.5 and FBSD 5.3 share alot of the same code base.

If you need any help with this please let me know.
 [2005-01-28 05:37 UTC] martinh at solid-state-logic dot com
In FreeBSD 5.3 (and most like Mac OS 10.3) the magic file is not in /etc/, but /usr/share/misc.

The config file needs altering to reflect this change.

(I just sym linked the two to get it to compile)
 [2005-04-05 11:12 UTC] ilia at prohost dot org
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 [2005-04-06 03:55 UTC] mike at lismal dot ch
to get fileinfo to compile on os x you must install the 
fink 
packages:
file-shlibs and file-dev
otherwise libmagic won't be found

also when loading the extension in a script:
don't use
dl('fileinfo.' . PHP_SHLIB_SUFFIX);
but:
dl('fileinfo.so');
 [2005-10-19 15:13 UTC] chartjes at gmail dot com
I tried building fileinfo on my iBook using 'pecl install 
fileinfo' and still get the same 'please reinstall libmagic 
distribution' message.

I installed imagemagick via fink, along with file-shlibs and 
files-dev like previous messages indicated.  Don't know how to 
get the fileinfo configure script to look at /sw/ (where fink 
installed stuff) to look for the magic files.
 [2007-11-30 12:42 UTC] taylorbarstow at gmail dot com
This is still a problem for Mac OS X users (Fileinfo 1.0.4, OS X 10.4.11).  The fix (below) is to alter the configure script, but there should be away to do this from the command line.

The quick workaround is to edit the configure script; on line 3218, where it reads:

  SEARCH_PATH="/usr/local /usr /usr/share/file"

change it to read:

  SEARCH_PATH="/usr/local /usr /usr/share/file /sw"

It would be a lot better if the package maintainer could change the configure script to accept a --with-libmagic directive, so OS X users could do:

  # ./configure --with-libmagic=/sw

Thanks
 [2008-09-01 22:50 UTC] abajay at netzero dot com
Install Fink
sudo apt-get install file-shlibs
sudo apt-get install file-dev

sudo pecl  install fileinfo
#this will fail with an error
go to the pear/temp/download/fileinfo directory
edit the configure file
	add /sw to SEARCH_PATH
	save
./configure
make
sudo make install

restart apache
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC