On 04/04/2007, at 15:49, Aaron Stone wrote:
First, take a look at the bottom of dbmailtypes.h. Is _db_params
listed
twice? I just noticed that it is in SVN, and I can't imagine why.
See if
removing that fixes the problem.
Just removing one of them didn't help, but...
But, more fundamentally, this shouldn't be in a header file, it should
be in a .c file. This header gets called into every object file, and
clearly the Mac OS X linker doesn't like that there's the same global
object explicitly defined in each object file.
Go ahead and remove the "db_paramt_t _db_params" from dbmailtypes.h,
then go into db.c and remove the "extern" from the definition of the
same. Then rebuild, and please report back if that gets you up and
running!
... removing *both* "db_paramt_t _db_params" statements from
dbmailtypes.h and the matching "extern" from db.c fixed it! (I hope
that removing both was what you meant me to do; if not, I found that
having one "extern db_paramt_t _db_params" in dbmailtypes.h also
worked.) I've encountered the same error while trying to create
other ports (e.g. libsieve), and it seems that the problem only
occurs when gcc is called on Mac OS X with the -dynamiclib flag; for
example the successful build (after making the above patches), also
contained this output:
<snip>
/usr/bin/gcc-4.0 -g -O2 -I/opt/local/include/glib-2.0 -I/opt/local/
lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/
gmime-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/
include -I/opt/local/include -W -Wall -Wpointer-arith -Wstrict-
prototypes -o .libs/dbmail-util maintenance.o -L/opt/local/
lib ./.libs/libdbmail.dylib /opt/local/lib/libgmime-2.0.dylib /opt/
local/lib/libgmodule-2.0.dylib /opt/local/lib/libgthread-2.0.dylib -
lz /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/
libglib-2.0.dylib /opt/local/lib/libintl.dylib -lc /opt/local/lib/
libiconv.dylib
/usr/bin/ld: warning multiple definitions of symbol _quiet
maintenance.o definition of _quiet in section (__DATA,__data)
./.libs/libdbmail.dylib(libdbmail_la-dbmail-user.o) definition of _quiet
/usr/bin/ld: warning multiple definitions of symbol _verbose
maintenance.o definition of _verbose in section (__DATA,__data)
./.libs/libdbmail.dylib(libdbmail_la-dbmail-user.o) definition of
_verbose
/usr/bin/ld: warning multiple definitions of symbol _yes_to_all
maintenance.o definition of _yes_to_all in section (__DATA,__data)
./.libs/libdbmail.dylib(libdbmail_la-dbmail-user.o) definition of
_yes_to_all
/usr/bin/ld: warning multiple definitions of symbol _no_to_all
maintenance.o definition of _no_to_all in section (__DATA,__data)
./.libs/libdbmail.dylib(libdbmail_la-dbmail-user.o) definition of
_no_to_all
/usr/bin/ld: warning multiple definitions of symbol _reallyquiet
maintenance.o definition of _reallyquiet in section (__DATA,__data)
./.libs/libdbmail.dylib(libdbmail_la-dbmail-user.o) definition of
_reallyquiet
creating dbmail-util
</snip>
Since I'm here, I'll also mention one unrelated problem that I
noticed after the successful build: libdbmail was built with the
extension ".dylib", as appropriate for Mac OS X, but libauth_sql and
libsqlite were built with the extension ".so"; I imagine that this
should be fixed.
Thank you very much for your help and quick response.
Kind regards,
Maun Suang
--
Boey Maun Suang (Boey is my surname)
Mobile: +61 403 855 677
Email: [EMAIL PROTECTED]
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev