Michal,

I apologize. It was late night and I should have waited till morning to write the report. Note that I read that link for the first time years ago, and I still do once in a while :)

Mostly, you figured out the issue. I use the mingw.mak recipe included in the src directory to compile my own stunnel with mingw32. However, there was a change in stunnel 5.25 affecting stunnel.c that breaks compilation with this makefile. See attached diff. I know you don't compile under windows, but please consider reverting that change to retain backward compatibility.

Thanks a lot for sharing your build scripts on Linux.

Regards,
Jose



On Thursday, November 5, 2015 4:14 AM, Michal Trojnara <Michal.Trojnara@mirt.net> wrote:


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 05.11.2015 05:17, Josealf.rm wrote:
> I tested stunnel 5.26b1 with gcc 4.85 under Windows. All fine
> except that I had to change the #include <openssl/applink.c> to
> <../ms/applink.c> as it was on previous releases.

I'm not sure what you mean by "gcc 4.85 under Windows".
I guess mingw, but it still doesn't give me enough information to
reproduce and fix the issue.  Please consider reading:
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

Trying to reproduce the issue you reported I managed to build stunnel
with Cygwin.  See the attached file for details.

The stunnel/OpenSSL build procedure for Windows has recently changed.
stunnel no longer uses the OpenSSL source tree, but rather the
installed files.  The problem is that OpenSSL does not install the
applink.c file required for Windows targets.  I guess this is an
OpenSSL bug.  My current script for cross-compiling OpenSSL on
Debian/Ubuntu is:

#!/bin/bash
set -e

case $1 in
    32)
        TARGET=i686
        MINGW=mingw
        ;;
    64)
        TARGET=x86_64
        MINGW=mingw64
        ;;
    *)
        echo "Usage: $0 {32|64}"
        exit 1
esac

./Configure \
    --cross-compile-prefix=${TARGET}-w64-mingw32- \
    --openssldir=/opt/openssl-${MINGW} \
    ${MINGW} shared
make
sudo make install
sudo cp ms/applink.c /opt/openssl-${MINGW}/include/openssl/

Best regards,
    Mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJWOx24AAoJEC78f/DUFuAUyGoP/R2vYPNpx6e0xhZPIGe18LAG
505b8IjfGbLH/5vm+oBGwZkMCIghaY2yj6qjLd6SaQFotyXJ1YoLh9AyDSf+sDIc
qNNvSLTbTI/0vHHR2dZFxjGUWoTlrm6hwecbHfT7nk5eI3mJF6zdBYLYRS0QTzdf
ropQJ6WSLG5SBALUxdM33/9Edgei+/AMjwBBCda4ctRzsgDrRZstgn/l5QgeI7OS
K/Iz2ihhELArpQ9ZD1VGCueGo78DGAvw/xQOld3OIF+jtzJ5YCm8qEm0i2oJ7jkh
0Ir2Hnm6/MQqMx8ftufo/c+BZHnarxRFwEfKd3j8JMvV1u7TMFOUq7T1h6j3iSQX
ou7esUNTQNPP4vBs//IYR3NSKxp60QnwlMWoCLIJNeI0iucVrsGZonn3WUdDaGFO
UXU0KywiH87dJWA5Sih51Nq78/crwQ4woXop9fWmZI25Wvr8oRw1poB34qWpsAch
SyC3FuR30g1qd1ksUDuNtaWkyiP4AChVxzMzW/4WKvEjKQEBRbwMS1QEPP2U0TDb
xcNRMS5SbnF26mPCWuY/dQNwdoPaxBcNlcZWGEUpSHFK2pC9zTri2YBFrK7pnoDQ
vhOrAyQfvhA2qbknyfGI+NGZVNoTO7NSrGhMlIZ15uuVvjt8nK+JYyiRQM0s0HJ8
EklGipaIsXCleyqGYCmr
=697K

-----END PGP SIGNATURE-----

_______________________________________________
stunnel-users mailing list
stunnel-users@stunnel.org
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users