Error compiling courier-imap (problems with SSL/TLS)

Error compiling courier-imap (problems with SSL/TLS)

am 09.02.2007 22:01:49 von gamito

Hi,

Maybe this is not the proper place to put his question, but the=20
courier-imap mailing list is comfortably numb.

So, i thought you people could give me an hand on this.

I'm getting several errors compiling courier-imap (they follow my=20
signature).

They're SSL/TLS related.
I have openssl installed in /usr/local/ssl

Before running make, i'v executed:
$ export CPPFLAGS=3D"-I/usr/local/ssl/include"
$ export LDFLAGS=3D"-L/usr/local/ssl/lib"

Any help would be appreciated.

Warm Regards,
M=E1rio Gamito
--=20
make[3]: Entering directory `/usr/local/src/courier-imap-4.1.2/tcpd'
Linking couriertls
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x38): In function=20
`dlfcn_load ':
: undefined reference to `dlopen'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xa0): In function=20
`dlfcn_load ':
: undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xc9): In function=20
`dlfcn_load ':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x13e): In function=20
`dlfcn_unl oad':
: undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x1f5): In function=20
`dlfcn_bin d_var':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x241): In function=20
`dlfcn_bin d_var':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x2d5): In function=20
`dlfcn_bin d_func':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x321): In function=20
`dlfcn_bin d_func':
: undefined reference to `dlerror'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x462): In function=20
`rsa_callback ':
/usr/local/src/courier-imap-4.1.2/tcpd/libcouriertls.c:216: undefined=20
reference to `RSA_generate_key'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x686): In function=20
`process_rsac ertfile':
/usr/local/src/courier-imap-4.1.2/tcpd/libcouriertls.c:274: undefined=20
reference to `SSL_CTX_use_certificate_chain_file'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x697):/usr /local/src/=
courier-ima
p-4.1.2/tcpd/libcouriertls.c:280: undefined reference to=20
`SSL_CTX_use_RSAPrivate Key_file'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x6f7): In function=20
`process_dhce rtfile':
/usr/local/src/courier-imap-4.1.2/tcpd/libcouriertls.c:299: undefined=20
reference to `SSL_CTX_use_certificate_chain_file'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x798):/usr /local/src/=
courier-ima
p-4.1.2/tcpd/libcouriertls.c:328: undefined reference to=20
`SSL_CTX_use_PrivateKey _file'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0xa85): In function=20
`tls_create':
/usr/local/src/courier-imap-4.1.2/tcpd/libcouriertls.c:405: undefined=20
reference to `SSL_load_error_strings'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0xa8a):/usr /local/src/=
courier-ima
p-4.1.2/tcpd/libcouriertls.c:406: undefined reference to=20
`SSL_library_init'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0xaf4):/usr /local/src/=
courier-ima
p-4.1.2/tcpd/libcouriertls.c:421: undefined reference to=20
`TLSv1_method'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0xb19):/usr /local/src/=
courier-ima
p-4.1.2/tcpd/libcouriertls.c:419: undefined reference to=20
`SSLv2_method'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0xf62):/usr /local/src/=
courier-ima
p-4.1.2/tcpd/libcouriertls.c:421: undefined reference to=20
`SSLv23_method'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x106a): In function=20
`cache_add':
/usr/local/src/courier-imap-4.1.2/tcpd/libcouriertls.c:604: undefined=20
reference to `i2d_SSL_SESSION'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x10e1):/us r/local/src=
/courier-im
ap-4.1.2/tcpd/libcouriertls.c:621: undefined reference to=20
`i2d_SSL_SESSION'
/.libs/libcouriertls.a(libcouriertls.o)(.text+0x122d): In function=20
`get_func':
/usr/local/src/courier-imap-4.1.2/tcpd/libcouriertls.c:694: undefined=20
reference to `d2i_SSL_SESSION'
collect2: ld returned 1 exit status
make[3]: *** [couriertls] Error 1
make[3]: Leaving directory `/usr/local/src/courier-imap-4.1.2/tcpd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/src/courier-imap-4.1.2/tcpd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/courier-imap-4.1.2'
make: *** [all] Error 2
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Error compiling courier-imap (problems with SSL/TLS)

am 09.02.2007 23:31:21 von Glynn Clements

M=E1rio Gamito wrote:

> I'm getting several errors compiling courier-imap (they follow my=20
> signature).
>=20
> They're SSL/TLS related.
> I have openssl installed in /usr/local/ssl
>=20
> Before running make, i'v executed:
> $ export CPPFLAGS=3D"-I/usr/local/ssl/include"
> $ export LDFLAGS=3D"-L/usr/local/ssl/lib"
>=20
> Any help would be appreciated.

> ./.libs/libcouriertls.a(libcouriertls.o)(.text+0x697):/usr/l ocal/src/=
courier-ima
> p-4.1.2/tcpd/libcouriertls.c:280: undefined reference to=20
> `SSL_CTX_use_RSAPrivate Key_file'

Tip: if you need to paste error messages into an email message, don't
try to scrape the text out of a terminal window; redirect the "make"
output to a file, then either paste from that or, if your mail client
insists upon line-wrapping, include the relevant portion of the file
as an attachment.

Anyhow, judging from the error messages, I'd say that you need to add
-lssl (and possibly -ldl) to the linking flags.

--=20
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Error compiling courier-imap (problems with SSL/TLS)

am 09.02.2007 23:39:23 von gamito

Hi,

Thank you for your answer.

Glynn Clements wrote:
> Tip: if you need to paste error messages into an email message, don't
> try to scrape the text out of a terminal window; redirect the "make"
> output to a file, then either paste from that or, if your mail client
> insists upon line-wrapping, include the relevant portion of the file
> as an attachment.
Ok.


> Anyhow, judging from the error messages, I'd say that you need to add
> -lssl (and possibly -ldl) to the linking flags.
Shoud it be this ?
CFLAGS =3D -g -O2 -lssl -ldl

If it is, i still get the error :(

Warm Regards,
M=E1rio Gamito


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Error compiling courier-imap (problems with SSL/TLS)

am 10.02.2007 01:11:48 von Glynn Clements

M=E1rio Gamito wrote:

> > Tip: if you need to paste error messages into an email message, don=
't
> > try to scrape the text out of a terminal window; redirect the "make=
"
> > output to a file, then either paste from that or, if your mail clie=
nt
> > insists upon line-wrapping, include the relevant portion of the fil=
e
> > as an attachment.
> Ok.
>=20
>=20
> > Anyhow, judging from the error messages, I'd say that you need to a=
dd
> > -lssl (and possibly -ldl) to the linking flags.
> Shoud it be this ?
> CFLAGS =3D -g -O2 -lssl -ldl

-l switches should normally go into either LDFLAGS or LOADLIBES.

--=20
Glynn Clements
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Error compiling courier-imap (problems with SSL/TLS)

am 10.02.2007 10:56:51 von brouits

-lssl -ldl should be _after_ the objects
i mean, the compilation line must look like
gcc -g -O2 $OBJECTS -ldl -lssl
these are not CFLAGS, bug LDFLAGS

On ven, 2007-02-09 at 22:39 +0000, Mário Gamito wrote:
> Hi,
>=20
> Shoud it be this ?
> CFLAGS =3D -g -O2 -lssl -ldl
>=20
> If it is, i still get the error :(
>=20
> Warm Regards,
> Mário Gamito
>=20


-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html