libmemcached does not compile on OSX Mavericks pre-release version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmemcached |
Fix Committed
|
Medium
|
Brian Aker |
Bug Description
I tried to install libmemcached on OSX Mavericks with brew, and finally got it working with some workarounds, but I am not sure if my solution is good, probably you can provide better fix (or maybe it's Apple's pre-release software problem, it's hard for me to judge). The history of the problem is described in detail in the github issue for homebrew: https:/
Here is the summary/excerpt:
When you try to install libmemcached using brew it fails with missing tr1 include. Apparently other libraries have similar problem.
It worked fine on Mountain Lion.
Steps to Reproduce:
Have XCode installed
Install homebrew ruby -e "$(curl -fsSL https:/
type 'brew install libmemcached'
Expected Results:
The library should be compiled and installed.
Actual Results:
The following output is displayed:
==> Downloading https:/
Already downloaded: /Library/
==> ./configure --prefix=
==> make install
# include <tr1/cinttypes>
^
1 error generated.
make[1]: *** [libmemcached/
make: *** [install] Error 2
Workaround:
I managed to workaround it by adding path to OSX's includes containing tr1 includes as well as adding libstdc++ directly to LIBS in order to avoid some missing symbols (https:/
Possible reasons:
Some analysis what could go wrong. I am not an expert in C++ libraries and compilation (i have not worked with C++ for some 10 years or so), but I've learned a ton about it and brew mechanisms in the process ;) (BTW. Thanks to brew team for --verbose --debug switches. they made my day!). Besides missing include path, we also have the missing libstdc++. From what I understand libc++ (which was already linked) is a c++11 implementation of standard libraries. OSX's llvm is already 100% compliant with it but some symbols were missing (see below for some example stdlib symbols missing in libc++)
So either libmemcached is 'almost c++11 compliant' and still uses some deprecated C++ stdlib methods or the library in OSX missed some methods in this prerelease version.
I presume it's a libmemcached problem because just putting tr1 includes on the include path causes some macro redefnition warnings, which (guts feeling) - are caused by mem_config.h using some old stdlib includes.
Macro redefinitions:
In file included from /Applications/
/Applications/
#define __STDC_LIMIT_MACROS
^
./mem_config.
In file included from note: ./libmemcached/
definitionIn file included from ./libmemcached-
In file included from
/Applications/
/Applications/
42: ^9
: warning: '__STDC_
#define __STDC_LIMIT_MACROS
^
./mem_config.
Missing symbols:
Undefined symbols for architecture x86_64:
"std:
_main in core_count.o
help_
"std:
_main in core_count.o
help_
"std:
_main in core_count.o
help_
"std::ostream& std::ostream:
_main in core_count.o
"std:
_main in core_count.o
help_
Changed in libmemcached: | |
assignee: | nobody → Brian Aker (brianaker) |
I also reported the problem to Apple: 14827477 (no link, because I believe you can only see your own problems reported to Apple :( ), I am not sure who is best to address it, but If you happen to know what Apple should correct in order to have it fixed, I might update the ticket there.