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
Issue 30: Build fails on Ubuntu 11.10 (changed ld default behavior) #34
Conversation
This patch explicitly sets the ld option '--no-as-needed'. In Ubuntu 11.10, the default behavior of ld was changed to '--as-needed', which breaks the src/native/configure script and its detection of the native liblzo2 library. More information is available at: https://github.com/kevinweil/hadoop-lzo/issues/33
looks good. This option exists in older ld as well, right? |
As far as I know, yes. I have seen that even ld on ancient RHEL5 comes with that option. From what I understand only the default behavior was changed but the options (--no-as-needed and --as-needed) already existed since some time. |
Issue 30: Build fails on Ubuntu 11.10 (changed ld default behavior)
Michael, as it turns out, this breaks the build on OS X Lion: configure:3360: checking whether the C compiler works Suggestions? |
Hi Dmitriy, I don't have a Mac at work to investigate this directly, but I do have some follow-up questions: 1) Does ld on Mac (Lion) work "correctly" out of the box? In other words, does it by default also link libraries which are specified on the command line but never actually used in the C code? (This would be the same behavior as running ld on Linux with '--no-as-needed') If that's the case, then maybe updating This is the relevant section in
In Maven we could use profiles to accomplish this pretty easily, but since hadoop-lzo uses ant I can't tell you off the top of my head how such a switch could be implemented. That said, I noticed the following snippet in
If properties in ant can be dynamically set in this way, maybe this feature can also be used to set/unset I found a blog post of someone trying exactly this using Ant properties: As I said I don't have a Mac here so I can't test it myself, but I think this should work. 2) Alternatively, the "test" C code that will be used to check for liblzo2 could be changed in a way that it actually does call liblzo2 in some way. Then ld would be forced to link liblzo2 in any case.
The above snippet is the relevant line in Does this help? PS: Oh, maybe the same issue with ld exist not only on Mac but maybe on other BSD-based systems, too? |
Hi Dmitriy, has this issue for Mac OS X been solved? |
Yes, Raghu fixed it in the latest release On Jan 13, 2012, at 1:49 AM, "Michael G. Noll"reply@reply.github.com wrote:
|
This patch explicitly sets the ld option '--no-as-needed'. In Ubuntu
11.10, the default behavior of ld was changed to '--as-needed', which
breaks the src/native/configure script and its detection of the native
liblzo2 library.
More information is available at:
https://github.com/kevinweil/hadoop-lzo/issues/33