"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "dovecot-1.0.15/doc/wiki/AixPluginsSupport.txt" of archive dovecot-1.0.15.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 
    2 
    3 Plugins Support on AIX
    4 ======================
    5 
    6 
    7 /How to build Dovecot with plugins supported on AIX./ 
    8 Tested with: 
    9 
   10  * AIX 5.2, VAC 5.0.2 and Dovecot 1.0rc21 to 1.0rc26 
   11 
   12 
   13 The Problem
   14 ===========
   15 
   16 
   17 
   18  * When you trying to use plugins on AIX you seen error messages like this: 
   19 ---%<-------------------------------------------------------------------------
   20 imap(root): Error:
   21 dlopen(/usr/local/lib/dovecot/imap/lib20_zlib_plugin.so) failed:
   22 rtld: 0712-001 Symbol i_error was referenced
   23       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   24       but a runtime definition of the symbol was not found.
   25 rtld: 0712-001 Symbol i_stream_get_data was referenced
   26       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   27       but a runtime definition of the symbol was not found.
   28 rtld: 0712-001 Symbol i_stream_skip was referenced
   29       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   30       but a runtime definition of the symbol was not found.
   31 rtld: 0712-001 Symbol i_stream_seek was referenced
   32       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   33       but a runtime definition of the symbol was not found.
   34 rtld: 0712-001 Symbol i_stream_close was referenced
   35       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   36       but a runtime definition of the symbol was not found.
   37 rtld: 0712-001 Symbol i_panic was referenced
   38       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   39       but a runtime definition of the symbol was not found.
   40 rtld: 0712-001 Symbol pool_get_exp_grown_size was referenced
   41       from module /usr/local/lib/dovecot/imap/lib20_zlib_plugin.so(),
   42       but a runtime definition of the symbol was not found.
   43 Additional errors occurred but are not reported.
   44 ---%<-------------------------------------------------------------------------
   45 
   46  * .. produced by executing 
   47 ---%<-------------------------------------------------------------------------
   48 # MAIL_PLUGINS=zlib /usr/local/libexec/dovecot/imap
   49 ---%<-------------------------------------------------------------------------
   50 
   51 
   52 
   53 Compiler Script
   54 ===============
   55 
   56 
   57 
   58  * Create a compiler script to rewrite the /xlc/ command line on the fly: *dovecot-cc* 
   59 ---%<-------------------------------------------------------------------------
   60 #!/bin/bash
   61 
   62 xlc=/usr/bin/xlc
   63 ar=/bin/ar
   64 sed=/bin/sed
   65 
   66 dest=NOBINARY
   67 
   68 for i in "$@"; do
   69         case "$i" in
   70         '-o')  dest=;;
   71         *)     if [ -z "$dest" ]; then dest="$i"; break; fi;;
   72         esac
   73 done
   74 
   75 case "$dest" in
   76 imap-login) args1="../lib-charset/libcharset.a ../lib-mail/libmail.a -liconv";;
   77 imap)       args1="../lib-sql/libsql.a";;
   78 pop3)       args1="../lib-sql/libsql.a";;
   79 deliver)    args1="../lib-sql/libsql.a";;
   80 esac
   81 
   82 for i in "$@" $args1; do
   83         case "$i" in   
   84         */*.a) lib="${i##*/}"; obj=`$ar -t $i | $sed "s:^:${i%/*}/:"`;;
   85         *.a)   lib="$i";       obj=`$ar -t $i | $sed "s:^:./:"`;;
   86         *)     continue;;                       
   87         esac
   88         test -d .libs || mkdir .libs
   89         > .libs/${lib%.a}.exp      
   90         args2="$args2 -bE:.libs/${lib%.a}.exp"
   91 
   92         (set -x ; exec $xlc -qmkshrobj -qexpfile=.libs/${lib%.a}.exp $obj) 2>/dev/null
   93 done
   94 (set -x ; exec $xlc "$@" $args1 $args2)
   95 ---%<-------------------------------------------------------------------------
   96 
   97 
   98 
   99 Compiling Dovecot
  100 =================
  101 
  102 
  103 
  104  * Expand Dovecot: 
  105 ---%<-------------------------------------------------------------------------
  106 gzip -cd doveccot-1.0.rc21.tar.gz | tar xvf -
  107 ---%<-------------------------------------------------------------------------
  108 
  109  * Setup build environment: 
  110 ---%<-------------------------------------------------------------------------
  111 export CC=$PWD/dovecot-cc
  112 export LDFLAGS="-bexpall -brtl"
  113 ---%<-------------------------------------------------------------------------
  114 
  115  * Configure and build Dovecot 
  116 ---%<-------------------------------------------------------------------------
  117 cd dovecot-1.0.rc21
  118 bash configure 
  119 make
  120 ---%<-------------------------------------------------------------------------
  121 
  122  * Test a plugin (e.g. zlib) 
  123 ---%<-------------------------------------------------------------------------
  124 echo 0 logout | MAIL_PLUGIN_DIR=src/plugins/zlib/.libs/ MAIL_PLUGINS="zlib" src/imap/imap
  125 ---%<-------------------------------------------------------------------------
  126 you should see this: 
  127 ---%<-------------------------------------------------------------------------
  128 * PREAUTH [CAPABILITY IMAP4rev1 SASL-IR SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN NAMESPACE LOGIN-REFERRALS] Logged in as root
  129 * BYE Logging out
  130 0 OK Logout completed.
  131 imap(root): Info: Disconnected: Logged out
  132 ---%<-------------------------------------------------------------------------
  133 
  134  * Install Dovecot 
  135 ---%<-------------------------------------------------------------------------
  136 make install
  137 ---%<-------------------------------------------------------------------------
  138 
  139 (This file was created from the wiki on 2007-12-11 04:42)