* [ptxdist] ssmtp compile with ssl support fails with linker error
@ 2015-10-12 12:15 Oliver Graute
2015-10-12 14:23 ` Oliver Graute
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Graute @ 2015-10-12 12:15 UTC (permalink / raw)
To: ptxdist; +Cc: oliver.graute
Hello list,
I got the following linking error during ssmtp compile with ssl
support enabled. (without ssl support it works fine)
the error looks similar to the error which allready got fixed by this
patch for sstmp:
0004-configure-if-using-ssl-link-against-libcrypto-too.patch
Some Idea what I can do here? Is there another place to add -lcrypto?
Best Regards,
Oliver
In file included from ssmtp.c:38:0:
ssmtp.h:44:6: note: expected 'const unsigned char *' but argument is of type 'char *'
ssmtp.c: In function 'parse_options':
ssmtp.c:1740:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
ssmtp.c: In function 'crammd5':
ssmtp.c:628:10: warning: array subscript is above array bounds [-Warray-bounds]
arm-v5te-linux-gnueabi-gcc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DINET6=1 -DMD5AUTH=1 -DSSMTPCONFDIR=\"/etc/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/revaliases\" -g -O2 -Wall -c -o arpadate.o arpadate.c
arm-v5te-linux-gnueabi-gcc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DINET6=1 -DMD5AUTH=1 -DSSMTPCONFDIR=\"/etc/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/revaliases\" -g -O2 -Wall -c -o base64.o base64.c
arm-v5te-linux-gnueabi-gcc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DINET6=1 -DMD5AUTH=1 -DSSMTPCONFDIR=\"/etc/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/revaliases\" -g -O2 -Wall -c -o xgethostname.o xgethostname.c
arm-v5te-linux-gnueabi-gcc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DINET6=1 -DMD5AUTH=1 -DSSMTPCONFDIR=\"/etc/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/revaliases\" -g -O2 -Wall -c -o md5auth/md5c.o md5auth/md5c.c
arm-v5te-linux-gnueabi-gcc -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNSL=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DINET6=1 -DMD5AUTH=1 -DSSMTPCONFDIR=\"/etc/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/revaliases\" -g -O2 -Wall -c -o md5auth/hmac_md5.o md5auth/hmac_md5.c
arm-v5te-linux-gnueabi-gcc -o ssmtp ssmtp.o arpadate.o base64.o xgethostname.o md5auth/md5c.o md5auth/hmac_md5.o -lnsl -lssl
/opt/OSELAS.Toolchain-2012.12.0/arm-v5te-linux-gnueabi/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/lib/gcc/arm-v5te-linux-gnueabi/4.7.2/../../../../arm-v5te-linux-gnueabi/bin/ld: ssmtp.o: undefined reference to symbol 'X509_free'
/opt/OSELAS.Toolchain-2012.12.0/arm-v5te-linux-gnueabi/gcc-4.7.2-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/lib/gcc/arm-v5te-linux-gnueabi/4.7.2/../../../../arm-v5te-linux-gnueabi/bin/ld: note: 'X509_free' is defined in DSO /media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/sysroot-target/usr/lib/libcrypto.so.1.0.0 so try adding it to the linker command line
/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/sysroot-target/usr/lib/libcrypto.so.1.0.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [ssmtp] Error 1
make[1]: Leaving directory `/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/build-target/ssmtp-2.64'
make: *** [/media/data/bsp/dnt8209ptxdist_git/platform-dnt3202/state/ssmtp.compile] Error 2
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] ssmtp compile with ssl support fails with linker error
2015-10-12 12:15 [ptxdist] ssmtp compile with ssl support fails with linker error Oliver Graute
@ 2015-10-12 14:23 ` Oliver Graute
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Graute @ 2015-10-12 14:23 UTC (permalink / raw)
To: ptxdist
On 12/10/15, Oliver Graute wrote:
> Hello list,
>
> I got the following linking error during ssmtp compile with ssl
> support enabled. (without ssl support it works fine)
>
> the error looks similar to the error which allready got fixed by this
> patch for sstmp:
>
> 0004-configure-if-using-ssl-link-against-libcrypto-too.patch
>
> Some Idea what I can do here? Is there another place to add -lcrypto?
this solved my problem, I provide a patch mail either.
--- a/configure
+++ b/configure
@@ -1562,7 +1562,7 @@ if test x$enableval = xyes ; then
#define HAVE_SSL 1
EOF
- LIBS="$LIBS -lssl"
+ LIBS="$LIBS -lssl -lcrypto"
Best regards,
Oliver
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-12 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 12:15 [ptxdist] ssmtp compile with ssl support fails with linker error Oliver Graute
2015-10-12 14:23 ` Oliver Graute
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox