ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1034

perl bindings should automatically find the zookeeper c-client headers

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.4.0
    • Component/s: contrib
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Net::ZooKeeper now looks in some sane places for the c client includes

      Description

      Installing Net::ZooKeeper from cpan or the zookeeper distribution tarballs will always fail due to not finding c-client header files. In conjunction with ZOOKEEPER-1033 update perl bindings to look for c-client header files in INCDIR/zookeeper/

      a.k.a. make installs of Net::ZooKeeper via cpan/cpanm/whatever just work, assuming you've already got the zookeeper c client installed.

      1. ant.test-1034
        16 kB
        Nicholas Harteau
      2. ant.test-nopatch
        16 kB
        Nicholas Harteau
      3. ZOOKEEPER-1034-trunk.patch
        4 kB
        Mahadev konar
      4. ZOOKEEPER-1034-trunk.patch
        4 kB
        Nicholas Harteau

        Activity

        Hide
        Nicholas Harteau added a comment -

        src/contrib/zkperl now both checks to see if it can find zookeeper_version.h in some sane places, and the Makefile.PL compiles and prints the client version, warning if it's not 3.x

        this could be a fatal error but we have only been checking to see if '#include "zookeeper_version.h"' works for some time now, so warning seemed safer.

        this change sorta-depends on ZOOKEEEPER-1033 putting stuff into a sane location, but the failure mode without ZOOKEEPER-1033 is the same, as users today need to tweak Makefile.PL options in order to get the perl module to install.

        zkperl test suite passes.

        Show
        Nicholas Harteau added a comment - src/contrib/zkperl now both checks to see if it can find zookeeper_version.h in some sane places, and the Makefile.PL compiles and prints the client version, warning if it's not 3.x this could be a fatal error but we have only been checking to see if '#include "zookeeper_version.h"' works for some time now, so warning seemed safer. this change sorta-depends on ZOOKEEEPER-1033 putting stuff into a sane location, but the failure mode without ZOOKEEPER-1033 is the same, as users today need to tweak Makefile.PL options in order to get the perl module to install. zkperl test suite passes.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12474748/ZOOKEEPER-1034-trunk.patch
        against trunk revision 1082362.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/206//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/206//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/206//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12474748/ZOOKEEPER-1034-trunk.patch against trunk revision 1082362. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/206//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/206//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-ZOOKEEPER-Build/206//console This message is automatically generated.
        Hide
        Ivan Kelly added a comment -

        Looks good.

        +1 once ZOOKEEPER-1033 is in.

        Show
        Ivan Kelly added a comment - Looks good. +1 once ZOOKEEPER-1033 is in.
        Hide
        Patrick Hunt added a comment -

        Hi Nicholas, I tried this patch however the instructions in the README don't seem to match - at least I can't build using them.

        Can you update the patch to include updates to the README? (looks like there's quite a bit of stale data in there that might also be cleaned up, re old releases and such).

        Thanks.

        Show
        Patrick Hunt added a comment - Hi Nicholas, I tried this patch however the instructions in the README don't seem to match - at least I can't build using them. Can you update the patch to include updates to the README? (looks like there's quite a bit of stale data in there that might also be cleaned up, re old releases and such). Thanks.
        Hide
        Nicholas Harteau added a comment -

        do you mean the section that refers to the --path-to-stuff? how are you trying to build that's failing?

        Show
        Nicholas Harteau added a comment - do you mean the section that refers to the --path-to-stuff? how are you trying to build that's failing?
        Hide
        Nicholas Harteau added a comment -

        include update to README

        Show
        Nicholas Harteau added a comment - include update to README
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12483405/ZOOKEEPER-1034-trunk.patch
        against trunk revision 1138213.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/346//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/346//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/346//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12483405/ZOOKEEPER-1034-trunk.patch against trunk revision 1138213. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/346//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/346//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/346//console This message is automatically generated.
        Hide
        Nicholas Harteau added a comment -

        pretty sure that failing core test isn't related to 1034.

        Show
        Nicholas Harteau added a comment - pretty sure that failing core test isn't related to 1034.
        Hide
        Nicholas Harteau added a comment -

        Patrick, please let me know what specific problem you were having with the build - I'd like to make sure this gets into 3.4.0

        Show
        Nicholas Harteau added a comment - Patrick, please let me know what specific problem you were having with the build - I'd like to make sure this gets into 3.4.0
        Hide
        Mahadev konar added a comment - - edited

        Looks like the jenkins builds will be down for a while. Nicholas can you post the results of ant test for this patch?

        Show
        Mahadev konar added a comment - - edited Looks like the jenkins builds will be down for a while. Nicholas can you post the results of ant test for this patch?
        Hide
        Nicholas Harteau added a comment -

        'ant test' output from trunk, after removing ZOOKEEPER-1033 and ZOOKEEPER-1034

        [nrh@toki ~/projects/apache-zookeeper] grep -i fail ant.test-nopatch|grep -v 'Failures: 0'
        [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 91.533 sec
        [junit] Test org.apache.zookeeper.test.ClientPortBindTest FAILED
        [junit] Tests run: 3, Failures: 2, Errors: 0, Time elapsed: 81.774 sec
        [junit] Test org.apache.zookeeper.test.FollowerResyncConcurrencyTest FAILED
        [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 156.346 sec
        [junit] Test org.apache.zookeeper.test.QuorumTest FAILED
        BUILD FAILED
        /Users/nrh/projects/apache-zookeeper/build.xml:870: Tests failed!

        Show
        Nicholas Harteau added a comment - 'ant test' output from trunk, after removing ZOOKEEPER-1033 and ZOOKEEPER-1034 [nrh@toki ~/projects/apache-zookeeper] grep -i fail ant.test-nopatch|grep -v 'Failures: 0' [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 91.533 sec [junit] Test org.apache.zookeeper.test.ClientPortBindTest FAILED [junit] Tests run: 3, Failures: 2, Errors: 0, Time elapsed: 81.774 sec [junit] Test org.apache.zookeeper.test.FollowerResyncConcurrencyTest FAILED [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 156.346 sec [junit] Test org.apache.zookeeper.test.QuorumTest FAILED BUILD FAILED /Users/nrh/projects/apache-zookeeper/build.xml:870: Tests failed!
        Hide
        Nicholas Harteau added a comment -

        'ant test' output from trunk including ZOOKEEPER-1033 and ZOOKEEPER-1034 patches.

        On my system this exhibits the same set of failures as without the patches:

        [nrh@toki ~/projects/apache-zookeeper] grep -i fail ant.test-1034|grep -v 'Failures: 0'
        [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 76.842 sec
        [junit] Test org.apache.zookeeper.test.ClientPortBindTest FAILED
        [junit] Tests run: 3, Failures: 2, Errors: 0, Time elapsed: 84.496 sec
        [junit] Test org.apache.zookeeper.test.FollowerResyncConcurrencyTest FAILED
        [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 152.419 sec
        [junit] Test org.apache.zookeeper.test.QuorumTest FAILED
        BUILD FAILED
        /Users/nrh/projects/apache-zookeeper/build.xml:870: Tests failed!

        Show
        Nicholas Harteau added a comment - 'ant test' output from trunk including ZOOKEEPER-1033 and ZOOKEEPER-1034 patches. On my system this exhibits the same set of failures as without the patches: [nrh@toki ~/projects/apache-zookeeper] grep -i fail ant.test-1034|grep -v 'Failures: 0' [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 76.842 sec [junit] Test org.apache.zookeeper.test.ClientPortBindTest FAILED [junit] Tests run: 3, Failures: 2, Errors: 0, Time elapsed: 84.496 sec [junit] Test org.apache.zookeeper.test.FollowerResyncConcurrencyTest FAILED [junit] Tests run: 15, Failures: 1, Errors: 0, Time elapsed: 152.419 sec [junit] Test org.apache.zookeeper.test.QuorumTest FAILED BUILD FAILED /Users/nrh/projects/apache-zookeeper/build.xml:870: Tests failed!
        Hide
        Patrick Hunt added a comment -

        I'm having trouble following the readme:

        "The path supplied to the --zookeeper-include option should
        identify the directory that contains the zookeeper.h and other
        ZooKeeper C include files."

        perl Makefile.PL --zookeeper-lib=/home/phunt/dev/zookeeper/build/test/test-cppunit/.libs --zookeeper-include=/home/phunt/dev/zookeeper/src/c/include
        Could not determine ZooKeeper version:
        
        build/check_zk_version.c:21:41: fatal error: zookeeper/zookeeper_version.h: No such file or directory
        compilation terminated.
        

        I think I can get past this, but the docs should reflect.

        Show
        Patrick Hunt added a comment - I'm having trouble following the readme: "The path supplied to the --zookeeper-include option should identify the directory that contains the zookeeper.h and other ZooKeeper C include files." perl Makefile.PL --zookeeper-lib=/home/phunt/dev/zookeeper/build/test/test-cppunit/.libs --zookeeper-include=/home/phunt/dev/zookeeper/src/c/include Could not determine ZooKeeper version: build/check_zk_version.c:21:41: fatal error: zookeeper/zookeeper_version.h: No such file or directory compilation terminated. I think I can get past this, but the docs should reflect.
        Hide
        Patrick Hunt added a comment -

        After setting up include/libs references I was able to apply the patch, compile, and run all the perl tests successfully.

        Show
        Patrick Hunt added a comment - After setting up include/libs references I was able to apply the patch, compile, and run all the perl tests successfully.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12488236/ant.test-1034
        against trunk revision 1152141.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 12 new or modified tests.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/447//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12488236/ant.test-1034 against trunk revision 1152141. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 12 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/447//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        Reuploading the patch to trigger the patch build.

        Show
        Mahadev konar added a comment - Reuploading the patch to trigger the patch build.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12490398/ZOOKEEPER-1034-trunk.patch
        against trunk revision 1157690.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/456//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/456//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/456//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12490398/ZOOKEEPER-1034-trunk.patch against trunk revision 1157690. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/456//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/456//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/456//console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12490398/ZOOKEEPER-1034-trunk.patch
        against trunk revision 1157690.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/457//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/457//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/457//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12490398/ZOOKEEPER-1034-trunk.patch against trunk revision 1157690. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/457//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/457//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/457//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        I just pushed this. Thanks Nicholas!

        Show
        Mahadev konar added a comment - I just pushed this. Thanks Nicholas!
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1266 (See https://builds.apache.org/job/ZooKeeper-trunk/1266/)
        ZOOKEEPER-1034. perl bindings should automatically find the zookeeper c-client headers (nicholas harteau via mahadev)

        mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1157698
        Files :

        • /zookeeper/trunk/src/contrib/zkperl/ZooKeeper.pm
        • /zookeeper/trunk/src/contrib/zkperl/Changes
        • /zookeeper/trunk/src/contrib/zkperl/build/check_zk_version.c
        • /zookeeper/trunk/CHANGES.txt
        • /zookeeper/trunk/src/contrib/zkperl/ZooKeeper.xs
        • /zookeeper/trunk/src/contrib/zkperl/README
        • /zookeeper/trunk/src/contrib/zkperl/Makefile.PL
        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1266 (See https://builds.apache.org/job/ZooKeeper-trunk/1266/ ) ZOOKEEPER-1034 . perl bindings should automatically find the zookeeper c-client headers (nicholas harteau via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1157698 Files : /zookeeper/trunk/src/contrib/zkperl/ZooKeeper.pm /zookeeper/trunk/src/contrib/zkperl/Changes /zookeeper/trunk/src/contrib/zkperl/build/check_zk_version.c /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/src/contrib/zkperl/ZooKeeper.xs /zookeeper/trunk/src/contrib/zkperl/README /zookeeper/trunk/src/contrib/zkperl/Makefile.PL

          People

          • Assignee:
            Nicholas Harteau
            Reporter:
            Nicholas Harteau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development