[MacPorts] #35042: cyrus-sasl2 +sql rev-upgrade problem in presence of non-macports libmysqlclient.dylib (was: cyrus-sasl2 +sql rev-upgrade problem)

MacPorts noreply at macports.org
Fri Sep 14 15:00:07 PDT 2012


#35042: cyrus-sasl2 +sql rev-upgrade problem in presence of non-macports
libmysqlclient.dylib
------------------------------+-------------------------
  Reporter:  robsonpeixoto@…  |      Owner:  jmpp@…
      Type:  defect           |     Status:  closed
  Priority:  Normal           |  Milestone:
 Component:  ports            |    Version:  2.1.1
Resolution:  invalid          |   Keywords:  rev-upgrade
      Port:  cyrus-sasl2      |
------------------------------+-------------------------
Changes (by cal@…):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 The problem was caused by the `libmysqlclient.18.dylib` file the build
 linked against. Linking against a library on Macs works like this:
  - find the library you want to link
  - Get its ID loadcommand (run otool -L on the file, it's the first line,
 usually an absolute path, as opposed to Linux, where the paths are usually
 relative)
  - Copy the path mentioned there into your binary
 So we know from the rev-upgrade output that this copied path is
 `libmysqlclient.18.dylib`, which is relative, which causes rev-upgrade to
 try and find a file `libmysqlclient.18.dylib` in whatever directory it
 runs in. It fails to locate this file and assumes the binary is broken.

 The problem doesn't occur with MacPorts `libmysqlclient.dylib`, because
 its ID loadcommand correctly contains the absolute path:
 {{{
 :) clemens at cSchlepptop:~$ otool -L
 /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib
 /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib:
         /opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib
 (compatibility version 18.0.0, current version 18.0.0)
 }}}

 Anyway, glad you could solve this.

-- 
Ticket URL: <https://trac.macports.org/ticket/35042#comment:8>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list