BIND 10 #745: Conversion of nsas library to use the new logging interface

BIND 10 Development do-not-reply at isc.org
Thu May 5 11:21:00 UTC 2011


#745: Conversion of nsas library to use the new logging interface
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  vorner
  stephen                            |                Status:  reviewing
                       Type:         |             Milestone:
  enhancement                        |  Sprint-20110517
                   Priority:  minor  |            Resolution:
                  Component:         |             Sensitive:  0
  resolver                           |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  4.0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  logging                            |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by stephen):

 * owner:  stephen => vorner


Comment:

 > I removed one + that was left in the message definitions.
 Thanks.

 > I vaguely remember there was a compiler that had problems with const
 ints defined and initialized in header files and you use them for the
 debug levels. Maybe using them as static/in anonymous namespace or as an
 enum? But I don't remember which compiler it was, mine doesn't complain.
 There shouldn't be a problem: "in C, constant values default to external
 linkage, so they can appear only in source files. In C++, constant values
 default to internal linkage, which allows them to appear in header files."
 (From http://msdn.microsoft.com/en-us/library/357syhfh%28v=vs.71%29.aspx)

 > Also, while working on the datasrc library, I discovered the message
 compiler doesn't find the definitions when run from make distcheck,
 because the compilation happens in a different directory, so I had to
 modify the makefile and the compiler slightly. How is it possible it finds
 your message definitions and everything works?
 Magic! :-)  Actually, I think that there are several causes.  My guess is
 that in this ticket, it worked because:
 a. You did a build before doing a "make distcheck".
 b. The Makefile.am in this ticket was incomplete - it did not include the
 created files on the CLEANFILES line. (In fact it also missed a couple of
 other lines as well - an update to this branch corrects that.)

 Due to (a) the nsasdef.{cc,h} files were created in the source directory
 and because of (b) weren't tidied up when you did "make clean".  As a
 result, "make distcheck" was able to find them when it created the
 distribution.

 As to #744: Automake has to copy the generated files when creating the
 distribution because they are listed in the <library>_SOURCES variable.
 As they don't exist, it applies the dependency rule and tries to create
 them from the message file using the message compiler. Unfortunately at
 this stage the message compiler does not exist, hence the error.  The
 solution is not to distribute the generated files, which can be done by
 putting them in the noinst_<library>_SOURCES variable instead.

 What puzzles me though is why updating the message compiler fixed it in
 ticket #744 - my guess is that this was coincidental.  (More on the
 message compiler in the review of that ticket.)

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


More information about the bind10-tickets mailing list