BIND 10 #3213: BIND 10 doesn't compile/work on Mac OS X 10.9

BIND 10 Development do-not-reply at isc.org
Mon Oct 28 08:17:42 UTC 2013


#3213: BIND 10 doesn't compile/work on Mac OS X 10.9
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  UnAssigned
            Priority:  medium        |                       Status:  new
           Component:  build system  |                    Milestone:  New
            Keywords:                |  Tasks
           Sensitive:  0             |                   Resolution:
         Sub-Project:  Core          |                 CVSS Scoring:
Estimated Difficulty:  0             |              Defect Severity:  N/A
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 I've pushed my proposed fixes to the "jinmei-mavericks" branch.  I'd
 appreciate it if someone could review and (if okay) merge it.

 As noted in the ticket's description, there are several different
 issues.  Some of them are related to the fact that OS X has now
 completely migrated from gcc to clang with integrated support for C++11.

 - we need to suppress some spurious warning from clang++ so it
   compiles with -Werror.
 - now that some definitions under the boost namespace are also in the
   "std" namespace, we cannot do both "using namespace std" and
   e.g. "using boost::shared_ptr".  Same for some asio definitions.
   (I suggest revising the coding guideline so you'll at least avoid
   "using namespace std" from now on; as more system supports C++11
   you'll see more such problems).
 - the standard C++ library used in Mavericks (clang libc++) doesn't
   allow ifstream::putback(c) unless 'c' is not the latest character
   extracted from the stream.  Some code of lib/cc/data.cc assumes this
   is safe, so it doesn't break the behavior (unit tests fail, and I
   suspect it affects the actual system, too).  Note that it was
   already a bug, as not all istream (even possibly) allow this
   assumption.  So this is a fix to a general bug, but just more
   critical for OS X.
 - also, istream::operator>>(stringbuf*) now doesn't skip space
   characters.  This is (probably) based on the revised specification
   C++11, but it doesn't seem to be possible to specify the old
   behavior.  It may be a kind of bug of clang, but we need to deal
   with it somehow.   In the BIND 10 code, libdns++'s masterLoad()
   relies on the old behavior, so we need to fix it.  My proposed fix
   is to use the more generic and better parser class, MasterLoader.
 - pthread_cond_destroy() doesn't (seem to) return EBUSY when another
   thread is waiting on it.  a unit test relies on this behavior and
   now fails.  this may be a bug of the library, but, again, we need to
   deal with it.  Since this is just for tests, my suggestion is to
   disable it on Mavericks.
 - one test in asiodns intermittently failed.  it looks like the way
   I/O events are delivered through ASIO doesn't meet the test
   assumption.  I've refactored the test so it will work more reliably.

 Also, these are not really a problem of the BIND 10 source code, but
 may be useful for someone who uses Mavericks:

 - google tests 1.6 and older don't seem to compile with clang++ on
   Mavericks (looks like another issue due to the C++11 support).
   gtest 1.7 works.
 - Boost 1.54 seems to be necessary for clean build (some older
   versions may work if -Werror is disabled)

-- 
Ticket URL: <http://bind10.isc.org/ticket/3213#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list