Re: [Dovecot] compiling dovecot on aix gcc 3.3.2
Hello funkypunky drunky,
on AIX dovecot plugins (which are shared objects = .so) are a little bit problematic. It is not enough to activate run time linking by using -brtl and make the main program (dovecot) to be able to use shared objects. When a share object does function calls back into the main program, all these functions (=symbols) in dovecot have to be explicitly exported. Otherwise you see "signal 11" or so.
Because this is very fiddly, there is a linker flag -bexpall to export all symbols of the main program (dovecot)... but this does seemingly not work with symbols defined in static libraries (.a).
While dovecot build creates static libraries to keep the linker command line small, but does *not* generate export files (.exp) containing the libraries globals symbols, the compile time linker does not known anything about them. I think, if dovecot build would use libtool to create the libraries, libtool would export the libraries symbols to fix this.
And this is, what my script does. It looks on the compiler command line for library file (.a) and exports all global symbols to an .exp file. The paths of these .exp files are appended to the original compiler command line and so -bexpall knows about the globale symbols defined in the libraries and is able to export them.
I don't know if this information is useful for you, because you're using gcc. But if you are using AIX ld (instead of gnu ld) you have to deal with this problem, I think.
Regards, Ralf
funkypunky drunky schrieb:
Hi Ralf I check your script. But i cannot udnerstand what you do. R u trying to export the library of the dovecot? I cannot go deeper. Anyway would you like to tell what did you do with XLC compiler. Maybe i can setup the analogy of it when using gcc instead of XLC. Best regards.
2007/3/27, Ralf Becker
mailto:beckerr@fh-trier.de>: Hello! Have you tried to export all symbols defined in lib archives generated while dovecot is build? I've had this problem on aix with xlC and solved it by writing an compiler script for doing that. See http://www.dovecot.org/list/dovecot/2007-February/019226.html and http://wiki.dovecot.org/AixPluginsSupport Regards, Ralf Timo Sirainen schrieb am 26.03.2007 21:08: > On Mon, 2007-03-26 at 09:24 +0300, funkypunky drunky wrote: >> I pasted the output of gdb. I hope it is usefull. Thanx >> >> This GDB was configured as "powerpc-ibm-aix5.1.0.0"... >> Core was generated by `imap'. >> Program terminated with signal 11, Segmentation fault. >> #0 0xd1a468cc in i_malloc () >> from /usr/local/lib/dovecot/imap/lib10_quota_plugin.so >> (gdb) bt full >> #0 0xd1a468cc in i_malloc () >> from /usr/local/lib/dovecot/imap/lib10_quota_plugin.so >> No symbol table info available. >> #1 0xd1a47cc8 in quota_init () at quota.c:32 > > So it crashes at the first Dovecot function it tries to call. Perhaps > the imap binary isn't exporting the symbols, or something like that. > I've no idea. Anyway it is most likely related to some linking or > compiling flags (or the linker/compiler itself). > -- ______________________________________________________________________ Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier Mail: beckerr@fh-trier.de <mailto:beckerr@fh-trier.de> Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available> ______________________________________________________________________ Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
--
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier
Mail: beckerr@fh-trier.de Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
Hello Ralf, Ohh thanks for your reply and i start to understand what is going on. You tell everything very well. It is amazing. After i read your mail, I export a variable export LDFLAGS="-Wl,-brtl" and now i find shared object files (.so) in their proper places after compilation. At first glance everything seems ok but when i tried to start dovecot Edlopen(/usr/local/lib/dovecot/imap/lib10_quota_plugin.so) failed: rtld: 0712-001 Symbol i_malloc was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_strdup was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol default_pool was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol mail_storage_get_mailbox_path was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_info was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol mountpoint_get was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_error was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. Additional errors occurred but are not reported. Error: imap dump-capability process returned 89
This symbols are not found. Now i get happy that i see the same error message as you but the thing that i cannot understand these .exp files. I have these exp files in their places, and they are created by aix linker. (I am using aix linker. IBM doesnt advice using gnu linker http://www-128.ibm.com/developerworks/aix/library/au-gnu.html) ./dovecot-1.0.rc28/src/plugins/acl/.libs/lib01_acl_plugin.exp ./dovecot-1.0.rc28/src/plugins/convert/.libs/lib20_convert_plugin.exp ./dovecot-1.0.rc28/src/plugins/quota/.libs/lib10_quota_plugin.exp ./dovecot-1.0.rc28/src/plugins/imap-quota/.libs/lib11_imap_quota_plugin.exp ./dovecot-1.0.rc28 /src/plugins/lazy-expunge/.libs/lib02_lazy_expunge_plugin.exp ./dovecot-1.0.rc28/src/plugins/mail-log/.libs/lib20_mail_log_plugin.exp ./dovecot-1.0.rc28/src/plugins/trash/.libs/lib11_trash_plugin.exp Do u mean that i have to point these exp files with linker flag -bexpall .
From your script i can not understand. Maybe you can give an example with export LDFLAGS="bexpall bla bla" Thanx and best regards.
2007/3/28, Ralf Becker beckerr@fh-trier.de:
Hello funkypunky drunky,
on AIX dovecot plugins (which are shared objects = .so) are a little bit problematic. It is not enough to activate run time linking by using -brtl and make the main program (dovecot) to be able to use shared objects. When a share object does function calls back into the main program, all these functions (=symbols) in dovecot have to be explicitly exported. Otherwise you see "signal 11" or so.
Because this is very fiddly, there is a linker flag -bexpall to export all symbols of the main program (dovecot)... but this does seemingly not work with symbols defined in static libraries (.a).
While dovecot build creates static libraries to keep the linker command line small, but does *not* generate export files (.exp) containing the libraries globals symbols, the compile time linker does not known anything about them. I think, if dovecot build would use libtool to create the libraries, libtool would export the libraries symbols to fix this.
And this is, what my script does. It looks on the compiler command line for library file (.a) and exports all global symbols to an .exp file. The paths of these .exp files are appended to the original compiler command line and so -bexpall knows about the globale symbols defined in the libraries and is able to export them.
I don't know if this information is useful for you, because you're using gcc. But if you are using AIX ld (instead of gnu ld) you have to deal with this problem, I think.
Regards, Ralf
Hi Ralf I check your script. But i cannot udnerstand what you do. R u trying to export the library of the dovecot? I cannot go deeper. Anyway would you like to tell what did you do with XLC compiler. Maybe i can setup the analogy of it when using gcc instead of XLC. Best regards.
2007/3/27, Ralf Becker
:
Hello! Have you tried to export all symbols defined in lib archives
generated while dovecot is build? I've had this problem on aix with xlC and solved it by writing an compiler script for doing that.
See http://www.dovecot.org/list/dovecot/2007-February/019226.html and http://wiki.dovecot.org/AixPluginsSupport Regards, Ralf Timo Sirainen schrieb am 26.03.2007 21:08: > On Mon, 2007-03-26 at 09:24 +0300, funkypunky drunky wrote: >> I pasted the output of gdb. I hope it is usefull. Thanx >> >> This GDB was configured as "powerpc-ibm-aix5.1.0.0"... >> Core was generated by `imap'. >> Program terminated with signal 11, Segmentation fault. >> #0 0xd1a468cc in i_malloc () >> from /usr/local/lib/dovecot/imap/lib10_quota_plugin.so >> (gdb) bt full >> #0 0xd1a468cc in i_malloc () >> from /usr/local/lib/dovecot/imap/lib10_quota_plugin.so >> No symbol table info available. >> #1 0xd1a47cc8 in quota_init () at quota.c:32 > > So it crashes at the first Dovecot function it tries to call.
Perhaps > the imap binary isn't exporting the symbols, or something like
funkypunky drunky schrieb: that.
> I've no idea. Anyway it is most likely related to some linking or > compiling flags (or the linker/compiler itself). > --
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier Mail: beckerr@fh-trier.de <mailto:beckerr@fh-trier.de> Fon: +49 651 8103
499
WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
--
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier
Mail: beckerr@fh-trier.de Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
Hello funkypunky drunky,
this is an example how the script rewrite the command line when the dovecot-imap binary is being linked:
Makefile calls libtool with:
../../libtool --tag=CC --mode=link /usr/local/src/mail/src/bin/dovecot-cc -qlanglvl=ansi -g -export-dynamic -bexpall -brtl -L/usr/local/lib -L/usr/local/lib -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a ../lib/mountpoint.o -liconv
libtool calls dovecot-cc with:
/usr/local/src/mail/src/bin/dovecot-cc -qlanglvl=ansi -g -bexpall -brtl -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib/mountpoint.o -L/usr/local/lib ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a -liconv
dovecot-cc calls /usr/bin/xlc with:
/usr/bin/xlc -qlanglvl=ansi -g -bexpall -brtl -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib/mountpoint.o -L/usr/local/lib ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a -liconv ../lib-sql/libsql.a -bE:.libs/libstorage-register.exp -bE:.libs/libstorage_maildir.exp -bE:.libs/libstorage_mbox.exp -bE:.libs/libstorage_dbox.exp -bE:.libs/libstorage_index.exp -bE:.libs/libindex.exp -bE:.libs/libstorage.exp -bE:.libs/libstorage_subscription_file.exp -bE:.libs/libimap.exp -bE:.libs/libmail.exp -bE:.libs/libdict.exp -bE:.libs/libcharset.exp -bE:.libs/liblib.exp -bE:.libs/libsql.exp
Notice the "-bE:..." lines. These lines are appended by dovecot-cc to initialize all globale symbols defined in libraries used to link imap. The .exp files are generate on the fly by dovecot-cc.
The Library ../lib-sql/libsql.a was also being inserted, because of known dependencies.
Regards, Ralf
funkypunky drunky schrieb:
Hello Ralf, Ohh thanks for your reply and i start to understand what is going on. You tell everything very well. It is amazing. After i read your mail, I export a variable export LDFLAGS="-Wl,-brtl" and now i find shared object files (.so) in their proper places after compilation. At first glance everything seems ok but when i tried to start dovecot Edlopen(/usr/local/lib/dovecot/imap/lib10_quota_plugin.so) failed: rtld: 0712-001 Symbol i_malloc was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_strdup was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol default_pool was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol mail_storage_get_mailbox_path was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_info was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol mountpoint_get was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_error was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. Additional errors occurred but are not reported. Error: imap dump-capability process returned 89
This symbols are not found. Now i get happy that i see the same error message as you but the thing that i cannot understand these .exp files. I have these exp files in their places, and they are created by aix linker. (I am using aix linker. IBM doesnt advice using gnu linker http://www-128.ibm.com/developerworks/aix/library/au-gnu.html) ./dovecot-1.0.rc28/src/plugins/acl/.libs/lib01_acl_plugin.exp ./dovecot-1.0.rc28/src/plugins/convert/.libs/lib20_convert_plugin.exp ./dovecot-1.0.rc28/src/plugins/quota/.libs/lib10_quota_plugin.exp ./dovecot-1.0.rc28/src/plugins/imap-quota/.libs/lib11_imap_quota_plugin.exp ./dovecot-1.0.rc28 /src/plugins/lazy-expunge/.libs/lib02_lazy_expunge_plugin.exp ./dovecot-1.0.rc28/src/plugins/mail-log/.libs/lib20_mail_log_plugin.exp ./dovecot-1.0.rc28/src/plugins/trash/.libs/lib11_trash_plugin.exp Do u mean that i have to point these exp files with linker flag -bexpall . From your script i can not understand. Maybe you can give an example with export LDFLAGS="bexpall bla bla" Thanx and best regards.
--
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier
Mail: beckerr@fh-trier.de Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
Hi ralf; In spite your incrediable help i cannot compile the plugin support of dovecot. It means i have to use dovecot without imap quota extension. I feel a little dummy but i cannot compile dovecot plugins. But if there is someone who compile the dovecot plugins on aix with gcc, i am look forward to receiving some help. Thanx for everything until now. C u later.
2007/3/29, Ralf Becker beckerr@fh-trier.de:
Hello funkypunky drunky,
this is an example how the script rewrite the command line when the dovecot-imap binary is being linked:
- Makefile calls libtool with:
../../libtool --tag=CC --mode=link /usr/local/src/mail/src/bin/dovecot-cc -qlanglvl=ansi -g -export-dynamic -bexpall -brtl -L/usr/local/lib -L/usr/local/lib -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a ../lib/mountpoint.o -liconv
- libtool calls dovecot-cc with:
/usr/local/src/mail/src/bin/dovecot-cc -qlanglvl=ansi -g -bexpall -brtl -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib/mountpoint.o -L/usr/local/lib ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a -liconv
- dovecot-cc calls /usr/bin/xlc with:
/usr/bin/xlc -qlanglvl=ansi -g -bexpall -brtl -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib/mountpoint.o -L/usr/local/lib ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a -liconv ../lib-sql/libsql.a -bE:.libs/libstorage-register.exp -bE:.libs/libstorage_maildir.exp -bE:.libs/libstorage_mbox.exp -bE:.libs/libstorage_dbox.exp -bE:.libs/libstorage_index.exp -bE:.libs/libindex.exp -bE:.libs/libstorage.exp -bE:.libs/libstorage_subscription_file.exp -bE:.libs/libimap.exp -bE:.libs/libmail.exp -bE:.libs/libdict.exp -bE:.libs/libcharset.exp -bE:.libs/liblib.exp -bE:.libs/libsql.exp
Notice the "-bE:..." lines. These lines are appended by dovecot-cc to initialize all globale symbols defined in libraries used to link imap. The .exp files are generate on the fly by dovecot-cc.
The Library ../lib-sql/libsql.a was also being inserted, because of known dependencies.
Regards, Ralf
funkypunky drunky schrieb:
Hello Ralf, Ohh thanks for your reply and i start to understand what is going on. You tell everything very well. It is amazing. After i read your mail, I export a variable export LDFLAGS="-Wl,-brtl" and now i find shared object files (.so) in their proper places after compilation. At first glance everything seems ok but when i tried to start dovecot Edlopen(/usr/local/lib/dovecot/imap/lib10_quota_plugin.so) failed: rtld: 0712-001 Symbol i_malloc was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_strdup was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol default_pool was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol mail_storage_get_mailbox_path was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_info was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol mountpoint_get was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol i_error was referenced from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a runtime definition of the symbol was not found. Additional errors occurred but are not reported. Error: imap dump-capability process returned 89
This symbols are not found. Now i get happy that i see the same error message as you but the thing that i cannot understand these .exp files. I have these exp files in their places, and they are created by aix linker. (I am using aix linker. IBM doesnt advice using gnu linker http://www-128.ibm.com/developerworks/aix/library/au-gnu.html) ./dovecot-1.0.rc28/src/plugins/acl/.libs/lib01_acl_plugin.exp ./dovecot-1.0.rc28/src/plugins/convert/.libs/lib20_convert_plugin.exp ./dovecot-1.0.rc28/src/plugins/quota/.libs/lib10_quota_plugin.exp ./dovecot-1.0.rc28 /src/plugins/imap-quota/.libs/lib11_imap_quota_plugin.exp ./dovecot-1.0.rc28 /src/plugins/lazy-expunge/.libs/lib02_lazy_expunge_plugin.exp ./dovecot-1.0.rc28/src/plugins/mail-log/.libs/lib20_mail_log_plugin.exp ./dovecot-1.0.rc28/src/plugins/trash/.libs/lib11_trash_plugin.exp Do u mean that i have to point these exp files with linker flag -bexpall . From your script i can not understand. Maybe you can give an example with export LDFLAGS="bexpall bla bla" Thanx and best regards.
--
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier
Mail: beckerr@fh-trier.de Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
You're welcome :-)
Maybe you're interested in a binary distribution build on AIX-5.2 for testing?
I've placed one here: http://www.fh-trier.de/~beckerr/dovecot/
The binary is build with xlc using ./configure --with-ssl-dir=/usr/local --with-ldap and openldap version 2.3
See dump -H /usr/local/libexec/dovecot/imap and dump -H /usr/local/libexec/dovecot/dovecot-auth for other dependencies.
Regards, Ralf
funkypunky drunky schrieb am 05.04.2007 08:00:
Hi ralf; In spite your incrediable help i cannot compile the plugin support of dovecot. It means i have to use dovecot without imap quota extension. I feel a little dummy but i cannot compile dovecot plugins. But if there is someone who compile the dovecot plugins on aix with gcc, i am look forward to receiving some help. Thanx for everything until now. C u later.
2007/3/29, Ralf Becker
mailto:beckerr@fh-trier.de>: Hello funkypunky drunky, this is an example how the script rewrite the command line when the dovecot-imap binary is being linked: 1) Makefile calls libtool with: ../../libtool --tag=CC --mode=link /usr/local/src/mail/src/bin/dovecot-cc -qlanglvl=ansi -g -export-dynamic -bexpall -brtl -L/usr/local/lib -L/usr/local/lib -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib-storage/register/libstorage- register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a ../lib/mountpoint.o -liconv 2) libtool calls dovecot-cc with: /usr/local/src/mail/src/bin/dovecot-cc -qlanglvl=ansi -g -bexpall -brtl -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib/mountpoint.o -L/usr/local/lib ../lib-storage/register/libstorage- register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a -liconv 3) dovecot-cc calls /usr/bin/xlc with: /usr/bin/xlc -qlanglvl=ansi -g -bexpall -brtl -o imap cmd-append.o cmd-capability.o cmd-check.o cmd-close.o cmd-copy.o cmd-create.o cmd-delete.o cmd-examine.o cmd-expunge.o cmd-fetch.o cmd-idle.o cmd-list.o cmd-logout.o cmd-lsub.o cmd-namespace.o cmd-noop.o cmd-rename.o cmd-search.o cmd-select.o cmd-sort.o cmd-status.o cmd-store.o cmd-subscribe.o cmd-thread.o cmd-uid.o cmd-unselect.o cmd-unsubscribe.o client.o commands.o commands-util.o imap-expunge.o imap-fetch.o imap-fetch-body.o imap-messageset.o imap-search.o imap-sort.o imap-sync.o imap-thread.o mail-storage-callbacks.o main.o namespace.o ../lib/mountpoint.o -L/usr/local/lib ../lib-storage/register/libstorage-register.a ../../src/lib-storage/index/maildir/libstorage_maildir.a ../../src/lib-storage/index/mbox/libstorage_mbox.a ../../src/lib-storage/index/dbox/libstorage_dbox.a ../../src/lib-storage/index/libstorage_index.a ../../src/lib-index/libindex.a ../lib-storage/libstorage.a ../lib-storage/subscription-file/libstorage_subscription_file.a ../lib-imap/libimap.a ../lib-mail/libmail.a ../lib-dict/libdict.a ../lib-charset/libcharset.a ../lib/liblib.a -liconv ../lib-sql/libsql.a -bE:.libs/libstorage-register.exp -bE:.libs/libstorage_maildir.exp -bE:.libs/libstorage_mbox.exp -bE:.libs/libstorage_dbox.exp -bE:.libs/libstorage_index.exp -bE:.libs/libindex.exp -bE:.libs/libstorage.exp -bE:.libs/libstorage_subscription_file.exp -bE:.libs/libimap.exp -bE:.libs/libmail.exp -bE:.libs/libdict.exp -bE:.libs/libcharset.exp -bE:.libs/liblib.exp -bE:.libs/libsql.exp Notice the "-bE:..." lines. These lines are appended by dovecot-cc to initialize all globale symbols defined in libraries used to link imap. The .exp files are generate on the fly by dovecot-cc. The Library ../lib-sql/libsql.a was also being inserted, because of known dependencies. Regards, Ralf funkypunky drunky schrieb: > Hello Ralf, > Ohh thanks for your reply and i start to understand what is going on. You > tell everything very well. It is amazing. After i read your mail, I > export a > variable > export LDFLAGS="-Wl,-brtl" and now i find shared object files (.so) in > their proper places after compilation. At first glance everything seems ok > but when i tried to start dovecot > Edlopen(/usr/local/lib/dovecot/imap/lib10_quota_plugin.so) failed: rtld: > 0712-001 Symbol i_malloc was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > rtld: 0712-001 Symbol i_strdup was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > rtld: 0712-001 Symbol default_pool was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > rtld: 0712-001 Symbol mail_storage_get_mailbox_path was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > rtld: 0712-001 Symbol i_info was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > rtld: 0712-001 Symbol mountpoint_get was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > rtld: 0712-001 Symbol i_error was referenced > from module /usr/local/lib/dovecot/imap/lib10_quota_plugin.so(), but a > runtime definition > of the symbol was not found. > Additional errors occurred but are not reported. > Error: imap dump-capability process returned 89 > > This symbols are not found. Now i get happy that i see the same error > message as you but the thing that i cannot understand these .exp files. I > have these exp files in their places, and they are created by aix > linker. (I > am using aix linker. IBM doesnt advice using gnu linker > http://www-128.ibm.com/developerworks/aix/library/au-gnu.html) > ./dovecot-1.0.rc28/src/plugins/acl/.libs/lib01_acl_plugin.exp > ./dovecot-1.0.rc28/src/plugins/convert/.libs/lib20_convert_plugin.exp > ./dovecot- 1.0.rc28/src/plugins/quota/.libs/lib10_quota_plugin.exp > ./dovecot-1.0.rc28/src/plugins/imap-quota/.libs/lib11_imap_quota_plugin.exp > ./dovecot-1.0.rc28 > /src/plugins/lazy-expunge/.libs/lib02_lazy_expunge_plugin.exp > ./dovecot-1.0.rc28/src/plugins/mail-log/.libs/lib20_mail_log_plugin.exp > ./dovecot-1.0.rc28/src/plugins/trash/.libs/lib11_trash_plugin.exp > Do u mean that i have to point these exp files with linker flag -bexpall . > From your script i can not understand. Maybe you can give an example with > export LDFLAGS="bexpall bla bla" > Thanx and best regards. > -- ______________________________________________________________________ Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier Mail: beckerr@fh-trier.de <mailto:beckerr@fh-trier.de> Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available> ______________________________________________________________________ Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
--
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier
Mail: beckerr@fh-trier.de Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)
participants (2)
-
funkypunky drunky
-
Ralf Becker