php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57679 Package compile error - PHP version 5.2.2
Submitted: 2007-05-22 02:46 UTC Modified: 2007-06-08 04:01 UTC
From: jarrod dot smithers at wolseley dot co dot uk Assigned:
Status: Closed Package: Fileinfo (PECL)
PHP Version: 5.2.1 OS: Solaris 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
46 - 34 = ?
Subscribe to this entry?

 
 [2007-05-22 02:46 UTC] jarrod dot smithers at wolseley dot co dot uk
Description:
------------
When trying to compile the package Fileinfo version 1.4.0 with php version 5.2.2 using the folllowing command:

/usr/local/apache2/php/bin/pear install pecl/fileinfo the following error is displayed.

checking for magic_open in -lmagic... no
configure: error: wrong magic lib version or lib not found

I have followed the instructions on the fileinfo php page and installed libmagic.

php compile is a s follows:

#! /bin/sh
#
# Created by configure

CC='gcc' \
'./configure' \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--prefix=/usr/local/apache2/php' \
'--enable-cgi-redirect' \
'--with-mysql=/usr/local/mysql' \
'--with-oci8=shared,instantclient,/var/opt/oracle/instantclient' \
'--enable-inline-optimization' \
'--with-zlib' \
'--with-gd' \
'--with-freetype-dir=/usr/local/freetype-2.2.1' \
'--with-pdflib=/data3/src/packages/PDFlib-6.0.3p1-SunOS-sparc/bind/c' \
'--with-jpeg-dir=/usr/local/lib' \
'--with-png' \
'--with-ttf' \
'--with-xpm-dir=/usr/local' \
'--enable-gd-native-ttf' \
'--with-unixODBC=/usr/local/unixODBC' \
'--with-curl=/usr/local/lib' \
'--enable-memory-limit' \
'--with-mcrypt' \
'--with-mhash' \
"$@"


Reproduce code:
---------------
command to reproduce the problem 

/usr/local/apache2/php/bin/pear install pecl/fileinfo

Expected result:
----------------
Expect the fileinfo package to install correctly

Actual result:
--------------
bash-2.05# /usr/local/apache2/php/bin/pear install pecl/fileinfo
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
running: phpize
Configuring for:
PHP Api Version:         20041225
Zend Module Api No:      20060613
Zend Extension Api No:   220060519
building in /var/tmp/pear-build-defaultuser/Fileinfo-1.0.4
running: /tmp/pear/cache/Fileinfo-1.0.4/configure
checking for egrep... egrep
checking for a sed that does not truncate output... /usr/bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... yes
checking build system type... sparc-sun-solaris2.9
checking host system type... sparc-sun-solaris2.9
checking target system type... sparc-sun-solaris2.9
checking for PHP prefix... /usr/local/apache2/php
checking for PHP includes... -I/usr/local/apache2/php/include/php -I/usr/local/apache2/php/include/php/main -I/usr/local/apache2/php/include/php/TSRM -I/usr/local/apache2/php/include/php/Zend -I/usr/local/apache2/php/include/php/ext -I/usr/local/apache2/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613
checking for PHP installed headers prefix... /usr/local/apache2/php/include/php
checking for re2c... no
configure: WARNING: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for fileinfo support... yes, shared
checking for magic files in default path... found in /usr
checking for dl... no
checking for __dl... no
checking for dl in -ldlopen... no
checking for __dl in -ldlopen... no
checking for gzgets... no
checking for __gzgets... no
checking for gzgets in -lz... yes
checking for round... no
checking for __round... no
checking for round in -lm... no
checking for __round in -lm... no
checking for magic_open in -lmagic... no
configure: error: wrong magic lib version or lib not found
ERROR: `/tmp/pear/cache/Fileinfo-1.0.4/configure' failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-28 13:52 UTC] janjaap at forest dot com
Hi there!

I am also experiencing an Compile error on PHP5.2.1!

Best Regards,
Jan Jaap
 [2007-06-07 14:14 UTC] sokter at gmail dot com
Solaris 9 and 10 packages do not include magic extensions. Because of that reason :

At the first download and compile magic.so and magic.h from 

http://ftp.uni-koeln.de/util/file-4.21.tar.gz

and compile it with

bash# export LDFLAGS='-R /usr/local/lib' && ./configure
make && make install

after that open Fileinfo.x.x.tar.gz

bash# /correct/version/of/phpize
bash# export LDFLAGS='-R /usr/local/lib' && ./configure --with-php-config=/correct/path/of/php-config

make && make install

and insert extension=fileinfo.so to correct php.ini file.
Note: Do not forget to insert magic.mime file to correct directory.

Now I'm using that pecl extension.

Best Regards
Serkan OKTER
 [2007-06-08 04:01 UTC] jarrod dot smithers at wolseley dot co dot uk
I have followed the instructions and I am now using fileinfo.

Thanks for the advice.

Jarrod
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 03:01:23 2019 UTC