[SERVER-21798] Can't build 3.2 in Windows with --ssl flag Created: 08/Dec/15 Updated: 15/Dec/15 Resolved: 15/Dec/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | 3.2.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Rex Conn | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10, Visual Studio 2013 & 2015, MongoDB 3.2 |
||
| Attachments: |
|
| Participants: |
| Description |
|
When I try to build 3.2 in Windows (either VS2013 or VS2015), I get an error "Compiler must support a thread local storage class for trivially constructible types" when the --ssl flag is passed to scons. If I remove the flag scons proceeds with the compilation. My original command line had more options, but even with this: scons --release --64 --ssl=SSL it fails to compile. |
| Comments |
| Comment by Rex Conn [ 11/Dec/15 ] | |
|
Thanks; everything is building now. On to the testing ... | |
| Comment by Mark Benvenuto [ 10/Dec/15 ] | |
|
Yes, it defaults to x64. It will display the target processor during the configure steps. | |
| Comment by Rex Conn [ 10/Dec/15 ] | |
|
Unfortunately I have to support Win2008 (non-R2) for now. Does the 3.2 build default to x64? | |
| Comment by Mark Benvenuto [ 10/Dec/15 ] | |
|
I had copied build script from 3.0, and then modified. In 3.2, for SSL, use this:
My first comment also has the same answer. I would recommend --win-version-min=ws08r2 though if you are only targeting Windows 7 or later as it allows us to take advantage of reader writer locks in Windows. | |
| Comment by Rex Conn [ 10/Dec/15 ] | |
|
OK, changing it to CPPPATH made it go farther (past the thread local storage error & OpenSSL error). Now it says: SCons Error: no such option: --64 If I remove "--64" it does begin compiling, though I don't know if it's compiling for x86 or x64. | |
| Comment by Eric Milkie [ 10/Dec/15 ] | |
|
Mark had a typo in his command; it should be CPPPATH. | |
| Comment by Rex Conn [ 10/Dec/15 ] | |
|
The end of config.log shows the error: Libeay32.lib is in the same place it's always been (and the C++ driver build has no problem finding it). | |
| Comment by Rex Conn [ 10/Dec/15 ] | |
|
I tried your command line but it returns an error in scons: [s:\sdk\MongoDB-r3.2.0] scons --ssl CPPATH=s:\sdk\openssl-1.0.2d\include LIBPATH=s:\sdk\openssl-1.0.2d\win64\lib --release --64 --win-version-min=vista all | |
| Comment by Mark Benvenuto [ 08/Dec/15 ] | |
|
Please use the following command line: The command to build mongodb has changed in 3.2.
| |
| Comment by Adam Midvidy [ 08/Dec/15 ] | |
|
The end of config.log shows the error:
| |
| Comment by Rex Conn [ 08/Dec/15 ] | |
|
Config.log attached. | |
| Comment by Adam Midvidy [ 08/Dec/15 ] | |
|
Can you attach the contents of your MONGO_GIT_PATH/build/scons/config.log file? | |
| Comment by Rex Conn [ 08/Dec/15 ] | |
|
I know about OpenSSL; my real command line looks like this: scons --ssl --extrapath=s:\sdk\openssl-1.0.2d --libpath=s:\sdk\openssl-1.0.2d\win64\lib --release --64 --win-version-min=vista all Which doesn't work with the --ssl flag; scons doesn't even get to the point where it starts compiling. It throws the error when checking the environment. This works with 3.0.7 but not 3.2.0. | |
| Comment by Rex Conn [ 08/Dec/15 ] | |
|
Curiously, building the C++ 1.1.0 legacy driver works fine with the --ssl flag. | |
| Comment by Mark Benvenuto [ 08/Dec/15 ] | |
|
In order to build MongoDB with SSL on Windows, you need OpenSSL and a command line like the following:
where d:\lib\ssl is the location of your OpenSSL binaries. |