From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 7 18:40:26 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EF2516A4CE for ; Sun, 7 Nov 2004 18:40:26 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CED543D4C for ; Sun, 7 Nov 2004 18:40:26 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) iA7IeQxU063270 for ; Sun, 7 Nov 2004 18:40:26 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iA7IeQQ5063268; Sun, 7 Nov 2004 18:40:26 GMT (envelope-from gnats) Resent-Date: Sun, 7 Nov 2004 18:40:26 GMT Resent-Message-Id: <200411071840.iA7IeQQ5063268@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Uranus Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5091316A4CE for ; Sun, 7 Nov 2004 18:38:29 +0000 (GMT) Received: from it.muds.net (220-134-153-8.HINET-IP.hinet.net [220.134.153.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id D454B43D46 for ; Sun, 7 Nov 2004 18:38:28 +0000 (GMT) (envelope-from uranus@it.muds.net) Received: from it.muds.net (localhost.muds.net [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by it.muds.net (Postfix) with ESMTP id 260276FA5 for ; Mon, 8 Nov 2004 02:38:19 +0800 (CST) Received: (from uranus@localhost) by it.muds.net (8.13.1/8.13.1/Submit) id iA7IcIXb015098; Mon, 8 Nov 2004 02:38:18 +0800 (CST) (envelope-from uranus) Message-Id: <200411071838.iA7IcIXb015098@it.muds.net> Date: Mon, 8 Nov 2004 02:38:18 +0800 (CST) From: Uranus To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/73647: Problem of building sysutils/pecl-fileinfo X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Uranus List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Nov 2004 18:40:26 -0000 >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: