For anybody else who needs to try to cross compile msmtp with static OpenSSl
libraries, the
solution is below. Obviously you will need to substitute your own cross compile
file locations.
Cross compile OpenSSL, but don't use the latest version it throws out errors
during msmtp cross,
the latest of the 0.9.8 seems OK.
export PATH=$PATH:/usr/local/xscale_be/bin
export cross=xscale-linux-
./Configure dist
make CC="${cross}gcc" AR="${cross}ar r" RANLIB="${cross}ranlib"
make is successful
It creates
libcrypto.a
libssl.a
libcrypto.pc
libssl.pc
Edit the .pc files to point to what will be the new locations
-----------------------------------------------
prefix=/usr/local/xscale_be/ssl
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
-----------------------------------------------
Create the folders needed
# mkdir /usr/local/xscale_be/ssl
# mkdir /usr/local/xscale_be/ssl/lib
# mkdir /usr/local/xscale_be/ssl/include
# mkdir /usr/local/xscale_be/ssl/lib/pkgconfig
Copy the files to the new folders
# cp /home/bryan/Desktop/openssl-0.9.8x/libcrypto.a /usr/local/xscale_be/ssl
# cp /home/bryan/Desktop/openssl-0.9.8x/libssl.a /usr/local/xscale_be/ssl
# cp /home/bryan/Desktop/openssl-0.9.8x/libcrypto.pc
/usr/local/xscale_be/ssl/lib/pkgconfig
# cp /home/bryan/Desktop/openssl-0.9.8x/libssl.pc
/usr/local/xscale_be/ssl/lib/pkgconfig
# cp -r /home/bryan/Desktop/openssl-0.9.8x/include/openssl/*
/usr/local/xscale_be/ssl/include
Cross compile msmtp
make distclean
export PATH=$PATH:/usr/local/xscale_be/bin
libssl_CFLAGS="-I/usr/local/xscale_be/ssl/include" libssl_LIBS="-s
-L/usr/local/xscale_be/ssl -lssl -lcrypto" ./configure --with-ssl=openssl
--with-libidn=no --host=xscale-linux
make
Gives a successful cross compile with static OpenSSL libraries, msmtp will be
in src folder.
msmtp goes from 225K to 919K.
Just one ever so slight problem for me, when I copied the new msmtp to the Moxa
and tried to email I still get
the 'segmentation fault' that I started with.
So do I try to learn how to cross compile GnuTLS instead and see if that fixes
the problem????
I will let you know.
Bryan
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
msmtp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msmtp-users