[MacPorts] #1007: libpng.3.1.2.5.dylib installed with wrong "install_name"

MacPorts noreply at macports.org
Thu Mar 24 06:29:54 PDT 2016


#1007: libpng.3.1.2.5.dylib installed with wrong "install_name"
-------------------------+---------------------
  Reporter:  hideishi@…  |      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.3.1.2.5.dylib is compiled with wrong "install_name" such as
> " -install_name $destroot/$prefix/lib/libpng.3.dylib".
>
> This is because libpng.3.dylib is compiled at "destroot" stage,
> where libpng12.0.dylib is compiled at "build" stage hence correct
> install_name.
>
> At "destroot" stage, $destroot is added to the prefix of install path,
> so the "install_name" has $destroot as well.
>
> Proposed fix:
> A. change the makefile so that libpng.3.dylib is compiled at "build"
> stage.
> B. use the following patch which forces the "install_name" to
> $prefix/lib/libpng.3.dylib
>
> --- scripts/makefile.darwin~    Thu Oct  3 20:32:34 2002
> +++ scripts/makefile.darwin     Fri Oct 10 16:22:47 2003
> @@ -85,14 +85,14 @@
>
>  $(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
>         $(CC) -dynamiclib \
> -        -install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \
> +        -install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
>          -flat_namespace -undefined suppress \
>          -o $(LIBNAME).$(PNGVER).dylib \
>          $(OBJSDLL)
>
>  libpng.3.$(PNGMIN).dylib: $(OBJSDLL)
>         $(CC) -dynamiclib \
> -        -install_name $(DL)/libpng.3.dylib \
> +        -install_name $(LIBPATH)/libpng.3.dylib \
>          -current_version 3 -compatibility_version 3 \
>          -flat_namespace -undefined suppress \
>          -o libpng.3.$(PNGMIN).dylib \

New description:

 libpng.3.1.2.5.dylib is compiled with wrong "install_name" such as
 " -install_name $destroot/$prefix/lib/libpng.3.dylib".

 This is because libpng.3.dylib is compiled at "destroot" stage,
 where libpng12.0.dylib is compiled at "build" stage hence correct
 install_name.

 At "destroot" stage, $destroot is added to the prefix of install path,
 so the "install_name" has $destroot as well.

 Proposed fix:
 A. change the makefile so that libpng.3.dylib is compiled at "build"
 stage.
 B. use the following patch which forces the "install_name" to
 $prefix/lib/libpng.3.dylib

 {{{
 --- scripts/makefile.darwin~    Thu Oct  3 20:32:34 2002
 +++ scripts/makefile.darwin     Fri Oct 10 16:22:47 2003
 @@ -85,14 +85,14 @@

  $(LIBNAME).$(PNGVER).dylib: $(OBJSDLL)
         $(CC) -dynamiclib \
 -        -install_name $(DL)/$(LIBNAME).$(PNGMAJ).dylib \
 +        -install_name $(LIBPATH)/$(LIBNAME).$(PNGMAJ).dylib \
          -flat_namespace -undefined suppress \
          -o $(LIBNAME).$(PNGVER).dylib \
          $(OBJSDLL)

  libpng.3.$(PNGMIN).dylib: $(OBJSDLL)
         $(CC) -dynamiclib \
 -        -install_name $(DL)/libpng.3.dylib \
 +        -install_name $(LIBPATH)/libpng.3.dylib \
          -current_version 3 -compatibility_version 3 \
          -flat_namespace -undefined suppress \
          -o libpng.3.$(PNGMIN).dylib \
 }}}

--

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


More information about the macports-tickets mailing list