zlib 1.2.11 comiplation problem. #6395

Open
CooleRRSA opened this Issue Feb 17, 2017 · 1 comment

Projects

None yet

3 participants

@CooleRRSA
CooleRRSA commented Feb 17, 2017 edited

Please provide the following information

qBittorrent version and Operating System:

qBittorrent 3.3.10 + Windows 10 x64

What is the problem:

I'm trying to compile qBittorrent using wiki MSVC 2015 instruction.
I have corrected some missing info and compiling is normally completes.
I have compiled using Qt 5.7.1, Qt 5.8.0, boost 1.62.0, boost 1.63.0, OpenSSL 1.0.2j,k, qBittorrent master and 3.3.10, libtorrent 1.0.10, 1.0.11 and so on. Resulted *.exe file is normally started. But if I uses zlib 1.2.11 compiling is done, but .exe is not working. It starts, stays in processes about 1-2 second and disappear without any error messages.

My config for comiplation:

// 1. Компиляция Zlib

// Редактируем win32/Makefile.msc
// CFLAGS  = -nologo -O1 -Oy- -GL -MT /arch:IA32 $(LOC)
// WFLAGS  = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_USING_V110_SDK71_
// LDFLAGS = /NOLOGO /DEBUG:NONE /DYNAMICBASE /NXCOMPAT /LTCG /DEBUG /OPT:REF /OPT:ICF /MANIFEST:EMBED /INCREMENTAL:NO /NODEFAULTLIB:MSVCRT

nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="inffas32.obj match686.obj"

xcopy zlib.h C:\qBittorrent\install_msvc\base\include\
xcopy zconf.h C:\qBittorrent\install_msvc\base\include\
xcopy zlib.lib C:\qBittorrent\install_msvc\base\lib\

// 2. Компиляция OpenSSL

perl Configure VC-WIN32 no-hw no-shared zlib no-zlib-dynamic threads --openssldir=C:\openssl --prefix=C:\qBittorrent\install_msvc\base -IC:\qBittorrent\install_msvc\base\include -LC:\qBittorrent\install_msvc\base\lib -D_USING_V110_SDK71_
ms\do_nasm.bat

// Редактируем ms\nt.mak
// В строке EX_LIBS=/libpath::\QBITTORRENT\install_msvc\base\lib ws2_32.lib gdi32.lib advapi32.lib crypt32.lib user32.lib zlib1.lib
// меняем zlib1.lib на zlib.lib
// В строке CFLAG добавляем -O1 -Oy- -GL -MT /arch:IA32
// LFLAGS=/nologo /subsystem:console /opt:ref /debug меняем на
// LFLAGS=/NOLOGO /SUBSYSTEM:CONSOLE",5.01" /DYNAMICBASE /NXCOMPAT /LTCG /DEBUG:NONE /OPT:REF /OPT:ICF /MANIFEST:EMBED /INCREMENTAL:NO /NODEFAULTLIB:MSVCRT

nmake -f ms\nt.mak
nmake -f ms\nt.mak install

// 3. Компиляция Boost

bootstrap.bat

// Заменить в project-config.jam 
// using msvc ; на 
// using msvc : 14.0 ; 

b2 -q --with-system --toolset=msvc-14.0 variant=release link=static runtime-link=static debug-symbols=on include="C:\qBittorrent\install_msvc\base\include" library-path="C:\qBittorrent\install_msvc\base\lib" --prefix="C:\qBittorrent\install_msvc\base" define=_USING_V110_SDK71_ define=BOOST_ASIO_DISABLE_CONNECTEX define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="-O1 -Oy- -GL -MT /arch:IA32" --hash -j 12
b2 -q --with-system --toolset=msvc-14.0 variant=release link=static runtime-link=static debug-symbols=on include="C:\qBittorrent\install_msvc\base\include" library-path="C:\qBittorrent\install_msvc\base\lib" --prefix="C:\qBittorrent\install_msvc\base" define=_USING_V110_SDK71_ define=BOOST_ASIO_DISABLE_CONNECTEX define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="-O1 -Oy- -GL -MT /arch:IA32" --hash -j 12 install

// 4. Компиляция libtorrent

copy ..\boost_1_62_0\b2.exe b2.exe

b2 -q --without-python --toolset=msvc-14.0 variant=release link=static runtime-link=static debug-symbols=on encryption=openssl logging=none geoip=off resolve-countries=off dht=on boost=source character-set=unicode boost-link=static -sBOOST_ROOT="C:\qBittorrent\boost_1_63_0" include="C:\qBittorrent\install_msvc\base\include" library-path="C:\qBittorrent\install_msvc\base\lib" --prefix="C:\qBittorrent\install_msvc\base" define=_USING_V110_SDK71_ define=BOOST_ASIO_DISABLE_CONNECTEX define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="-O1 -Oy- -GL -MT /arch:IA32" --hash -j 12
b2 -q --without-python --toolset=msvc-14.0 variant=release link=static runtime-link=static debug-symbols=on encryption=openssl logging=none geoip=off resolve-countries=off dht=on boost=source character-set=unicode boost-link=static -sBOOST_ROOT="C:\qBittorrent\boost_1_63_0" include="C:\qBittorrent\install_msvc\base\include" library-path="C:\qBittorrent\install_msvc\base\lib" --prefix="C:\qBittorrent\install_msvc\base" define=_USING_V110_SDK71_ define=BOOST_ASIO_DISABLE_CONNECTEX define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="-O1 -Oy- -GL -MT /arch:IA32" --hash -j 12 install

// 5. Компиляция QT5

// Редактируем qtbase/mkspecs/common/msvc-desktop.conf
// DEFINES                += UNICODE WIN32 _USING_V110_SDK71_
// QMAKE_CFLAGS_RELEASE    = -O1 -Oy- -GL -MT /arch:IA32
// QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
// QMAKE_CFLAGS_DEBUG      = -Zi -MTd
// QMAKE_LFLAGS            = /NOLOGO /DYNAMICBASE /NXCOMPAT /LTCG
// QMAKE_LFLAGS_RELEASE    = /OPT:REF /OPT:ICF /MANIFEST:EMBED /INCREMENTAL:NO /NODEFAULTLIB:MSVCRT
// QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /OPT:ICF /INCREMENTAL:NO
// QMAKE_LFLAGS_CONSOLE    = /SUBSYSTEM:CONSOLE",5.01"
// QMAKE_LFLAGS_WINDOWS    = /SUBSYSTEM:WINDOWS",5.01"

-no-style-fusion 

configure -prefix C:\qBittorrent\install_msvc\qt5 -I C:\qBittorrent\install_msvc\base\include -L C:\qBittorrent\install_msvc\base\lib -platform win32-msvc2015 -release -opensource -confirm-license -static -no-sqlite -no-qml-debug -system-zlib -openssl-linked -make libs -nomake tools -nomake examples -no-icu -strip -no-dbus -no-opengl -no-angle -no-sse2 -no-sse3 -no-sse4.1 -no-sse4.2 -no-ssse3 -no-avx -no-avx2 -no-avx512 ZLIB_LIBS="-lzlib" OPENSSL_LIBS="-LC:\qBittorrent\install_msvc\base\lib -llibeay32 -lssleay32"

jom -j12
jom -j12 install

// 6. Настраиваем QT Creator

// Launch Qt Creator and select Tools->Options...
// Select the Build & Run item from the left and select the Qt Versions tab.
// Click the Add... button and select the qmake.exe you just build. It should be in C:\qBittorrent\install_msvc\qt5\bin\qmake.exe
// Name it something meaningful like "Qt5 msvc"
// Apply the changes
// Click the Kits tab
// Click the Add button. Choose a name eg Qt5 msvc2015. Also choose a Qt version and a compiler from the drop down menus. 
// Be sure to select the 32-bit(x86) version of the compiler. Click Apply.
// If you have configured multiple kits, then select the one you want as default and click the button Make Default and click OK. 
// Otherwise, just close the dialog now.

// 7. Компилируем qBittorrent

// Редактируем winconf.pri
// Оставляем строки 
// INCLUDEPATH += $$quote(C:/qBittorrent/install_msvc/base/include/)
// INCLUDEPATH += $$quote(C:/qBittorrent/install_msvc/base/include/boost-1_63)
// LIBS += $$quote(-LC:/qBittorrent/install_msvc/base/lib)
// Редактируем winconf-msvc.pri
// Вписываем реальное название библиотеки libboost_system-vc140-mt-s-1_63.lib

@evsh evsh added the Windows label Feb 17, 2017
@sledgehammer999
Contributor

I have also noted this in my first post: #6381 (comment)

I don't know what is the true cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment