Send kea-dev mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.isc.org/mailman/listinfo/kea-dev
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of kea-dev digest..."


Today's Topics:

   1. Re:  Makefile.am guideline (Francis Dupont)
   2.  Logging in sample hook module - missing
      log/message_dictionary.h (Raj raj)
   3. Re:  Logging in sample hook module - missing
      log/message_dictionary.h (Stephen Morris)


----------------------------------------------------------------------

Message: 1
Date: Wed, 16 Sep 2015 14:30:47 +0000
From: Francis Dupont <[email protected]>
To: Stephen Morris <[email protected]>
Cc: [email protected]
Subject: Re: [kea-dev] Makefile.am guideline
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

Stephen Morris writes:

=> appled SUBDIRS and CPPFLAGS rephrasings.

> > Directory variables should be relative (i.e., no abs_top_builddir)
> > for efficiency.
> 
> [Question: why is this?]

=> efficiency. In fact the rule is to avoid absolute and possibly long
paths for temporary use, i.e., when the paths won't be compiled into
the code, used for installation by libtool, etc. And don't forget
that relative paths are very portable too.
(for the guidelines IMHO the "for efficiency" is enough).

> > Third (or more) levels should not be used, e.g.:
> 
> Suggest: "To make the files easier to understand, third (or more) levels
> should not be used, e.g."

=> my problem with your clarification is it is ambiguous (what are
"the files"). BTW do we need to justify rules?

> I would add a sentence explaining the difference between the "CPPFLAGS"
> and "CXXFLAGS" variables, as both end up on the C++ command line.

=> C++ compiler uses are supposed to know but I agree we should add
a guideline (:-). What about:
CXXFLAGS are for compiler specifics flags, for instance g++ -fxxx
flags, when CPPFLAGS are mainly for include paths.

> It's a good start.  Let's put it in the coding guidelines.  We can
> always add to it/modify it as needed.

=> this is now in coding guidelines (and #3911 merged).

Thanks

Francis Dupont <[email protected]>


------------------------------

Message: 2
Date: Wed, 16 Sep 2015 20:23:31 +0530
From: Raj raj <[email protected]>
To: [email protected]
Subject: [kea-dev] Logging in sample hook module - missing
        log/message_dictionary.h
Message-ID:
        <cae56t+x4sji5geho-w0uebddlz7tjgwuiieoj9rfzxguyve...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Dear List,

I am following the Hooks developer guide, and am able to get the
sample module up and running. Next I am trying to get logging working
inside the hook. I have tried to follow the docs, but may have missed
some thing, In any case when I compile the code, I get the following
error:

# g++ -I /usr/local/include/kea/ -L /usr/local/lib/ -fpic -shared -o
example.so load_unload.cc hook_packet_capture.cc pkt4_send.cc
pkt_receive4.cc version.cc -lkea-dhcpsrv -lkea-dhcp++ -lkea-hooks
-lkea-log -lkea-util -lkea-exceptions
In file included from packet_capture_log.h:4:0,
                 from load_unload.cc:6:
/usr/local/include/kea/log/message_initializer.h:18:36: fatal error:
log/message_dictionary.h: No such file or directory
 #include <log/message_dictionary.h>
                                    ^
compilation terminated.
In file included from hook_packet_capture.cc:5:0:
/usr/local/include/kea/log/message_initializer.h:18:36: fatal error:
log/message_dictionary.h: No such file or directory
 #include <log/message_dictionary.h>
                                    ^
compilation terminated.

I have created  the packet_capture_log.h with same content as shown in
the doc and added the following section in the load_unload.cc

#include <packet_capture_log.h>
namespace packet_capture {
isc::log::Logger packet_capture_logger("packet-capture");
}

I have created a sample message file with name hook_packet_capture.mes
with following content:

# Example message file
$NAMESPACE isc::log

% HOOK_FILE_STATUS file %1: return code '%2'
Return code of the hook file opening block

compiled the mes file using the following command:

# message hook_packet_capture.mes

and ran the g++ command to compile.

I am not sure if what I am doing is correct. Any help to resolve this
would be much appreciated.

Thanks and Regards,

Raj


------------------------------

Message: 3
Date: Thu, 17 Sep 2015 09:03:16 +0100
From: Stephen Morris <[email protected]>
To: [email protected]
Subject: Re: [kea-dev] Logging in sample hook module - missing
        log/message_dictionary.h
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252

On 16/09/2015 15:53, Raj raj wrote:
> Dear List,
> 
> I am following the Hooks developer guide, and am able to get the
> sample module up and running. Next I am trying to get logging working
> inside the hook. I have tried to follow the docs, but may have missed
> some thing, In any case when I compile the code, I get the following
> error:
> 
> # g++ -I /usr/local/include/kea/ -L /usr/local/lib/ -fpic -shared -o
> example.so load_unload.cc hook_packet_capture.cc pkt4_send.cc
> pkt_receive4.cc version.cc -lkea-dhcpsrv -lkea-dhcp++ -lkea-hooks
> -lkea-log -lkea-util -lkea-exceptions
> In file included from packet_capture_log.h:4:0,
>                  from load_unload.cc:6:
> /usr/local/include/kea/log/message_initializer.h:18:36: fatal error:
> log/message_dictionary.h: No such file or directory
>  #include <log/message_dictionary.h>
>                                     ^

It looks as if message_dictionary.h is not being copied across to the
installation directory.  This is an error and a ticket has been created
for it in our issue tracking system.

To overcome this, copy the file src/lib/log/message_dictionary.h
from the tarball you downloaded to the appropriate installation
directory (which, from your post, seems to be /usr/local/include/kea/log).

Stephen



------------------------------

_______________________________________________
kea-dev mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-dev

End of kea-dev Digest, Vol 18, Issue 6
**************************************

Reply via email to