From 8e4999cadd4d0e1e1a0b7c968bd017e8740d28ac Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 9 Mar 2022 11:14:31 -0800 Subject: [PATCH 1/7] [AD-651] update .gitignore to include *DS_Store * .DS_Store is a file generated on MacOS, and should not be uploaded to GitHub --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 50414cd40..6c985b267 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.aps +*.DS_Store *.obj *.iobj *.ipdb From 768ac49a0ff0258b314003e93ad24751dd2585d5 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 9 Mar 2022 14:05:14 -0800 Subject: [PATCH 2/7] [AD-651] update readme * update ReadMe to include instructions for downloading mongodb driver --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb4f9b89e..6d324ec49 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ Example: 2. Install the test data 1. `cd src/odbc-test/scripts` 2. `.\import_test_data.ps1` (Windows) or `./import_test_data.sh` (MacOS or Linux) + If receiving permission errors on MacOS while importing the test data, + use `chmod +x ./reinstall_mongodb_mac.sh` and try again. ### Windows @@ -60,17 +62,19 @@ Example: 2. Ensure to save Java `\bin` and `\server` directories to the User `PATH` variable. (e.g. C:\Program Files\Java\jdk1.8.0_321\jre\bin\server) 5. Boost Test Framework 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `.\vcpkg install openssl:x64-windows boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows` -6. Run one of the build scripts to create an initial compilation. +6. Mongo Driver + 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `vcpkg install mongo-cxx-driver:x86-windows` +7. Run one of the build scripts to create an initial compilation. 1. E.g.: `.\build_win_debug64.ps1` 2. Navigate to the `build\odbc\cmake` folder to use the generated solution file, `Ignite.C++.sln` to work on source code development and testing. -7. Set the environment variable `DOCUMENTDB_HOME`. On a developer's machine, set it to `\build\odbc\bin\Debug`. The +8. Set the environment variable `DOCUMENTDB_HOME`. On a developer's machine, set it to `\build\odbc\bin\Debug`. The build script run above, downloads it to the `\build\odbc\bin\Debug\libs` folder. -8. Open a **64-bit** command shell or **64-bit** PowerShell window, **as Administrator**, run the +9. Open a **64-bit** command shell or **64-bit** PowerShell window, **as Administrator**, run the ``` \src\odbc\src\install\install_amd64.cmd \buildbuild\odbc\cmake\Debug\ignite.odbc.dll ``` -8. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). +10. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). ### MacOS @@ -80,11 +84,13 @@ Example: 3. `brew install unixodbc` - You may need to unlink `libiodbc` if you already have this installed. Use `brew unlink libiodbc`. 4. `brew install boost` - 5. Install Java **JDK** (version 8+ - 17 recommended) + 5. `brew install mongodb-community` + 6. `brew install mongo-cxx-driver` + 7. Install Java **JDK** (version 8+ - 17 recommended) - This can be done through Homebrew using `brew install --cask temurin`. - Ensure to set `JAVA_HOME`. - Ensure to save Java `/bin` and `/server` directories to the User `PATH` variable. - 6. If creating a debug build (`./build_mac_debug64.sh`), LLVM is required. + 8. If creating a debug build (`./build_mac_debug64.sh`), LLVM is required. - If you only have XCode Command Line Tools, use the LLVM included with XCode by modifying the PATH with `export PATH=/Library/Developer/CommandLineTools/usr/bin/:$PATH`. Ensure this XCode path comes first in $PATH. If error occurs, check that clang and llvm are under folder Library/Developer/CommandLineTools/usr/bin. - If you have XCode application, to ensure LLVM and CMake are compatible, use the LLVM included with XCode by modifying the PATH with `export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/:$PATH`. 2. Run one of the build scripts to create an initial compilation. From e96b1353dde41688bfeae7ff270b9cc9e2d9428b Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 9 Mar 2022 16:45:04 -0800 Subject: [PATCH 3/7] [AD-651] add command to register the ODBC driver on MacOS --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6d324ec49..6f2d415e7 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,9 @@ Example: 2. Run one of the build scripts to create an initial compilation. 1. E.g.: `./build_mac_release64.sh` 2. Navigate to the `build/odbc/lib` folder to use the generated files. -3. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). +3. Run the following command to register the ODBC driver. + `./scripts/register_driver_macos.sh` +4. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). ### Linux From 9168e1198f6ac046add578c68e42d4a108125c7e Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 9 Mar 2022 16:56:28 -0800 Subject: [PATCH 4/7] [AD-651] add instructions for setting DOCUMENTDB_HOME --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f2d415e7..ea9e3a199 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,10 @@ Example: 2. Run one of the build scripts to create an initial compilation. 1. E.g.: `./build_mac_release64.sh` 2. Navigate to the `build/odbc/lib` folder to use the generated files. -3. Run the following command to register the ODBC driver. +3. Set the environment variable `DOCUMENTDB_HOME`. On a developer's machine, set it to `/build/odbc/bin` +4. Run the following command to register the ODBC driver. `./scripts/register_driver_macos.sh` -4. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). +5. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). ### Linux From 7e8bb187d42ab05fbca7cf928c82e46f9f4c9818 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 9 Mar 2022 17:17:43 -0800 Subject: [PATCH 5/7] [AD-651] add example for JAVA_HOME for clarity --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea9e3a199..ecf8187ab 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,8 @@ Example: 1. Ensure to add path to WiX executables (e.g. `C:\Program Files (x86)\WiX Toolset v3.11\bin`) 4. [Java](https://www.oracle.com/java/technologies/downloads/) **JDK** (version 8+ - 17 recommended) 1. Ensure to set `JAVA_HOME`. (e.g. C:\Program Files\Java\jdk-17.0.2) - 2. Ensure to save Java `\bin` and `\server` directories to the User `PATH` variable. (e.g. C:\Program Files\Java\jdk1.8.0_321\jre\bin\server) + 2. Ensure to save Java `\bin` and `\server` directories to the User `PATH` variable. + Example: C:\Program Files\Java\jdk1.8.0_321\jre\bin\server 5. Boost Test Framework 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `.\vcpkg install openssl:x64-windows boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows` 6. Mongo Driver @@ -88,8 +89,12 @@ Example: 6. `brew install mongo-cxx-driver` 7. Install Java **JDK** (version 8+ - 17 recommended) - This can be done through Homebrew using `brew install --cask temurin`. - - Ensure to set `JAVA_HOME`. + - Ensure to set `JAVA_HOME`. Make sure it is set to temurin. Other JDK package may cause test errors + such as `Unable to get initialized JVM` at run time. + Example: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home - Ensure to save Java `/bin` and `/server` directories to the User `PATH` variable. + Example: /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/lib/server/ + /Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/ 8. If creating a debug build (`./build_mac_debug64.sh`), LLVM is required. - If you only have XCode Command Line Tools, use the LLVM included with XCode by modifying the PATH with `export PATH=/Library/Developer/CommandLineTools/usr/bin/:$PATH`. Ensure this XCode path comes first in $PATH. If error occurs, check that clang and llvm are under folder Library/Developer/CommandLineTools/usr/bin. - If you have XCode application, to ensure LLVM and CMake are compatible, use the LLVM included with XCode by modifying the PATH with `export PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/:$PATH`. From 83b914bb4637fc163d6028a7b1f59f8c707cb6c4 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Thu, 10 Mar 2022 09:36:50 -0800 Subject: [PATCH 6/7] [AD-651] resolve code review feedback --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ecf8187ab..0e627a3d1 100644 --- a/README.md +++ b/README.md @@ -61,21 +61,19 @@ Example: 1. Ensure to set `JAVA_HOME`. (e.g. C:\Program Files\Java\jdk-17.0.2) 2. Ensure to save Java `\bin` and `\server` directories to the User `PATH` variable. Example: C:\Program Files\Java\jdk1.8.0_321\jre\bin\server -5. Boost Test Framework - 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `.\vcpkg install openssl:x64-windows boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows` -6. Mongo Driver - 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `vcpkg install mongo-cxx-driver:x86-windows` -7. Run one of the build scripts to create an initial compilation. +5. Boost Test Framework and Mondodb Driver + 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `.\vcpkg install openssl:x64-windows boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows mongo-cxx-driver:x86-windows` +6. Run one of the build scripts to create an initial compilation. 1. E.g.: `.\build_win_debug64.ps1` 2. Navigate to the `build\odbc\cmake` folder to use the generated solution file, `Ignite.C++.sln` to work on source code development and testing. -8. Set the environment variable `DOCUMENTDB_HOME`. On a developer's machine, set it to `\build\odbc\bin\Debug`. The +7. Set the environment variable `DOCUMENTDB_HOME`. On a developer's machine, set it to `\build\odbc\bin\Debug`. The build script run above, downloads it to the `\build\odbc\bin\Debug\libs` folder. -9. Open a **64-bit** command shell or **64-bit** PowerShell window, **as Administrator**, run the +8. Open a **64-bit** command shell or **64-bit** PowerShell window, **as Administrator**, run the ``` \src\odbc\src\install\install_amd64.cmd \buildbuild\odbc\cmake\Debug\ignite.odbc.dll ``` -10. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). +9. More details in [`src\DEVNOTES.txt`](src/DEVNOTES.txt). ### MacOS From e16e19d0c5ce36ae8e3b6d953ae4481576b25ea4 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Thu, 10 Mar 2022 10:34:05 -0800 Subject: [PATCH 7/7] [AD-651] change command for downloading mongo cxx driver --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e627a3d1..6c504d371 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Example: 2. Ensure to save Java `\bin` and `\server` directories to the User `PATH` variable. Example: C:\Program Files\Java\jdk1.8.0_321\jre\bin\server 5. Boost Test Framework and Mondodb Driver - 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `.\vcpkg install openssl:x64-windows boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows mongo-cxx-driver:x86-windows` + 1. Install via [VCPKG](https://vcpkg.io/en/getting-started.html) using `.\vcpkg install openssl:x64-windows boost-test:x64-windows boost-asio:x64-windows boost-chrono:x64-windows boost-interprocess:x64-windows boost-regex:x64-windows boost-system:x64-windows boost-thread:x64-windows mongo-cxx-driver:x64-windows` 6. Run one of the build scripts to create an initial compilation. 1. E.g.: `.\build_win_debug64.ps1` 2. Navigate to the `build\odbc\cmake` folder to use the generated solution file, `Ignite.C++.sln` to work on