Opened 20 years ago

Closed 20 years ago

Last modified 8 years ago

#1508 closed defect (fixed)

libpng doesn't ranlib

Reported by: pguyot (Paul Guyot) Owned by: waqar@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: libpng

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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"
+       }

Change History (4)

comment:1 Changed 20 years ago by waqar@…

Resolution: fixed
Status: newclosed

Fix checked in. Thanks

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Milestone: Port Bugs
Priority: ExpectedNormal

The revision in which this was fixed was r5379.

comment:3 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:4 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Port: libpng added
Note: See TracTickets for help on using tickets.