Last active
October 1, 2021 20:06
-
-
Save robe2/0cc07f3d4f7dbb61025c to your computer and use it in GitHub Desktop.
Building curl with ssl support under mingw64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PROJECTS=/projects | |
export SOURCES=/sources | |
#build openssl | |
if true; then | |
cd ${PROJECTS} | |
mkdir ssl | |
cd ssl | |
cd ${SOURCES} | |
export PATH="/mingw/bin:/bin" | |
#Note that both EDB and BigSQL ship ssleasy32.dll, so you'll want to compile with a version of | |
#ssl that is compatible for 9.6 and newer micros of 9.5 and 9.5 | |
# 1.0.2g seems to work fine with both EDB and BigSQL distributions | |
export SSL_VER=1.0.2g | |
wget http://www.openssl.org/source/openssl-${SSL_VER}.tar.gz | |
rm -rf openssl-${SSL_VER} | |
tar xvfz openssl-${SSL_VER}.tar.gz | |
cd openssl-${SSL_VER} | |
SSL_REL_PATH=${PROJECTS}/ssl/rel-openssl-${SSL_VER}w${OS_BUILD}${GCC_TYPE} | |
make clean | |
./configure mingw64 --prefix=${SSL_REL_PATH} shared | |
make | |
make install | |
fi | |
## If you run into issue compiling curl get rid of the libz.a in mingw install (just renamed it to .bad that was | |
## without getting rid of it, errors like | |
#curl-tool_cb_dbg.o:tool_cb_dbg.c:(.text+0x55): undefined reference to `_imp__curl_strequal' | |
#curl-tool_cb_dbg.o:tool_cb_dbg.c:(.text+0x112): undefined reference to `_imp__curl_msnprintf' | |
#would appear | |
#build curl with ssl | |
if true; then | |
cd ${PROJECTS} | |
mkdir curl | |
cd curl | |
cd ${SOURCES} | |
export PATH="/mingw/bin:/bin" | |
export CURL_VER=7.48.0 | |
export ZLIB_VER=1.2.8 | |
export SSL_VER=1.0.1p | |
wget http://curl.haxx.se/download/curl-${CURL_VER}.tar.gz | |
rm -rf curl-${CURL_VER} | |
tar xvfz curl-${CURL_VER}.tar.gz | |
cd curl-${CURL_VER} | |
CURL_REL_PATH=${PROJECTS}/curl/rel-curl-${CURL_VER}w${OS_BUILD}${GCC_TYPE} | |
make clean | |
./configure --prefix=${CURL_REL_PATH} --with-ssl=${PROJECTS}/ssl/rel-openssl-${SSL_VER}w${OS_BUILD}${GCC_TYPE} | |
make | |
make install | |
cd ${CURL_REL_PATH}/bin | |
strip *.dll | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment