-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for windows build #122
base: master
Are you sure you want to change the base?
Conversation
4853181
to
5412324
Compare
Sync'ing up some discussion about this w/ @bhadhy: So, I reran the CI for this PR: #122 Could you try commenting/removing this line: https://github.com/TileDB-Inc/TileDB-MariaDB/blob/master/CMakeLists.txt#L67 ^ that will disable S3, which is the project that (immediately) needs curl. There might be another dependency in Azure, which you could also remove — let’s try to get a successful build going with minimal dependencies, and then we can figure out the problem with the deps. |
Using the 0.10.0 release tag of TileDB-MariaDB, and turing off S3 and Azure build completes successfully. mkdir build_deps unzip bison-2.4.1-dep.zip git clone https://github.com/MariaDB/server.git -b 10.5 10.5 git submodule add https://github.com/TileDB-Inc/TileDB-MariaDB.git storage/mytile cd storage\mytile git checkout tags/0.10.0 -b 0.10.0-branch cd .... git submodule update --init --recursive Modify storage/mytile/CMakeLists.txt, -DTILEDB_S3=OFF, -DTILEDB_AZURE=OFF mkdir builddir cmake -DPLUGIN_TOKUDB=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_MROONGA=NO -DPLUGIN_SPIDER=NO -DPLUGIN_SPHINX=NO -DPLUGIN_FEDERATED=NO -DPLUGIN_FEDERATEDX=NO -DPLUGIN_CONNECT=NO -DCMAKE_BUILD_TYPE=Debug -SWITH_DEBUG=1 .. cmake --build . 2>&1 | tee cmake.build.log If I turn on S3, the build complains about long path names and fails.
|
This means there is a mismatch between the build types of some projects (eg some projects in debug mode, others release). I believe what's happening is the mytile/mariadb project is configured with
|
(the 2nd option is better for long-term maintainability, so would suggest making a PR with that change at some point - if this analysis is correct) |
Regarding inclusion of stdexcept to base64.cpp. The https://github.com/Azure/azure-storage-cpplite/blob/master/src/base64.cpp already has the fix. However we are pulling 0.3.0 tag. And there is no newer tag. What do we do? |
Regarding release vs debug build: The release build from top level built successfully. The steps were: cmake --build . --config Release 2>&1 | tee cmake.build.log However doing the similar thing for debug ends up in |
CMakeLists.txt has following line. If I comment that out, I get following error So I added #include stdexcept to type.h Next I get following error So I changed it to: Now I am getting linker error |
This option is gcc-only, so it needs to be guarded like this:
Also, just to double-check: when you run the cmake build with |
I changed storage/mytile/CMakeLists.txt to have MSVC guard as you suggested:
Then I also changed the TILEDB_LIBRARIES for MSVC so that it points to .lib instead of .dll.2.4
Now the error I am seeing is following:
Google search makes me think that these symbols are defined in MYSQL. How do we add mysql library to the list of libraries to be linked? |
Do you know what is "-SWITH_DEBUG=1"? |
Once again in storage/mytile/CMakeLists.txt, I dropped the MODULE_ONLY
Now the build goes past the link.
|
That sets whether to build in debug mode I guess, but it looks like it only applies to gcc: https://github.com/MariaDB/server/blob/64f7dffcc7e0e69c31d9a36c2090a26300e57c4c/storage/mroonga/CMakeLists.txt#L322-L330 |
Good news, hopefully!
Is this part of the test suite? |
So it is really -SWITH_DEBUG and not -DWITH_DEBUG ? |
Ah - it should be |
|
Far be it for me to argue with their docs, but I don't see how that would work. AFACT it's a cmake option here, and
elsewhere it's documented as (that said, doesn't seem like the main problem here) |
I am sorry. Looks like the same problems exists in both Release or Debug builds.
3.5 Make following changes to storage\mytile\CMakeLists.txt (i) Do not use with MSVC
(ii) Propogate build type (do not mix debug and release)
(v) Remove MODULE_ONLY from MYSQL_ADD_PLUGIN
Bugs:
(ii) type.h
Need to add (iii) ha_mytile.cc
Fix it
(iv) Could not create initial database |
Here are the steps I followed.
mkdir build_deps set PATH=%PATH%;C:\work\mariadb\build_deps\bin
(i) Do not use with MSVC (ii) Propogate build type (do not mix debug and release) (v) Remove MODULE_ONLY from MYSQL_ADD_PLUGIN for both "WITH_EMBEDDED_SERVER" and "not WITH_EMBEDDED_SERVER" (vi) Copy tiledb.dll to buildir/sql/Release. It is needed by builddir/sql/Release/mariadbd.exe to create initial database. So that we do not have to have the dll in path.
mkdir builddir Bugs:
#include (ii) type.h
#include (iii) ha_mytile.cc
#if MYSQL_VERSION_ID < 100500
set PATH=C:\work\mariadb\mariadb-10.5.13-winx64\bin;%PATH%
[mysqld] sql-mode=NO_ENGINE_SUBSTITUTION #The following is to get rid of the harmless datadir=c:/work/mariadb/db
set PATH=C:\work\mariadb\mariadb-10.5.13-winx64\bin;%PATH%
|
@bhadhy great job!! Awesome to see it working on windows! |
b596b93
to
be8d06d
Compare
3299b81
to
42858eb
Compare
ded6775
to
525e04f
Compare
525e04f
to
593112a
Compare
9df3787
to
650b072
Compare
650b072
to
6286aad
Compare
@DimitrisStaratzis any updates on the windows build ? |
Add support for windows build, requires MariaDB 10.5