MySQL Forums
Forum List  »  Connector/C++

MySQL Connector/C++ 8.0.22 my app release build ok, debug build asserts TLS versions error
Posted by: Rand O
Date: February 18, 2021 09:20AM

TLS and application security in general are well outside my areas of expertise. I generally write instrument and machine interface software.
This is a large application, I have been unable to reproduce this problem in a simpler project. I have provided the compile/link commands because that seems like the most likely area for inception of the runtime error. All builds are completed with 0 errors/warnings using /w4 level.

Visual Studio 2019 Professional 16.8.5
Server version: 8.0.23 MySQL Community Server - GPL

MySQL Connector/C++ built from source:
OpenSSL 1.1.1d Static
MySQL Connector/C++ version : 8.0.22 Static (The "try" project runs without errors in Debug and Release)

According to the docs, I need to use this with a statically compiled connector (always errors out on connection if this is not set)
my.ini : default_authentication_plugin=mysql_native_password

The following works in Release build ( all program features work without errors/warnings) but fails to find tls_versions in Debug mode.
Error from our application's log: SetDbUrl setup failed with DB URL: mysqlx://user:pass@localhost:33060. DB Message: No supported TLS protocol version found in the 'tls-versions' list

std::string url = "mysqlx://user:pass@localhost:33060"
mysqlx::Session session( url );

I have included the compile/link commands below for the Connector/C++ build and for our application's build.

Connector/C++ Build commands (from project "connector" in solution "MySQL_CONCPP.sln"):

Debug Compile:
/ifcOutput "connector.dir\Debug\" /GS /TP /W3 /wd"4702" /wd"4297" /Zc:wchar_t /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\BUILD\common" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\BUILD\cdk\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\extra\rapidjson\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\parser" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\protobuf\protobuf-3.6.1\src" /Zi /Gm- /Od /Ob0 /Fd"connector.dir\Debug\connector.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "RAPIDJSON_HAS_CXX11_NOEXCEPT=1" /D "RAPIDJSON_HAS_CXX11_RANGE_FOR=1" /D "RAPIDJSON_HAS_CXX11_RVALUE_REFS=1" /D "STATIC_CONCPP" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /Fa"connector.dir\Debug\" /EHsc /nologo /Fo"connector.dir\Debug\" /Fp"connector.dir\Debug\mysqlcppconn8-static.pch" /diagnostics:column

Debug Link:
/OUT:"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\BUILD\LIB\Debug\mysqlcppconn8-static.lib" /MACHINE:X64 /NOLOGO

Release Compile:
/ifcOutput "connector.dir\Release\" /GS /TP /W3 /wd"4702" /wd"4297" /Zc:wchar_t /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\BUILD\common" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\BUILD\cdk\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\extra\rapidjson\include" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\parser" /I"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\mysql-connector-cpp-src\cdk\protobuf\protobuf-3.6.1\src" /Gm- /O2 /Ob2 /Fd"connector.dir\Release\connector.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "RAPIDJSON_HAS_CXX11_NOEXCEPT=1" /D "RAPIDJSON_HAS_CXX11_RANGE_FOR=1" /D "RAPIDJSON_HAS_CXX11_RVALUE_REFS=1" /D "STATIC_CONCPP" /D "CMAKE_INTDIR=\"Release\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /GR /Gd /MD /Fa"connector.dir\Release\" /EHsc /nologo /Fo"connector.dir\Release\" /Fp"connector.dir\Release\mysqlcppconn8-static.pch" /diagnostics:column

Release Link:
/OUT:"C:\Users\user.dom\Dev_Libraries\mysql-connector-cpp\BUILD\LIB\Release\mysqlcppconn8-static.lib" /MACHINE:X64 /NOLOGO

Application build commands (from our application)

Debug Compile:
/JMC /permissive- /Yu"pch.h" /MP /ifcOutput "C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\Obj\" /GS /TP /W4 /wd"4068" /wd"4996" /wd"26444" /wd"26812" /wd"26439" /wd"26495" /Zc:wchar_t /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\our_product\\source\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\libplctag\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\mysql_connector\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\spdlog\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\ChartDirector\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\opencv\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\fmt\include" /I"C:\Program Files\Basler\pylon 6\Development\\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\debug\mswud\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\include\msvc" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\include" /ZI /Gm- /Od /Ob0 /sdl /Fd"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\Obj\vc142.pdb" /FI"pch.h" /fp:precise /D "WIN32_LEAN_AND_MEAN" /D "STATIC_CONCPP" /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE=1" /D "_CRT_NON_CONFORMING_SWPRINTFS=1" /D "_SCL_SECURE_NO_WARNINGS=1" /D "__WXMSW__" /D "_UNICODE" /D "UNICODE" /D "_WINDOWS" /D "_DEBUG" /D "_CRTDBG_MAP_ALLOC" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /std:c++17 /FC /Fa"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\Obj\" /EHsc /nologo /Fo"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\Obj\" /Fp"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\Obj\our_product.pch" /diagnostics:column

Debug Link:
/OUT:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\our_product.exe" /MANIFEST /NXCOMPAT /PDB:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\our_product.pdb" /DYNAMICBASE "chartdir60.lib" "GCBase_MD_VC141_v3_1_Basler_pylon.lib" "GenApi_MD_VC141_v3_1_Basler_pylon.lib" "PylonBase_v6_0.lib" "PylonC.lib" "PylonGUI_v6_0.lib" "PylonUtility_v6_0.lib" "fmtd.lib" "spdlogd.lib" "opencv_world440d.lib" "Ws2_32.lib" "Iphlpapi.lib" "plctag.lib" "wxmsw31ud_core.lib" "wxbase31ud.lib" "wxmsw31ud_aui.lib" "wxtiffd.lib" "wxjpegd.lib" "wxpngd.lib" "wxzlibd.lib" "wxregexud.lib" "wxexpatd.lib" "wxmsw31ud_media.lib" "mysqlcppconn8-static_debug.lib" "ws2_32.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "comdlg32.lib" "winspool.lib" "winmm.lib" "shell32.lib" "shlwapi.lib" "comctl32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "rpcrt4.lib" "advapi32.lib" "version.lib" "wsock32.lib" "wininet.lib" "Wldap32.lib" "Crypt32.lib" "DnsApi.lib" "odbc32.lib" "odbccp32.lib" /LARGEADDRESSAWARE /DEBUG:FULL /MACHINE:X64 /OPT:NOREF /INCREMENTAL /PGD:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\our_product.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Debug\our_product\Obj\our_product.exe.intermediate.manifest" /ERRORREPORT:PROMPT /NOLOGO /VERBOSE:Lib /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\ChartDirector\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\openssl\" /LIBPATH:"C:\Program Files\Basler\pylon 6\Development\\lib\x64\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\debug\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\mysql_connector\debug\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\mysql_connector\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\libplctag\debug\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\spdlog\debug\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\opencv\debug\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\fmt\debug\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\lib\vc_x64_lib" /TLBID:1

Release Compile:
/permissive- /Yu"pch.h" /MP /ifcOutput "C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\Obj\" /GS /TP /GL /W4 /wd"4068" /wd"4996" /wd"26444" /wd"26812" /wd"26439" /wd"26495" /Zc:wchar_t /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\our_product\\source\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\libplctag\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\mysql_connector\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\spdlog\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\ChartDirector\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\opencv\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\fmt\include" /I"C:\Program Files\Basler\pylon 6\Development\\include\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\release\mswu\" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\include\msvc" /I"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\include" /Zi /Gm- /O2 /sdl /Fd"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\Obj\vc142.pdb" /FI"pch.h" /Zc:inline /fp:precise /D "WIN32_LEAN_AND_MEAN" /D "STATIC_CONCPP" /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE=1" /D "_CRT_NON_CONFORMING_SWPRINTFS=1" /D "_SCL_SECURE_NO_WARNINGS=1" /D "__WXMSW__" /D "_UNICODE" /D "UNICODE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /GR /Gd /Oi /MD /std:c++17 /FC /Fa"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\Obj\" /EHsc /nologo /Fo"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\Obj\" /Fp"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\Obj\our_product.pch" /diagnostics:column

Release Link:
/OUT:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\our_product.exe" /MANIFEST /LTCG:incremental /NXCOMPAT /PDB:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\our_product.pdb" /DYNAMICBASE "chartdir60.lib" "GCBase_MD_VC141_v3_1_Basler_pylon.lib" "GenApi_MD_VC141_v3_1_Basler_pylon.lib" "PylonBase_v6_0.lib" "PylonC.lib" "PylonGUI_v6_0.lib" "PylonUtility_v6_0.lib" "fmt.lib" "spdlog.lib" "opencv_world440.lib" "Ws2_32.lib" "Iphlpapi.lib" "plctag.lib" "wxmsw31u_core.lib" "wxbase31u.lib" "wxmsw31u_aui.lib" "wxtiff.lib" "wxjpeg.lib" "wxpng.lib" "wxzlib.lib" "wxregexu.lib" "wxexpat.lib" "wxmsw31u_media.lib" "mysqlcppconn8-static.lib" "ws2_32.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "comdlg32.lib" "winspool.lib" "winmm.lib" "shell32.lib" "shlwapi.lib" "comctl32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "rpcrt4.lib" "advapi32.lib" "version.lib" "wsock32.lib" "wininet.lib" "Wldap32.lib" "Crypt32.lib" "DnsApi.lib" "odbc32.lib" "odbccp32.lib" /LARGEADDRESSAWARE /DEBUG:FASTLINK /MACHINE:X64 /OPT:REF /INCREMENTAL:NO /PGD:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\our_product.pgd" /SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\Build\Release\our_product\Obj\our_product.exe.intermediate.manifest" /OPT:ICF /ERRORREPORT:PROMPT /NOLOGO /VERBOSE:Lib /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\ChartDirector\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\openssl\" /LIBPATH:"C:\Program Files\Basler\pylon 6\Development\\lib\x64\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\release\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\mysql_connector\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\libplctag\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\spdlog\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\opencv\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\fmt\" /LIBPATH:"C:\Users\user.dom\Documents\_Projects\our_company\trunk\lib\wxWidgets\lib\vc_x64_lib" /TLBID:1

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL Connector/C++ 8.0.22 my app release build ok, debug build asserts TLS versions error
102
February 18, 2021 09:20AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.