Hello,
as far as I understand, the systemwide libcom_err.a is non PIC, the
libcyrus_imap and libcyrus_sieve are PIC and it is not portable to
dymically link non-PIC libcom_err.a with PIC libcyrus_sieve . Yes, but
how to proceed in this case? Currently, Makefile.am states, that
libcyrus_imap depends on libcom_err, and when some application links
with libcyrus_imap, it automatically links with the system wide
libcom_err.a (implicit linking with shared libraries vs. explicit
linking when everything is statically built).
Does somebody know if it is portable to link the PIC executable (e.g.
imapd) with PIC libcyrus_sieve, and with non-PIC libcyrus_imap ?
Moreover, does it make any difference, if imapd links with
libcyrus_sieve and libcyrus_sieve links with libcom_err, or if imapd
links explicitly with both libcyrus_sieve and libcom_err ?
Със здраве
Дилян
Am 27.06.2012 08:31, schrieb Greg Banks:
On Wed, Jun 27, 2012, at 07:58 AM, Bron Gondwana wrote:
On Wed, Jun 27, 2012, at 08:54 AM, Greg Banks wrote:
On Wed, Jun 27, 2012, at 12:27 AM, Bron Gondwana wrote:
/usr/bin/ld.bfd.real: /usr/lib/libcom_err.a(error_message.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared
object; recompile with -fPIC
/usr/lib/libcom_err.a: could not read symbols: Bad value
So what am I doing wrong,
Nothing.
or in the alternative what is the build system
doing wrong?
There is a path through configure.ac which sets
COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a"
and COM_ERR_LIBS gets used to link against shared libraries in
Makefile.am
imap_libcyrus_imap_la_LIBADD = $(COM_ERR_LIBS) $(LIB_UUID)
...
sieve_libcyrus_sieve_la_LIBADD = $(COM_ERR_LIBS)
...
I would guess you did something like
./configure --with-com_err=/usr
but you should be able to get a better result by just dropping the
option entirely.
Ahh, yep - so I was! Looking better now :)
It's a bug; --with_com_err=/usr should be the same as no option. Raise
a bugzilla ticket.
libtool: install: warning: `sieve/libcyrus_sieve.la' has not been
installed in `/usr/cyrus-future/lib'
libtool: install: warning: `lib/libcyrus.la' has not been installed in
`/usr/cyrus-future/lib'
libtool: install: warning: `lib/libcyrus_min.la' has not been installed
in `/usr/cyrus-future/lib'
libtool: install: /usr/bin/install -c sieve/.libs/sievec
/usr/src/cyrus-future-build/cyrus/debian/cyrus-future/usr/cyrus-future/bin/sievec
but that's only a warning :)
Yeah, libtool warnings...grumble mumble...