Skip to content

Conversation

@unxcepted
Copy link
Contributor

Description

This PR revives the windows support, which was dropped after the 2.3.6 release. I'm keeping this on a separate branch because some time is still needed to audit quickjspp code changes.

Since this PR, windows build additionally requires:

  • Visual Studio 2022 with MSVC tools v141
  • Strawberry Perl for OpenSSL build
  • Premake5 for quickjspp build

Visual Studio 2015 and CMake installed globally are no longer required. Instructions in WINDOWS.md have been updated.

List of changes

  • Solution retargeted against VS 2022, MSVC v141
  • Dependencies' windows build scripts fixed
  • QuickJS replaced with c-smile/quickjspp
  • GTest updated to the latest version supporting both MSVC v141 and traditional make compilation on Linux - v1.8.1
  • Minor code changes (mostly adjusted includes)

Issues

  • quickjspp doesn't monitor stack size on windows - potential stack overflow in r.js causes a worker crash. As a consequence, JSProc.InfiniteRecursionFunction test fails.
  • Boost complains about unknown compiler during compilation - this could be fixed by updating boost to >=1.65.1. It doesn't yield any problems during runtime though.

Special thanks to @MrBoombastic for an idea and help with testing.

unxcepted added 7 commits June 1, 2022 16:06
Since this commit VS2022 with v141 tools and Windows SDK 10.0.19041.0  is required to build RethinkDB on windows. VS2015 no longer has to be installed.
Required for compilation on windows.
This commit also removes old gtest source files from this repo, as no-fetch approach is no longer valid.
Original quickjs doesn't support MSVC compiler, hence this change is required for windows build.
- adjust includes
- fix metadata_file_t namespacing
- fix remove_directory_helper function
Drops the requirement to install cmake explicitly
points out new requirements
@MrBoombastic MrBoombastic mentioned this pull request Jun 2, 2022
1 task
Copy link
Contributor

@srh srh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great! I've left notes for myself for some petty fix-ups after merging.

@@ -86,6 +86,8 @@
RAPIDJSON_HAS_STDSTRING;
RAPIDJSON_PARSE_DEFAULT_FLAGS=kParseFullPrecisionFlag;
BOOST_DATE_TIME_NO_LIB;
JS_STRICT_NAN_BOXING;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self to review what this does.

@@ -86,6 +86,8 @@
RAPIDJSON_HAS_STDSTRING;
RAPIDJSON_PARSE_DEFAULT_FLAGS=kParseFullPrecisionFlag;
BOOST_DATE_TIME_NO_LIB;
JS_STRICT_NAN_BOXING;
CURL_STATICLIB;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got this.

c:\cygwin64\home\sam\rethinkdb\src\extproc\http_job.cc(8): warning C4005: 'CURL_STATICLIB': macro redefinition [C:\cygwin64\home\sam\rethinkd
b\rethinkdb.vcxproj]
  c:\cygwin64\home\sam\rethinkdb\src\extproc\http_job.cc: note: see previous definition of 'CURL_STATICLIB'


project "quickjs"
language "C"
+ staticruntime "on"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds... fine? Noting to review this...

@@ -270,7 +270,7 @@ with_vs_env () {
# GNU make sets $MAKE and $MAKEFLAGS to values that are not
# compatible with Windows' nmake

env -u MAKE -u MAKEFLAGS cmd /c "$vcvarsall" "$machine" "&&" "$@"
env -u MAKE -u MAKEFLAGS cmd /c "$vcvarsall" "$machine" "--vcvars_ver=14.1" "&&" "$@"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some v141, 14.1, etc. constants around. It might be a good idea to either define these as constants somewhere or leave a comment providing search terms to grep the repository for these strings.

@srh srh merged commit 8720669 into rethinkdb:v2.4.x-windows Jun 13, 2022
This was referenced Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants