port install postfix @2.9.2_0 +mysql55 fails to install in destroot

Bjarne D Mathiesen macintosh at mathiesen.info
Thu May 10 10:04:48 PDT 2012


OK ... I fixed the build problem ... now I've got problems with destroot :-(

Now, we've got the following in patch-cmake-install_layout.cmake.diff
+SET(INSTALL_LIBDIR_MACPORTS             "lib/@NAME@/mysql")
and in the postfix Portfile we've got
lappend AUXLIBS "-L${prefix}/lib/mysql55/mysql" -lmysqlclient -lz -lm
who are in complere agrement with each other.

However, at the start of the destroot phase I get :

DEBUG: Executing org.macports.destroot (postfix)
dyld: Library not loaded: /macports/lib/mysql55/libmysqlclient.18.dylib
  Referenced from:
/macports/var/macports/build/_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_mail_postfix/postfix/work/postfix-2.9.2/bin/postconf
  Reason: image not found

analysing this I find that
	/macports/lib/mysql55/libmysqlclient.18.dylib
is a value that has been hardcoded into :

bash-4.2$ find /macports/lib -name 'libmysqlclient*' \
| grep mysql55 \
| xargs -n1 grep '/macports/lib/mysql55/libmysqlclient.18.dylib'
Binary file /macports/lib/mysql55/mysql/libmysqlclient.18.dylib matches
Binary file /macports/lib/mysql55/mysql/libmysqlclient.dylib matches
Binary file /macports/lib/mysql55/mysql/libmysqlclient_r.18.dylib matches
Binary file /macports/lib/mysql55/mysql/libmysqlclient_r.dylib matches

bash-4.2$ grep -R '/macports/lib/mysql55/libmysqlclient.18.dylib' $(port
work postfix)/* | sed -E -e 's!.*work/!!'
postfix-2.9.2/bin/postalias matches
... all /bin files ...
postfix-2.9.2/bin/smtp-source matches
postfix-2.9.2/libexec/anvil matches
... all /libexec files ...
postfix-2.9.2/libexec/virtual matches
postfix-2.9.2/src/anvil/anvil matches
... all /src files ...
postfix-2.9.2/src/virtual/virtual matches

so something i clearly going wrong in mysql55

1) the libmysqlclient files are installed in
   ${prefix}/lib/mysql55/mysql
   as they are supposed to
2) the libmysqlclient files think they are installed in
   ${prefix}/lib/mysql55
   and are passing this value on to other programs :
bash-4.2$ port contents dovecot2 \
| xargs -n1 grep '/macports/lib/mysql55/libmysqlclient'
Binary file /macports/lib/dovecot/libdovecot-sql.0.dylib matches
Binary file /macports/lib/dovecot/libdovecot-sql.dylib matches
Binary file /macports/libexec/dovecot/auth matches
Binary file /macports/libexec/dovecot/dict matches

so, we'll have to
a) find where mysql55 inserts this incorrect value
*-or-*
b ) modify our install instruction to mysql55 as well as other program
accordingly

as to (a) that has left me completely stumped :-( I've been all over the
source code without being able to find exactly where this happens :-(

as to (b) I've got it working with simple changes to
	patch-cmake-install_layout.cmake.diff
	the postfix Portfile

so ... where do we go from here ??? (a) *-or-* (b)

This will of course have consequenses for our work in the mysql
migration project, but pixilla and I are all over that at present :-)

This might also have consequenses for how we install / handle mariadb
and percona, but I haven't yet looked into those two ports - yet

:-)
-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3


More information about the macports-dev mailing list