build wt supporting HTTPS (using crypto) with MinGW
Added by Стойчо Стефанов Stoycho Stefanov over 13 years ago
Hi,
I cannot enable the crypto support when I build wt with mingw32-make. I configure the build as follows:
$ cmake E:/Downloads/wt-git/trunk \
-DCMAKE_INSTALL_PREFIX="c:/ss/minGW_libs" \
-DBOOST_DIR="c:/ss/minGW_libs" \
-DBOOST_COMPILER=mgw46 \
-DBOOST_VERSION=1_49 \
-DHTTP_WITH_SSL=ON \
-DSSL_PREFIX="c:/ss/minGW_libs" \
-DHTTP_WITH_ZLIB=ON \
-DZLIB_PREFIX="c:/ss/minGW_libs" \
-DBUILD_EXAMPLES=OFF \
-DBUILD_TESTS=OFF \
-G "MinGW Makefiles"
-- Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_LIBRARY)
** Enabling multi threading.
** Disabling crypto support (Auth::SHA1HashFunction, HTTPS support): requires OpenSSL.
Indicate the location of your OpenSSL library using -DSSL_PREFIX=...
** Disabling PDF support (WPdfImage, WPdfRenderer): requires libharu.
Indicate the location of your haru library using -DHARU_PREFIX=...
** Disabling raster image support (WRasterImage): requires graphicsmagick.
Indicate the location of your graphicsmagick library using -DGM_PREFIX=...
** Disabling advanced font rendering support: requires libpango.
Wt will use pkg-config to retrieve your libpango installation location.
** Wt::Dbo: building SQLite3 backend.
** Wt::Dbo: not building Postgres backend.
Indicate the location of your postgres installation using -DPOSTGRES_PREFIX=...
** Wt::Dbo: not building Firebird backend.
Indicate the location of your FirebirdSQL and IBPP installation using -DFIREBIRD_PREFIX=... -DIBPP_SRC_DIRECTORY=...
** Disabling ISAPI.
** Disabling FastCGI connector.
** Enabling built-in httpd.
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
HTTP_WITH_SSL
-- Build files have been written to: C:/MinGW/msys/1.0/wt_build
I cannot see whether the zlib is properly enabled and wt will support zlib.
In "c:/ss/minGW_libs/lib" are the libs: libcrypto.a, libcrypto.dll.a, libssl.a, libssl.dll.a. In "CMakeCache.txt" is set this variable as follows:
//Path to a library.
SSL_LIB_RELEASE:FILEPATH=c:/ss/minGW_libs/lib/libssl.dll.a
I don't now why the .dll.a file is set and not the static .a library.
I append the "CMakeCache.txt" as reference.
Thanks in advance!
Stoycho
| CMakeCache.txt (23.8 KB) CMakeCache.txt |
Replies (3)
RE: build wt supporting HTTPS (using crypto) with MinGW - Added by Wim Dumon over 13 years ago
Hello,
I recommend that you look into WtFindSsl.txt and modify it so that it actually finds your sll library.
Best regards,
Wim.
RE: build wt supporting HTTPS (using crypto) with MinGW - Added by Стойчо Стефанов Stoycho Stefanov over 13 years ago
Hi Wim,
thanks for your fast answer, but I did it in another way.
After configuring, I just edited the "CMakeCache.txt" file and set all SSL_ related variables in "CMakeCache.txt" file. For me it looks as follows:
SSL_INCLUDE_DIRS:PATH=c:/ss/minGW_libs/include
SSL_LIB_DEBUG:FILEPATH=c:/ss/minGW_libs/lib/libssl.a
SSL_LIB_RELEASE:FILEPATH=c:/ss/minGW_libs/lib/libssl.a
SSL_PREFIX:PATH=c:/ss/minGW_libs
SSL_TOO_LIB_DEBUG:FILEPATH=c:/ss/minGW_libs/lib/libssl.a
SSL_TOO_LIB_RELEASE:FILEPATH=c:/ss/minGW_libs/lib/libssl.a
USERLIB_PREFIX:PATH=c:/ss/minGW_libs
I'm not arguing that that is the most elegant solution, but it works for me and I'm happy with it.
Is it ok that wt libraries (wt, wtext, wthttp) depend on the boost libs, ssl, crypto, ws2_32, mswsock, or I had built it wrong?
Regards,
Stoycho
RE: build wt supporting HTTPS (using crypto) with MinGW - Added by Стойчо Стефанов Stoycho Stefanov over 13 years ago
Hi Wim,
I think I found the reason of this dependencies. In the "CMakeCache.txt" file (starting with line 500 in the file appended to my first post) the dependencies for the target are set wrong, e.g., "c:/ss/minGW_libs/lib/libboost_regex.a" instead of "-lboost_regex". I could not managed to set them right. I still build with dependencies.
Unfortunately, I can link in my Eclipse project to all libraries but the zlib. It seems the Eclipse Linker cannot link to the zlib.
best regards,
Stoycho