-
Notifications
You must be signed in to change notification settings - Fork 15
Fix compilation on OSX #20
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
Conversation
Hi, Saúl: I am not seeing the same error when I build either branch on MacOS 10.9.2 or 10.7.5, using either gcc or clang. I'm using Apple's Xcode in both environments. Can you provide more background on your build environment? Does it happen when you do a clean build (clone into a new directory and build that)? As a matter of style I prefer not to #include c files in other c files, but either way if this really is a problem we'll get it fixed. |
Hi Melinda, I'm using OSX 10.9.4, using the following clang version:
That's the one corresponding to Xcode 5.1. I'm compiling it as follows:
Thanks for the quick response! |
5a48f63
to
24207ea
Compare
Ah, I just found a simpler fix: declare getdns_error as extern in the include file. I still left the commit with the guards there since it's good practice anyway. Can you have another look? |
24207ea
to
a381c1c
Compare
Hi, Saúl: Looks like you're running an old version of the code. That one was fixed awhile ago, as part of fixing a problem in the way exceptions were being "bubbled up". You'll probably want to pick up a new version of the module, since the newer version has bugfixes plus support for asynchronous lookups. I'm going to take the liberty of closing this, since it's already fixed. |
Well, FWIW the problem does indeed not show up on master, but it does on the develop branch, which is "newer". |
If you take a look at the current version of the code, you'll find that there's no longer a declaration for getdns_error in getdns.c. |
Sure, I do see that. I'm a bit confused, however: the async support is only On Sunday, August 24, 2014, Melinda Shore [email protected] wrote:
/Saúl |
Hi, Saúl: this really wasn't ringing any bells, so I went through the code, back to the beginning, and while there was a declaration of getdns_error in initgetdns that should not have been there (and which has since been long gone), there was never a global declaration of getdns_error in getdns.c that I can find, browsing the repo. Are you sure that you're working with a clean clone of the source? |
There seems to be confusion. What's the latest branch that users should build out of? Master was last written to on 6/16. Dev 4 hours ago. |
On 8/24/14 4:36 PM, ngoyal wrote:
Right - develop is the one containing the code that's about to be I'll be releasing the new stuff tonight. Melinda Shore "Software longa, hardware brevis." |
Sorry for the delay, timezones! Now that I'm fully awake, I tried this again. And it continues to fail. Moreover, master now also fails, since develop was merged into it. Maybe this clang version is very picky (it is), but the error seems quite legit to me:
I can confirm this problem doesn't happen when compiling with GCC on a Linux system, however. |
FWIW compiling from @saghul's fix-compilation branch works for me [0] under [1]. Thanks! [0] https://gist.github.com/ioc32/4f0bab24c01d982e6cc8 |
Someone was complaining yesterday about differences in Python installations with the same version numbers, and I realized that I'd been using a locally-built copy compiled from source. When I switched back to the default MacOS installation I began seeing the problems that Paul reported. I'm reopening this, and also creating an issue tracker issue. |
Thanks, Melinda! |
Compilation fails on OSX with the following error:
This PR fixes it by making getdns.c the only compilation target.