-
Notifications
You must be signed in to change notification settings - Fork 94
No longer builds on OS X #52
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
Comments
In case it's helpful, here's the patch:
|
Actually, to get
This one is in common code; I don't know whether it works on Linux. |
Yes. Lambda only runs on Linux. So why bother with maintaining the code on macOS? see #34 for a similar question/answer. |
If anything, I should add a better compiler error when building on macOS. #ifdef __APPLE__
#error "You should not be using macOS for building Lambda. Only Linux binaries will work on AWS Lambda."
#endif |
Yes, that would be good; the code as it stands looks like it should support Mac OS when in fact your intention is quite the opposite, and that is confusing, at best. Thanks for the response! (And, thanks for supporting C++-based Lambda functions!) |
I do development for a variety of targets (mostly Docker-based). I do my actual deployment builds on Ubuntu, but it's been really handy to be able to do test builds in my local environment which is Mac OS X.
I just started setting up a new development environment, and I pulled fresh
aws-lambda-cpp
sources, and, I'm sad to report, they no longer build on OS X. The last time I pulled the code foraws-lambda-cpp
was in March, and they built fine then. That was prior to the v0.2.0 changes for stack trace support.I realize that that OS X is not quite Linux (i.e., it's Darwin, which I believe is a BSD derivative), and that
aws-lambda-cpp
is targeted at Linux. But, it would be really nice if I could at least build locally.Looking at the
aws-lambda-cpp
source, I see what look like provisions for Darwin ininclude/backward.h
, but they don't seem to be being used. Here's what I get when I try to build the currentaws-lambda-cpp
commit:I presume that this is because the compiler is being forced down the Linux path by line 46.
Commenting that line out and allowing the file to auto-detect the platform allows my build on OS X to get far enough to hit a complaint about converting
size_t
to anint
in the invocation ofbacktrace_symbols()
inTraceResolverDarwinImpl<>::load_stacktrace()
.If I add the same typecast there which was added to
TraceResolverLinuxImpl<>::load_stacktrace()
, then the build completes.Was there a reason for forcing the compilation down the Linux path? (E.g., does the auto-detection code not work reliably?) If not, would you be willing to accept a change to allow the code to build on OS X? (The two changes are trivial -- I could submit a pull request if you don't want to do them by hand.)
The text was updated successfully, but these errors were encountered: