[CXX-2121] Compilation error with libc++ and C++ 17 Created: 21/Oct/20 Updated: 28/Oct/23 Resolved: 25/Oct/20 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build |
| Affects Version/s: | 3.6.0 |
| Fix Version/s: | 3.6.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Magnus Håkansson | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Using clang 10 on Debian and pass in -DCMAKE_CXX_STANDARD=17 and -DCMAKE_CXX_FLAGS="-stdlib=libc++" |
||
| Attachments: |
|
| Description |
|
I get this: In file included from /home/gho/code/pc3-mongo-cxx-driver/src/mongocxx/options/auto_encryption.cpp:15: |
| Comments |
| Comment by Kevin Albertson [ 26/Oct/20 ] |
|
As an update, we'll apply that fix on a 3.6.1 release. 94715d8cf has been applied to the 3.6 branch and will be included in the upcoming 3.6.1 release. |
| Comment by Magnus Håkansson [ 26/Oct/20 ] |
|
Great. Thanks. I will check more carefully on master next time. |
| Comment by Roberto Sanchez [ 25/Oct/20 ] |
|
magnus.l.hakansson@gmail.com, the r3.6.0 tag and the #include <string> workaround were the information I needed. This particular issue was recently fixed in commit 94715d8cf. At this moment, the next release that will include this fix will be 3.7.0. |
| Comment by Magnus Håkansson [ 23/Oct/20 ] |
|
My colleague found that if we add #include <string> to auto_encryption.hpp and client_encryption.hpp it works. |
| Comment by Magnus Håkansson [ 23/Oct/20 ] |
|
I'm sorry for the missing pieces in the description. I checked out the tag "r.3.6.0" Run cmake with: cmake -DCMAKE_PREFIX_PATH="/home/gho/code/pc3-mongo-cxx-driver/packages/mongo-c-driver/Debug" -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-stdlib=libc++" -DCMAKE_VERBOSE_MAKEFILE=ON .. The once that make a difference for me between success/fail is "-stdlib=libc++" build with make -j 10 mongocxx_static Clang version: clang version 10.0.0-++20200412072704+50d7e5d5e7d-1~exp1~20200412053303.133 The output I have attached in the ticket.
|
| Comment by Roberto Sanchez [ 22/Oct/20 ] |
|
magnus.l.hakansson@gmail.com I tried to reproduce this on Debian sid, but the full build succeeds for me. Could you provide the complete cmake command you are using, its full output, the complete build command, and its full output as well. You can attach the output to this ticket or email it to me. Additionally, please make sure that your CMake command includes the option -DCMAKE_VERBOSE_MAKEFILE=ON. |