ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-586

c client does not compile under cygwin

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: c client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      the c client fails to compile under cygwin

      1. ZOOKEEPER-586.patch
        6 kB
        Patrick Hunt
      2. ZOOKEEPER-586.patch
        61 kB
        Patrick Hunt
      3. ZOOKEEPER-586.patch
        61 kB
        Patrick Hunt
      4. ZOOKEEPER-586.patch
        54 kB
        Mahadev konar
      5. ZOOKEEPER-586.patch
        56 kB
        Benjamin Reed
      6. ZOOKEEPER-586.patch
        56 kB
        Benjamin Reed

        Issue Links

          Activity

          Hide
          Mahadev konar added a comment -

          closing this as its checked in!

          Show
          Mahadev konar added a comment - closing this as its checked in!
          Hide
          Hudson added a comment -

          Integrated in ZooKeeper-trunk #749 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/749/)
          . c client does not compile under cygwin

          Show
          Hudson added a comment - Integrated in ZooKeeper-trunk #749 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/749/ ) . c client does not compile under cygwin
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12438671/ZOOKEEPER-586.patch
          against trunk revision 922759.

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

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

          +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/81/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/81/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/81/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/12438671/ZOOKEEPER-586.patch against trunk revision 922759. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 29 new or modified tests. +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/81/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/81/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/81/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/12438671/ZOOKEEPER-586.patch
          against trunk revision 922759.

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

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

          +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/23/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/23/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/23/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/12438671/ZOOKEEPER-586.patch against trunk revision 922759. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 29 new or modified tests. +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/23/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/23/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/23/console This message is automatically generated.
          Hide
          Mahadev konar added a comment -

          trying hudson again after ZOOKEEPER-121 was committed.

          Show
          Mahadev konar added a comment - trying hudson again after ZOOKEEPER-121 was committed.
          Hide
          Hadoop QA added a comment -

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

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

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

          +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/20/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/20/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/20/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/12438671/ZOOKEEPER-586.patch against trunk revision 922459. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 29 new or modified tests. +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/20/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/20/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/20/console This message is automatically generated.
          Hide
          Benjamin Reed added a comment -

          +1 great job pat.

          Show
          Benjamin Reed added a comment - +1 great job pat.
          Hide
          Patrick Hunt added a comment -

          looks good, compiles cleanly now (well there's still that libtool issue, but nothing we can do onthat afaict)

          ran cli_mt and cli_st against a running zk server and it worked fine.

          Show
          Patrick Hunt added a comment - looks good, compiles cleanly now (well there's still that libtool issue, but nothing we can do onthat afaict) ran cli_mt and cli_st against a running zk server and it worked fine.
          Hide
          Benjamin Reed added a comment -

          made to work with 1.5

          Show
          Benjamin Reed added a comment - made to work with 1.5
          Hide
          Patrick Hunt added a comment -

          I don't think an extra ifdef is going to pull down the quality of that code much. 1.7 only recently came out. think of all the users still on 1.5. Doesn't seem like a big deal to me to add it.

          Show
          Patrick Hunt added a comment - I don't think an extra ifdef is going to pull down the quality of that code much. 1.7 only recently came out. think of all the users still on 1.5. Doesn't seem like a big deal to me to add it.
          Hide
          Mahadev konar added a comment -

          I think a comment in the README saying 1.7 cygwin required to compile on windows for c library should be good enough. I dont think we will be able to officially support cygwin anytime in the near future.

          Show
          Mahadev konar added a comment - I think a comment in the README saying 1.7 cygwin required to compile on windows for c library should be good enough. I dont think we will be able to officially support cygwin anytime in the near future.
          Hide
          Benjamin Reed added a comment -

          that is my question. isn't it working on cygwin 1.7 good enough? btw the way, it compiles, but the tests still don't run cleanly.

          Show
          Benjamin Reed added a comment - that is my question. isn't it working on cygwin 1.7 good enough? btw the way, it compiles, but the tests still don't run cleanly.
          Hide
          Patrick Hunt added a comment -

          I think so. If we want it to work.

          Show
          Patrick Hunt added a comment - I think so. If we want it to work.
          Hide
          Benjamin Reed added a comment -

          yeah on cygwin 1.7 random returns a long int. which is what linux does as well. cygwin 1.5 returns an int. do we want to support both? it's making the code a bit ugly with all the ifdefs for a platform we really don't support.

          Show
          Benjamin Reed added a comment - yeah on cygwin 1.7 random returns a long int. which is what linux does as well. cygwin 1.5 returns an int. do we want to support both? it's making the code a bit ugly with all the ifdefs for a platform we really don't support.
          Hide
          Patrick Hunt added a comment -

          I got around the libtool problem by copying /usr/bin/libtool over the version generated by ./configure, that got me past that issue.

          however now I see the following :

          tests/LibCMocks.cc: In function `long int random()':
          tests/LibCMocks.cc:170: error: new declaration `long int random()'
          /usr/include/cygwin/stdlib.h:27: error: ambiguates old declaration `int random()
          '
          make[1]: *** [zktest_st-LibCMocks.o] Error 1

          Show
          Patrick Hunt added a comment - I got around the libtool problem by copying /usr/bin/libtool over the version generated by ./configure, that got me past that issue. however now I see the following : tests/LibCMocks.cc: In function `long int random()': tests/LibCMocks.cc:170: error: new declaration `long int random()' /usr/include/cygwin/stdlib.h:27: error: ambiguates old declaration `int random() ' make [1] : *** [zktest_st-LibCMocks.o] Error 1
          Hide
          Patrick Hunt added a comment -

          I'm seeing two issues on cygwin 15:

          src/zookeeper.c: In function `send_set_watches':
          src/zookeeper.c:1286: warning: passing arg 2 of `collect_keys' from incompatible
          pointer type
          src/zookeeper.c:1287: warning: passing arg 2 of `collect_keys' from incompatible
          pointer type
          src/zookeeper.c:1288: warning: passing arg 2 of `collect_keys' from incompatible
          pointer type
          make: *** [zookeeper.lo] Error 1

          if you cast the second args to (int*) it fixes the issue.

          The second problem is:
          ./libtool: eval: line 1005: syntax error near unexpected token `|'
          ./libtool: eval: line 1005: `/usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhasht
          able.a | | /usr/bin/sed -e '/[BCDGRS][ ]/s/.[ ]([^ ])/\1 DATA/;s/.*[ ]__n
          m__([^ ])[ ][^ ]/\1 DATA/;/I[ ]/d;/[AITW][ ]/s/.* //' | sort | uniq > .lib

          notice the | | btw the nm and sed calls, what's supposed to be here?

          Show
          Patrick Hunt added a comment - I'm seeing two issues on cygwin 15: src/zookeeper.c: In function `send_set_watches': src/zookeeper.c:1286: warning: passing arg 2 of `collect_keys' from incompatible pointer type src/zookeeper.c:1287: warning: passing arg 2 of `collect_keys' from incompatible pointer type src/zookeeper.c:1288: warning: passing arg 2 of `collect_keys' from incompatible pointer type make: *** [zookeeper.lo] Error 1 if you cast the second args to (int*) it fixes the issue. The second problem is: ./libtool: eval: line 1005: syntax error near unexpected token `|' ./libtool: eval: line 1005: `/usr/bin/nm -B ./.libs/libzkst.a ./.libs/libhasht able.a | | /usr/bin/sed -e '/ [BCDGRS] [ ]/s/. [ ]( [^ ] )/\1 DATA/;s/ .*[ ]__n m__( [^ ] )[ ] [^ ] /\1 DATA/;/ I[ ]/d;/ [AITW] [ ]/s/.* //' | sort | uniq > .lib notice the | | btw the nm and sed calls, what's supposed to be here?
          Hide
          Benjamin Reed added a comment -

          refreshed to work with trunk and cygwin 1.7. (we should check that it still compiles under earlier cygwin versions.)

          Show
          Benjamin Reed added a comment - refreshed to work with trunk and cygwin 1.7. (we should check that it still compiles under earlier cygwin versions.)
          Hide
          Mahadev konar added a comment -

          ben, can you update the jira with the test results from cygwin? Ill commit if it passes.....

          Also, pat do you want to open a jira to track fixing tests for cygwin later? you can assign it to 3.4...

          Show
          Mahadev konar added a comment - ben, can you update the jira with the test results from cygwin? Ill commit if it passes..... Also, pat do you want to open a jira to track fixing tests for cygwin later? you can assign it to 3.4...
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12438553/ZOOKEEPER-586.patch
          against trunk revision 921853.

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

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

          +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/15/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/15/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/15/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/12438553/ZOOKEEPER-586.patch against trunk revision 921853. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 26 new or modified tests. +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/15/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/15/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/15/console This message is automatically generated.
          Hide
          Mahadev konar added a comment -

          uploading a patch that applies to trunk.

          Show
          Mahadev konar added a comment - uploading a patch that applies to trunk.
          Hide
          Hadoop QA added a comment -

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

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

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

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

          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/14/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/12436397/ZOOKEEPER-586.patch against trunk revision 921853. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 26 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/14/console This message is automatically generated.
          Hide
          Mahadev konar added a comment -

          trying hudson to run with most current trunk!

          Show
          Mahadev konar added a comment - trying hudson to run with most current trunk!
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12436397/ZOOKEEPER-586.patch
          against trunk revision 912052.

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

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

          +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/73/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/73/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/73/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/12436397/ZOOKEEPER-586.patch against trunk revision 912052. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 26 new or modified tests. +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 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: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/73/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/73/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h7.grid.sp2.yahoo.net/73/console This message is automatically generated.
          Hide
          Patrick Hunt added a comment -

          added a JIRA to track fixing the tests under cygwin - ZOOKEEPER-674

          Show
          Patrick Hunt added a comment - added a JIRA to track fixing the tests under cygwin - ZOOKEEPER-674
          Hide
          Patrick Hunt added a comment -

          I'm submitting this so that we can get it into the code base. With this latest patch the client compiles under cygwin (1.5) however not all the tests run. I also tested the patch on ubuntu and it worked fine. I think we should commit as it allows the code to compile under cygwin, we can fix the cygwin tests later (also the issue of the new cygwin version, and what we will support going fwd).

          Show
          Patrick Hunt added a comment - I'm submitting this so that we can get it into the code base. With this latest patch the client compiles under cygwin (1.5) however not all the tests run. I also tested the patch on ubuntu and it worked fine. I think we should commit as it allows the code to compile under cygwin, we can fix the cygwin tests later (also the issue of the new cygwin version, and what we will support going fwd).
          Hide
          Patrick Hunt added a comment -

          Updated patch to latest code - fixed problem with pid variable.

          Show
          Patrick Hunt added a comment - Updated patch to latest code - fixed problem with pid variable.
          Hide
          Patrick Hunt added a comment -

          this updated patch fixes (in addition to prev) the zkServer.sh to handle
          slow java startup under cygwin/viruscheckers

          Also fixes a problem with host name resolution on zookeeper_init (cygwin)

          currently there are still 2 failures:

          _st is failing testing watch notification (auto watch reset)

          _mt is core dumping

          (assumes that ZOOKEEPER-606 is already applied)

          Show
          Patrick Hunt added a comment - this updated patch fixes (in addition to prev) the zkServer.sh to handle slow java startup under cygwin/viruscheckers Also fixes a problem with host name resolution on zookeeper_init (cygwin) currently there are still 2 failures: _st is failing testing watch notification (auto watch reset) _mt is core dumping (assumes that ZOOKEEPER-606 is already applied)
          Hide
          Patrick Hunt added a comment -

          c client compiles with this patch but the tests fail

          Show
          Patrick Hunt added a comment - c client compiles with this patch but the tests fail

            People

            • Assignee:
              Patrick Hunt
              Reporter:
              Patrick Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development