-
Notifications
You must be signed in to change notification settings - Fork 34
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
Consider switching to c++11 #58
Comments
Hi. I made a branch that is the modified master to be compiled with C++11. |
Thank you so much for creating the branch so quickly. I tried it right away (last night), came across a couple of problems (explained below), but that was it. It compiled and my AWS Lambda demo app is running fine. 2 const related compile errorsThe following message are warnings with the compiler on my mac, but these are
I simply removed the nlohmann/json do not compile with gcc < 4.9The error occurs in this line: #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
#endif
#endif Looking at the past issues, it appears that this module was suffering from a compiler issue with gcc earlier than 4.9. Actual compile errors were fixed, but the author thinks it only partially solves the problem (I don't know exactly what not solved), left the above gcc compiler version guard. There were two other issue tickets regarding gcc 4.8, but both of them were marked as It is so unfortunate because AWS Lambda's gcc is 4.8.3. I modified |
I would also vote for c++11 to try to be natively compatible with redhat/centos 6&7 which are still by default on gcc 4.8. Tks. |
I noticed that current AWS Lambda did not support libstdc++.so with GLIBCXX_3.4.20 or greater, which means all dependencies must be compiled with gcc < v5.0. (C++14 is not supported)
It is a great disadvantage for Menoh since AWS Lambda is very popular now...
One of the obvious workarounds would be to put new version of libstdc++.so and all of its dependencies inside the Lambda deployment package, however, that increases the size of the package unnecessarily, and it makes creating such package a lot more difficult for developers.
I believe, future AWS Lambda would allow gcc >= v5.0 in the future, but such plan is unknown. A similar problem could occur in other use cases than AWS Lambda also. In order to increase usability/applicability of Menoh, we may need to consider making Menoh-core C++11 compatible.
The text was updated successfully, but these errors were encountered: