On 01/06/2016 01:53 PM, Emily Gu wrote:
Thanks Rob for your quick response.

I used "git clone..." to clone the Mozilla Heka under my gvm pkgset
src/github/mozilla-service directory. Then ran "source build.sh" and
"make install".  In my own project, when I reference

Heka installs itself into its own Go environment, completely separate from any other Go environment that you might be using. For this reason I don't recommend trying to manage it with gvm, or any other of the myriad Go package / version management tools. Just check out the repo, run ". build.sh", and a self-contained go environment will be created inside the build folder. Sourcing either `env.sh` or `build.sh` will correctly set up your PATH and GOPATH vars to use this environment so you can work on or with Heka.

"github.com/mozilla-services/heka/pipeline
<http://github.com/mozilla-services/heka/pipeline>"

It gave the error.

Were you saying that I need to register my project in Heka in order for
me to reference its libs?  Is it in this file?

"heka/cmake/externals.cmake"

It's not registering with Heka, really. It's just telling the build that your package should be included in the build. Your package must provide an `init()` function that should register the plugins as available to Heka.

There is no "plugin_loader.cmake".

No, there's not, you have to create it.

As my project is not checked into
github yet, can I do this:

add_external_plugin(<path to my project> :local)

If you use the :local tag, then add_external_plugin will ignore the URL and will instead expect to find your source code in the externals folder. But even so, I strongly recommend using the URL of where you will end up putting the repo when you do eventually upload it. The idea is that you can switch back and forth btn using the remote version and using your local version only by changing the tag value from `:local` to some actual remote tag or SHA. So in your case you'd want:

add_external_plugin(git https://github.com/<YOUR_GITHUB_ID>/<YOUR_PROJECT_NAME> :local)


Thanks,

You're welcome, hope this helps,

-r



Emily


On Wed, Jan 6, 2016 at 11:34 AM, Rob Miller <[email protected]
<mailto:[email protected]>> wrote:

    Not sure how you're trying to compile Heka. The recommended way, as
    noted in the docs
    
(http://hekad.readthedocs.org/en/v0.10.0/installing.html#building-hekad-with-external-plugins),
    is to put your code in an `externals` folder and add a
    `cmake/plugin_loader.cmake` file that uses the special `:local` tag
    to specify that your package is on your local hard drive. Then `.
    build.sh` (and `make`, after the environment is sourced) will work.

    If you know what you're doing the go tools can be used, but you have
    to make sure the GOPATH environment is set up correctly, which you
    can do by running `. env.sh` from the Heka repo root directory.

    -r


    On 01/06/2016 11:14 AM, Emily Gu wrote:

        Dear Hekas,

        I'm writing a Heka plugin for our project. After clone Heka
        master and
        follow the installation instruction to build it, I got the following
        compilation error when import
        "github.com/mozilla-services/heka/pipeline
        <http://github.com/mozilla-services/heka/pipeline>
        <http://github.com/mozilla-services/heka/pipeline>" in
        myplugin.go file.

        # github.com/mozilla-services/heka/message
        <http://github.com/mozilla-services/heka/message>
        <http://github.com/mozilla-services/heka/message>

        ../../../mozilla-services/heka/message/message_matcher.go:21:
        undefined:
        tree

        It blocks my work. Your timely help is greatly appreciated.

        Thanks,

        Emily



        _______________________________________________
        Heka mailing list
        [email protected] <mailto:[email protected]>
        https://mail.mozilla.org/listinfo/heka



_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to