Date: Mon, 8 Nov 2004 02:38:18 +0800 (CST) From: Uranus <uranus@it.muds.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/73647: Problem of building sysutils/pecl-fileinfo Message-ID: <200411071838.iA7IcIXb015098@it.muds.net> Resent-Message-ID: <200411071840.iA7IeQQ5063268@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 73647 >Category: ports >Synopsis: Problem of building sysutils/pecl-fileinfo >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 07 18:40:25 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Uranus >Release: FreeBSD 5.3-STABLE i386 >Organization: >Environment: System: FreeBSD it.muds.net 5.3-STABLE FreeBSD 5.3-STABLE #0: Sun Nov 7 13:15:09 CST 2004 root@it.muds.net:/usr/obj/usr/src/sys/ED i386 >Description: The port sysutils/pecl-fileinfo can't be built on FreeBSD 5.3-STABLE. When I build this one, I got the following error messages at configuration time: checking for fileinfo support... yes, shared checking for magic files in default path... not found configure: error: Please reinstall the libmagic distribution >How-To-Repeat: 1. cd /usr/ports/sysutils/pecl-fileinfo 2. make install >Fix: I can't find the `magic.h' in the /usr/include and /usr/local/include directories which are searched by the `configure' program. But I can find out it in the path `/usr/src/contrib/file/magic.h'. So I just copied it into `/usr/include' and then make it again. I got the following messages when I did it: checking for magic files in default path... found in /usr checking for magic_open in -lmagic... no configure: error: wrong magic lib version or lib not found Then I read `libmagic' and write a little program to test magic_open(). I used the command "gcc test.c -o test -lmagic" and got the messages: /usr/lib/libmagic.so: undefined reference to nflate' /usr/lib/libmagic.so: undefined reference to nflateEnd' /usr/lib/libmagic.so: undefined reference to nflateInit2_' It seems to lack of the libz. So I re-compiled by `-lz': gcc test.c -o test -lmagic -lz. It's no any linking errors. Finally, I modified the `config.m4' in `/usr/ports/sysutils/pecl-fileinfo/work/Fileinfo-0.2': --- config.m4.bak Mon Nov 8 02:32:59 2004 +++ config.m4 Mon Nov 8 02:33:21 2004 @@ -36,7 +36,7 @@ ],[ AC_MSG_ERROR([wrong magic lib version or lib not found]) ],[ - -L$FILEINFO_DIR/lib -lm + -L$FILEINFO_DIR/lib -lm -lz ]) MAGIC_MIME_LOCATIONS="/usr/local/share/file/magic /usr/share/file/magic /etc/magic" And then I configured and built successfully. I can't ensure that it will work fine at runtime. I just hope that this information is helpful. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411071838.iA7IcIXb015098>