OS X 10.9 compile problems #2806

issue maciej-trebacz openend this issue on July 1, 2013
  1. maciej-trebacz commented at 5:47 am on July 1, 2013: none

    I’m using homebrew to install bitcoind on OS X. On 10.8 it worked fine, but on 10.9 beta it doesn’t - I get a compiler error.

    I think it’s because on 10.9 Apple exclusively switched away from GNU gcc in favor of clang, and also opted out of stdlibc++ in favor of it’s own libc++ implementation. The error and homebrew log are as follows:

    In file included from alert.cpp:11: In file included from /private/tmp/bitcoind-FMyT/src/alert.h:13: In file included from /private/tmp/bitcoind-FMyT/src/util.h:31: In file included from /private/tmp/bitcoind-FMyT/src/netbase.h:10: /private/tmp/bitcoind-FMyT/src/serialize.h:911:10: error: class member cannot be redeclared void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const... ^ /private/tmp/bitcoind-FMyT/src/serialize.h:898:10: note: previous declaration is here void insert(iterator it, const_iterator first, const_iterator last) ^ /private/tmp/bitcoind-FMyT/src/serialize.h:911:10: error: redefinition of 'insert' void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const... ^ /private/tmp/bitcoind-FMyT/src/serialize.h:898:10: note: previous definition is here void insert(iterator it, const_iterator first, const_iterator last) ^ 2 errors generated. make: *** [obj/alert.o] Error 1 ==> Formula Tap: wysenynja/bitcoin Path: /usr/local/Library/Taps/wysenynja-bitcoin/bitcoind.rb ==> Configuration HOMEBREW_VERSION: 0.9.4 HEAD: f9223a5bac46749558bd4c9a6df8c06d929b846b CPU: quad-core 64-bit ivybridge OS X: 10.9-x86_64 Xcode: 5.0 => /Library/Developer/CommandLineTools X11: N/A ==> ENV HOMEBREW_CC: clang MAKEFLAGS: -j1 CMAKE_PREFIX_PATH: /usr/local/opt/berkeley-db4:/usr/local CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/Python.framework/Versions/2.7/Headers CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_PATH: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9 HOMEBREW_MAKE_JOBS: 1 ACLOCAL_PATH: /usr/local/share/aclocal OBJC: cc PATH: /usr/local/Library/ENV/4.3:/usr/local/opt/berkeley-db4/bin:/usr/bin:/bin:/usr/sbin:/sbin

    And here is another error that I get when I “fix” previous one by just deleting one of the offending constructors:

    In file included from rpcdump.cpp:5: In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/iostream:38: In file included from /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/ios:216: /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/__locale:144:29: error: cannot initialize a parameter of type 'std::__1::locale::facet *' with an lvalue of type 'const boost::date_time::time_input_facet<boost::posix_time::ptime, char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > > *' __install_ctor(__other, __f, __f ? __f->id.__get() : 0); ^~~ rpcdump.cpp:32:23: note: in instantiation of function template specialization 'std::__1::locale::locale<const boost::date_time::time_input_facet<boost::posix_time::ptime, char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > > >' requested here const std::locale loc(std::locale::classic(), &facet); ^ /Library/Developer/CommandLineTools/usr/bin/../lib/c++/v1/__locale:96:46: note: passing argument to parameter here void __install_ctor(const locale&, facet*, long);

    Does anyone have an idea how this can be fixed? I can provide more information if necessary.

  2. lazyjay commented at 4:45 am on July 10, 2013: none
    +1
  3. medoix commented at 2:00 am on October 3, 2013: none
    +1
  4. jonasschnelli commented at 9:10 am on October 3, 2013: contributor
    i’m just installing 10.9 DP3 VM to take a closer look at it. 10.9 will be released soon and compatibility should/must be ensured within the next couple of weeks.
  5. gavinandresen commented at 2:25 am on October 4, 2013: contributor
    What version of clang++ and boost? I use clang++ 3.3 and boost 1.54 in my development environment (OSX 10.7 for the last couple months, but was 10.8 before) with no issues.
  6. maciej-trebacz commented at 6:09 am on October 4, 2013: none

    About clang++:

    ~ clang++ –version Apple LLVM version 5.0 (clang-500.2.75) (based on LLVM 3.3svn) Target: x86_64-apple-darwin13.0.0

    What version of clang++ and boost? I use clang++ 3.3 and boost 1.54 in my development environment (OSX 10.7 for the last couple months, but was 10.8 before) with no issues.

    — Reply to this email directly or view it on GitHub.

  7. konieczkow commented at 9:40 am on October 25, 2013: none
    +1
  8. awt commented at 6:09 pm on October 26, 2013: none
    +1
  9. sipa commented at 6:51 pm on October 26, 2013: member
    @M4v3R In addition to #3162, does removing the ‘const’ before the declaration of ‘std::locale loc’ help?
  10. nvmd commented at 9:05 pm on November 4, 2013: contributor
    @sipa Yes, it helps. I’ve just created a pull request #3198
  11. nvmd commented at 9:12 pm on November 4, 2013: contributor
    Should these changes (requests #3162 and #3198) be backported to 0.8.5 branch? No one wants to wait till the next client version comes out to have it running on Mavericks.
  12. gavinandresen closed this on Nov 5, 2013

  13. Bushstar referenced this in commit 162acc5a0d on Apr 5, 2019
  14. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-13 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me