[MacPorts] #1508: libpng doesn't ranlib

MacPorts noreply at macports.org
Thu Mar 24 05:58:21 PDT 2016


#1508: libpng doesn't ranlib
-----------------------+---------------------
  Reporter:  pguyot@…  |      Owner:  waqar@…
      Type:  defect    |     Status:  closed
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  1.0
Resolution:  fixed     |   Keywords:
      Port:  libpng    |
-----------------------+---------------------
Changes (by ryandesign@…):

 * port:   => libpng


Old description:

> libpng doesn't ranlib libpng.a.
> So you can (randomly) get the following error:
> ld: table of contents for archive: /opt/local/lib/libpng.a is out of
> date; rerun
> ranlib(1) (can't load from it)
>
> Actually, it copies libpng.a during the installation phase without
> preserving
> the modification date.
>
> To get it everytime, do a port build, wait a minute or two and do a port
> install. Then try to link against libpng.a.
>
> The patch below provides a simple fix.
>
> Index: Portfile
> ===================================================================
> RCS file:
> /Volumes/src/cvs/od/proj/darwinports/dports/graphics/libpng/Portfile,v
> retrieving revision 1.26
> diff -u -r1.26 Portfile
> --- Portfile    16 Jan 2004 23:25:12 -0000      1.26
> +++ Portfile    9 Feb 2004 10:16:59 -0000
> @@ -55,3 +55,6 @@
>                 reinplace s|(prefix)/man|(prefix)/share/man| Makefile
>         }
>
> +post-destroot {
> +               system "ranlib ${destroot}${prefix}/lib/libpng.a"
> +       }

New description:

 libpng doesn't ranlib libpng.a.
 So you can (randomly) get the following error:
 {{{
 ld: table of contents for archive: /opt/local/lib/libpng.a is out of date;
 rerun ranlib(1) (can't load from it)
 }}}

 Actually, it copies libpng.a during the installation phase without
 preserving
 the modification date.

 To get it everytime, do a port build, wait a minute or two and do a port
 install. Then try to link against libpng.a.

 The patch below provides a simple fix.

 {{{
 Index: Portfile
 ===================================================================
 RCS file:
 /Volumes/src/cvs/od/proj/darwinports/dports/graphics/libpng/Portfile,v
 retrieving revision 1.26
 diff -u -r1.26 Portfile
 --- Portfile    16 Jan 2004 23:25:12 -0000      1.26
 +++ Portfile    9 Feb 2004 10:16:59 -0000
 @@ -55,3 +55,6 @@
                 reinplace s|(prefix)/man|(prefix)/share/man| Makefile
         }

 +post-destroot {
 +               system "ranlib ${destroot}${prefix}/lib/libpng.a"
 +       }
 }}}

--

-- 
Ticket URL: <https://trac.macports.org/ticket/1508#comment:4>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list