[MacPorts] #13441: gunits fails to build on OS X 10.5

MacPorts trac at macosforge.org
Thu Feb 28 20:54:46 PST 2008


#13441: gunits fails to build on OS X 10.5
------------------------------------------+---------------------------------
  Reporter:  edward.edmondson at port.ac.uk  |       Owner:  jmr at macports.org
      Type:  defect                       |      Status:  reopened        
  Priority:  Normal                       |   Milestone:  Port Bugs       
 Component:  ports                        |     Version:  1.5.2           
Resolution:                               |    Keywords:                  
------------------------------------------+---------------------------------
Changes (by ryandesign at macports.org):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 Bad. You've caused two problems:

 1. Before r34595, the port correctly linked with readline and ncurses from
 MacPorts (at least on my 10.4.11 Intel system with MacPorts 1.7.0 built
 from trunk):

 {{{
 $ otool -L /opt/local/bin/gunits
 /opt/local/bin/gunits:
         /opt/local/lib/libreadline.5.2.dylib (compatibility version 5.0.0,
 current version 5.2.0)
         /opt/local/lib/libncurses.5.dylib (compatibility version 5.0.0,
 current version 5.0.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 88.3.9)
 $
 }}}

 After r34595, it links with the system versions of those libraries, which
 is exactly what we don't want:

 {{{
 $ otool -L /opt/local/bin/gunits
 /opt/local/bin/gunits:
         /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current
 version 2.0.0)
         /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0,
 current version 5.4.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 88.3.9)
 $
 }}}

 The reason for this problem is this line that you added:

 {{{
 configure.ldflags -I${prefix}/lib
 }}}

 "`-I${prefix}/lib`" is not an appropriate value for LDFLAGS.
 "`-L${prefix}/lib`" is, but it's also the default. So this line should be
 removed again.

 I'm also not at all convinced that the other line from the patch needed to
 be added:

 {{{
 configure.cflags -I${prefix}/include
 }}}

 MacPorts already sets CPPFLAGS (but not CFLAGS) to "`-I${prefix}/include`"
 so this should not have been necessary, and wasn't for me on Tiger. (This
 feature may have been added to MacPorts base after this ticket was filed.)
 Can you confirm that this line really was necessary on Leopard with
 MacPorts 1.6.0? If the line is not necessary, it should be removed again.

 2. Before r34595, gunits correctly installed its info and manpages:

 {{{
 $ port contents gunits
 Port gunits contains:
   /opt/local/bin/gunits
   /opt/local/share/info/units.info
   /opt/local/share/man/man1/gunits.1.gz
   /opt/local/share/units.dat
 $
 }}}

 After r34595, it still installs them, but they're not registered as
 belonging to the port:

 {{{
 $ port contents gunits
 Port gunits contains:
   /opt/local/bin/gunits
   /opt/local/share/units.dat
 $ ls /opt/local/share/info/units.info /opt/local/share/man/man1/gunits.1
 /opt/local/share/info/units.info        /opt/local/share/man/man1/gunits.1
 $ port provides /opt/local/share/info/units.info
 /opt/local/share/man/man1/gunits.1
 /opt/local/share/info/units.info is not provided by a MacPorts port.
 /opt/local/share/man/man1/gunits.1 is not provided by a MacPorts port.
 $
 }}}

 This means that "`port uninstall`" will not uninstall them, which is bad.
 This happened because you changed the `--mandir` and `--infodir`
 arguments, which also had nothing to do with this ticket, so that change
 should not have been done in the context of this ticket regardless. Please
 change these lines back to the way they were. I don't 100% understand why
 it works, but I think it has to do with expanding the `${prefix}` variable
 at a later time so that it ends up being `${destroot}${prefix}` somehow.
 In any case we don't need to question why it works; we just need to not
 fiddle with parts of portfiles that work just fine.

 3. When you fix these problems, the port revision should be incremented so
 that anybody who built the port during the time that the portfile was
 broken will get the fixed version.

-- 
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13441#comment:5>
MacPorts </projects/macports>
Ports system for Mac OS


More information about the macports-tickets mailing list