You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by sl4mmy <gi...@git.apache.org> on 2018/07/03 17:45:24 UTC

[GitHub] zookeeper pull request #557: ZOOKEEPER-3077: build outside of source directo...

GitHub user sl4mmy opened a pull request:

    https://github.com/apache/zookeeper/pull/557

    ZOOKEEPER-3077: build outside of source directory

    Allow building native C library outside of source directory by explicitly
    looking for jute generated header and source files inside source directory.
    
    Signed-off-by: Kent R. Spillner <ks...@acm.org>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sl4mmy/zookeeper zookeeper-3077

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zookeeper/pull/557.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #557
    
----
commit c9a5365e4145c7bd35555a923bff081cdee6f72d
Author: Kent R. Spillner <ks...@...>
Date:   2018-07-03T17:42:37Z

    ZOOKEEPER-3077: build outside of source directory
    
    Allow building native C library outside of source directory by explicitly
    looking for jute generated header and source files inside source directory.
    
    Signed-off-by: Kent R. Spillner <ks...@acm.org>

----


---

[GitHub] zookeeper issue #557: ZOOKEEPER-3077: build outside of source directory

Posted by phunt <gi...@git.apache.org>.
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/557
  
    +1, LGTM. Worked fine testing on ubuntu/master. Thanks @sl4mmy !


---

[GitHub] zookeeper pull request #557: ZOOKEEPER-3077: build outside of source directo...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zookeeper/pull/557


---

[GitHub] zookeeper issue #557: ZOOKEEPER-3077: build outside of source directory

Posted by sl4mmy <gi...@git.apache.org>.
Github user sl4mmy commented on the issue:

    https://github.com/apache/zookeeper/pull/557
  
    No takers?  :)
    
    I know this touches nasty autoconf stuff, but in my opinion it's actually simple & straight-forward:
    
    * At present you cannot build the native client in a separate build directory.  This is a common pattern for native software using autotools in order to avoid polluting your source dir or local working copy with build artifiacts: you create a `build/` directory somewhere, cd into it, and then run `relative/path/to/configure` and `make` in that directory.  All of the build artifacts will then be created under that `build/` directory.
    * The reason why this doesn't work currently is because `src/c/configure.ac` checks for the presence of `zookeeper.jute.c` and `zookeeper.jute.h` using relative paths which are resolved at configure time, not build time.  So running `relative/path/to/configure` inside your `build/` directory fails because there's no `generated/` subdirectory under `build/`.
    * The fix is simply to prefix the path to the generated jute files with autoconf's `$srcdir` variable (see: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html#Preset-Output-Variables)


---

[GitHub] zookeeper issue #557: ZOOKEEPER-3077: build outside of source directory

Posted by lvfangmin <gi...@git.apache.org>.
Github user lvfangmin commented on the issue:

    https://github.com/apache/zookeeper/pull/557
  
    +1 this looks good to me.


---