← Back to team overview

maria-developers team mailing list archive

Re: Compiling default MariaDB with OpenSSL in Windows

 

Hi,

Could you tell me what version of cmake are you using? I spin up a vm on azure
with VS, installed all the prerequisites and now cmake complains that
it can't find
bison. I could workaround specifically setting the path to bison, but
then it failed
because it can't find cmd.exe:


       "C:\mariadb\bld\package.vcxproj" (default target) (1) ->
       "C:\mariadb\bld\ALL_BUILD.vcxproj" (default target) (3) ->
       "C:\mariadb\bld\storage\rocksdb\mysql_ldb.vcxproj" (default
target) (159) ->
       "C:\mariadb\bld\storage\rocksdb\rocksdb_aux_lib.vcxproj"
(default target) (160) ->
       "C:\mariadb\bld\storage\rocksdb\rocksdblib.vcxproj" (default
target) (162) ->
       (Lib target) ->
         sync_point_impl.obj : warning LNK4221: This object file does
not define any previously undefined public symbol
       s, so it will not be used by any link operation that consumes
this library [C:\mariadb\bld\storage\rocksdb\rocks
       dblib.vcxproj]
         thread_status_util_debug.obj : warning LNK4221: This object
file does not define any previously undefined publ
       ic symbols, so it will not be used by any link operation that
consumes this library [C:\mariadb\bld\storage\rock
       sdb\rocksdblib.vcxproj]


       "C:\mariadb\bld\package.vcxproj" (default target) (1) ->
       "C:\mariadb\bld\ALL_BUILD.vcxproj" (default target) (3) ->
       "C:\mariadb\bld\storage\archive\archive.vcxproj" (default target) (17) ->
       "C:\mariadb\bld\sql\gen_mysqld_lib.vcxproj" (default target) (18) ->
       "C:\mariadb\bld\sql\sql.vcxproj" (default target) (20) ->
       "C:\mariadb\bld\sql\gen_lex_token.vcxproj" (default target) (25) ->
       (CustomBuild target) ->
         C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.tar
       gets(209,5): error MSB6006: "cmd.exe" exited with code 1.
[C:\mariadb\bld\sql\gen_lex_token.vcxproj]

    2 Warning(s)
    1 Error(s)

If I were a betting man, I would bet that it is a cmake bug. The same
happens with 10.4.

BTW, there are plans to remove yassl
https://jira.mariadb.org/browse/MDEV-16475 so
having a windows+openssl CI would be necessary.

On Sat, Sep 8, 2018 at 4:41 PM, Vladislav Vaintroub
<vvaintroub@xxxxxxxxx> wrote:
>
>
> Hi,
>
> you cannot build because of the build for OpenSSL on Windows was broken,
> until I fixed it couple of minutes ago. We do not build with OpenSSL often
> on Windows, so it can be broken from time to time.
>
>
>
> I had no success Shining Light distro. Link is fine, but there are runtime
> errors as described in https://www.openssl.org/docs/faq.html#PROG3 . I did
> not try the workaround with applink.c that they propose.
>
>
>
> What worked for me however, was a static openssl build using vcpkg, a
> Windows library manager from https://github.com/Microsoft/vcpkg
>
>
>
> The whole procedure, including building vcpkg itself (instructions assume
> cmd command prompt), if you would like to right now. Or you can wait until
> next 10.3 comes out
>
>
>
> 1.Bootstrap vcpkg
>
>
>
>    C:
>
>    cd \
>
>    git clone https://github.com/Microsoft/vcpkg.git
>
>    cd vcpkg
>
>    bootstrap-vcpkg.bat
>
>
>
> 2.Install static openssl for x64
>
>
>
>    vcpkg install openssl-windows:x64-windows-static
>
>
>
>
>
> 3.Clone a fresh 10.3
>
>
>
>    cd \
>
>    git clone https://github.com/mariadb/server -b 10.3  10.3
>
>
>
> 4. Build with vcpkg-provided openssl
>
>
>
>    cd 10.3 && mkdir bld && cd bld
>
>    cmake -G "Visual Studio 15 Win64" ..
> -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
> -DVCPKG_TARGET_TRIPLET=x64-windows-static -DWITH_SSL=system
>
>    cmake --build . --config RelWithDebinfo --target package -- -m
>
>
>
>
>
> From: Braiam Peguero
> Sent: Thursday, August 23, 2018 10:03 PM
> To: maria-developers@xxxxxxxxxxxxxxxxxxx
> Subject: [Maria-developers] Compiling default MariaDB with OpenSSL in
> Windows
>
>
>
> Hi,
>
> Following Georg Richter recommendations for compiling MariaDB on
>
> Windows 64bit, with OpenSSL using the following cmake commands:
>
>
>
> cmake .. -DWITH_SSL=system -G "Visual Studio 15 2017 Win64"
>
> cmake --build . --config relwithdebinfo --target package
>
>
>
> However, several recipes fail to build, for the following errors:
>
>
>
> "builddir\mysys_ssl\mysys_ssl.vcxproj" (default target) (8) ->
>
> (ClCompile target) ->
>
>   c:\users\braiam\src\mariadb-10.3.9\mysys_ssl\my_crypt.cc(42): error
>
> C3861: 'bzero': identifier not found [C:\Users\br
>
> aiam\src\mariadb-10.3.9\bld\mysys_ssl\mysys_ssl.vcxproj]
>
>
>
> and
>
>
>
> "builddir\package.vcxproj" (default target) (1) ->
>
> "builddir\ALL_BUILD.vcxproj" (default target) (3) ->
>
> "builddir\libmariadb\sha256_password.vcxproj" (default target) (205) ->
>
> (Link target) ->
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol BIO_free
>
> referenced in function auth_sha256_client [C:\User
>
> s\braiam\src\mariadb-10.3.9\bld\libmariadb\sha256_password.vcxproj]
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol
>
> BIO_new_mem_buf referenced in function auth_sha256_client [
>
> builddir\libmariadb\sha256_password.vcxproj]
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol RSA_size
>
> referenced in function auth_sha256_client [C:\User
>
> s\braiam\src\mariadb-10.3.9\bld\libmariadb\sha256_password.vcxproj]
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol
>
> RSA_public_encrypt referenced in function auth_sha256_clien
>
> t [builddir\libmariadb\sha256_password.vcxproj]
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol RSA_free
>
> referenced in function auth_sha256_client [C:\User
>
> s\braiam\src\mariadb-10.3.9\bld\libmariadb\sha256_password.vcxproj]
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol
>
> PEM_read_bio_RSA_PUBKEY referenced in function auth_sha256_
>
> client [builddir\libmariadb\sha256_password.vcxproj]
>
>   sha256_pw.obj : error LNK2019: unresolved external symbol
>
> ERR_clear_error referenced in function auth_sha256_client [
>
> builddir\libmariadb\sha256_password.vcxproj]
>
>   builddir\libmariadb\RelWithDebInfo\sha256_password.dll : fatal error
>
> LNK1120: 7 unresol
>
> ved externals [builddir\libmariadb\sha256_password.vcxproj]
>
>
>
> Using the OpenSSL 1.1.0i 64bit binaries from Shinning Light
>
> Productions. Using the 1.0.2p version produce even more linking
>
> errors. I also used FireDaemon but failed. Is there a recommended
>
> Windows binary for compiling? Or do I need to compile my own openssl?
>
>
>
> --
>
> Braiam Peguero
>
>
>
> _______________________________________________
>
> Mailing list: https://launchpad.net/~maria-developers
>
> Post to     : maria-developers@xxxxxxxxxxxxxxxxxxx
>
> Unsubscribe : https://launchpad.net/~maria-developers
>
> More help   : https://help.launchpad.net/ListHelp
>
>



-- 
Braiam Peguero


Follow ups

References