NetBSD Problem Report #44527
From www@NetBSD.org Mon Feb 7 08:13:12 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 9E14C63B873
for <gnats-bugs@gnats.NetBSD.org>; Mon, 7 Feb 2011 08:13:12 +0000 (UTC)
Message-Id: <20110207081311.CB5E763B842@www.NetBSD.org>
Date: Mon, 7 Feb 2011 08:13:11 +0000 (UTC)
From: multix79@yahoo.com
Reply-To: multix79@yahoo.com
To: gnats-bugs@NetBSD.org
Subject: libpng does not provide standard names
X-Send-Pr-Version: www-1.0
>Number: 44527
>Category: pkg
>Synopsis: libpng does not provide standard names
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 07 08:15:00 +0000 2011
>Closed-Date: Mon Feb 07 09:23:42 +0000 2011
>Last-Modified: Mon Feb 07 09:23:42 +0000 2011
>Originator: Riccardo Mottola
>Release: 5.99
>Organization:
GNUstep
>Environment:
NetBSD grid 5.99.44 NetBSD 5.99.44 (nc6120) #0: Mon Jan 31 10:01:52 CET 2011 multix@tirith:/usr/obj/sys/arch/i386/compile/nc6120 i386
>Description:
Libpng from pkg installs in pkg, it will install its files using the version number as postfix (e.g. 15 in this case) both for the libraries as the headers.
ls -l /usr/pkg/lib/libpng15.*
-rw-r--r-- 1 root wheel 172936 Jan 29 18:29 /usr/pkg/lib/libpng15.a
-rwxr-xr-x 1 root wheel 997 Jan 29 18:29 /usr/pkg/lib/libpng15.la
lrwxr-xr-x 1 root wheel 18 Jan 29 18:29 /usr/pkg/lib/libpng15.so -> libpng15.so.15.1.0
lrwxr-xr-x 1 root wheel 18 Jan 29 18:29 /usr/pkg/lib/libpng15.so.15 -> libpng15.so.15.1.0
-rwxr-xr-x 1 root wheel 155106 Jan 29 18:29 /usr/pkg/lib/libpng15.so.15.1.0
includes:
drwxr-xr-x 2 root wheel 512 Jan 29 18:29 libpng15
>How-To-Repeat:
Install
png-1.5.1beta09 Library for manipulating PNG images
>Fix:
Many programs (not referring to other packages of pkgsrc, but to standard source packages) will look for the headers in <libpng/png.h> and use the linker flag "-lpng" which is perfectly reasonable.
I would suggest to either remove the renaming because the library sonames already have the version, major and minor, or add symbolic links. I suppose the renaming of the object and directories was done for a kind of "slotting".
The links should be similar to this:
libpng -> libpng15
for the headers
and
libpng.so -> lib15.so
libpng.so.15 -> libpng15.so
>Release-Note:
>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/44527: libpng does not provide standard names
Date: Mon, 07 Feb 2011 17:47:57 +0900
On Mon, 07 Feb 2011 17:15:01 +0900, <multix79@yahoo.com> wrote:
>> Fix:
> Many programs (not referring to other packages of pkgsrc, but to standard source packages) will look for the headers in <libpng/png.h> and use the linker flag "-lpng" which is perfectly reasonable.
I don't know such souce packages.
But it should use libpng-config, then it should be built with `libpng-config --cflags` and
linked with `libpng-config --ldflags'.
Then in source codes, include <png.h> instead of <libpng/png.h>.
If you want to use certain version of libpng, you should use libpng15-config instead.
It's the preferred approach.
> I would suggest to either remove the renaming because the library sonames already have the version, major and minor, or add symbolic links. I suppose the renaming of the object and directories was done for a kind of "slotting".
Do you know what will be happened if someone is linked with libpng.so, and the other one
is linked with libpng15.so, finally, those are linked with each other?
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 07 Feb 2011 09:23:42 +0000
State-Changed-Why:
As obache explained, programs should use libpng-config or pkg-config,
and most do.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.