ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-1117

zookeeper 3.3.3 fails to build with gcc >= 4.6.1 on Debian/Ubuntu

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4.0
    • Fix Version/s: 3.3.4, 3.4.0
    • Component/s: c client
    • Labels:
      None
    • Environment:

      Ubuntu Developement Release (11.10/Oneiric Ocelot), Debian Unstable (sid)

    • Hadoop Flags:
      Reviewed

      Description

      zookeeper 3.3.3 (and 3.3.1) fails to build on Debian and Ubuntu systems with gcc >= 4.6.1:

      /bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c -o zookeeper.lo `test -f 'src/zookeeper.c' || echo './'`src/zookeeper.c
      libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./include -I./tests -I./generated -Wall -Werror -g -O2 -D_GNU_SOURCE -MT zookeeper.lo -MD -MP -MF .deps/zookeeper.Tpo -c src/zookeeper.c -fPIC -DPIC -o .libs/zookeeper.o
      src/zookeeper.c: In function 'getaddrs':
      src/zookeeper.c:455:13: error: variable 'port' set but not used [-Werror=unused-but-set-variable]
      cc1: all warnings being treated as errors

      See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625441 for more information.

      1. disable-cc-errors
        0.7 kB
        James Page
      2. gcc-4.6-ftbfs.patch
        1 kB
        James Page
      3. gcc-4.6-ftbfs.patch
        1 kB
        James Page
      4. gcc-4.6-ftbfs.patch
        1 kB
        James Page
      5. gcc-4.6-trunk-fix.patch
        1 kB
        James Page
      6. ZOOKEEPER-1117.patch
        1 kB
        James Page
      7. ZOOKEEPER-1117-3.3.3.patch
        1 kB
        James Page

        Activity

        Hide
        Stephen Tyree added a comment -

        That warning exists for a good reason, and marking it not as an error is only glosses over the problem. A better solution would be to move the code which initializes port into the block that only runs on Cygwin since that's where it's used.

        Show
        Stephen Tyree added a comment - That warning exists for a good reason, and marking it not as an error is only glosses over the problem. A better solution would be to move the code which initializes port into the block that only runs on Cygwin since that's where it's used.
        Hide
        James Page added a comment -

        Revised patch to detect file descriptors read for r/w activity

        Show
        James Page added a comment - Revised patch to detect file descriptors read for r/w activity
        Hide
        James Page added a comment -

        Please ignore last patch - still incorrect

        Show
        James Page added a comment - Please ignore last patch - still incorrect
        Hide
        Mahadev konar added a comment -

        James,
        Is this the issue with trunk as well? Can you please check and confirm? If yes, would you be able to upload a patch for trunk as well?

        Show
        Mahadev konar added a comment - James, Is this the issue with trunk as well? Can you please check and confirm? If yes, would you be able to upload a patch for trunk as well?
        Hide
        James Page added a comment -

        gcc 4.6 fix for trunk

        Show
        James Page added a comment - gcc 4.6 fix for trunk
        Hide
        James Page added a comment -

        Mahadev,
        Same issue on trunk; attached reworked patch to this bug report.

        Show
        James Page added a comment - Mahadev, Same issue on trunk; attached reworked patch to this bug report.
        Hide
        Patrick Hunt added a comment -

        Hi James, thanks for this! Could you re-attach your patches with "ASF Granted License" checked? If you look at "manage attachments" in jira
        https://issues.apache.org/jira/secure/ManageAttachments.jspa?atl_token=A5KQ-2QAV-T4JA-FDED|7da8d16caa4119bb0c4c4d3190971590529a6b25|lin&id=12512864
        your patches are listed as "no", which means we can't incorporate. (alternately you could just add a comment to the effect that you grant, but re-attaching the patches with the "grant" checkbox checked would be better).

        more details here:
        https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute

        Also, once your patch is ready click on "submit patch" to start it moving through the process (ie the test bot will run (down at the moment) and committer can review)

        Regards.

        Show
        Patrick Hunt added a comment - Hi James, thanks for this! Could you re-attach your patches with "ASF Granted License" checked? If you look at "manage attachments" in jira https://issues.apache.org/jira/secure/ManageAttachments.jspa?atl_token=A5KQ-2QAV-T4JA-FDED |7da8d16caa4119bb0c4c4d3190971590529a6b25|lin&id=12512864 your patches are listed as "no", which means we can't incorporate. (alternately you could just add a comment to the effect that you grant, but re-attaching the patches with the "grant" checkbox checked would be better). more details here: https://cwiki.apache.org/confluence/display/ZOOKEEPER/HowToContribute Also, once your patch is ready click on "submit patch" to start it moving through the process (ie the test bot will run (down at the moment) and committer can review) Regards.
        Hide
        James Page added a comment -

        Hi Patrick - will do but I'm out for the next few days to likely to be later next week.

        Show
        James Page added a comment - Hi Patrick - will do but I'm out for the next few days to likely to be later next week.
        Hide
        Mahadev konar added a comment -

        James,
        Any chance you are back and can update the patch?

        Show
        Mahadev konar added a comment - James, Any chance you are back and can update the patch?
        Hide
        James Page added a comment -

        Patches for trunk and 3.3.x branch

        Show
        James Page added a comment - Patches for trunk and 3.3.x branch
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12490512/ZOOKEEPER-1117-3.3.3.patch
        against trunk revision 1157698.

        +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/461//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/461//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/461//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/12490512/ZOOKEEPER-1117-3.3.3.patch against trunk revision 1157698. +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/461//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/461//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/461//console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        I just pushed this. Thanks for the patch James!

        Show
        Mahadev konar added a comment - I just pushed this. Thanks for the patch James!
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #1283 (See https://builds.apache.org/job/ZooKeeper-trunk/1283/)
        ZOOKEEPER-1117. zookeeper 3.3.3 fails to build with gcc >= 4.6.1 on Debian/Ubuntu (James Page via mahadev)

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

        • /zookeeper/trunk/CHANGES.txt
        • /zookeeper/trunk/src/c/src/cli.c
        • /zookeeper/trunk/src/c/src/zookeeper.c
        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #1283 (See https://builds.apache.org/job/ZooKeeper-trunk/1283/ ) ZOOKEEPER-1117 . zookeeper 3.3.3 fails to build with gcc >= 4.6.1 on Debian/Ubuntu (James Page via mahadev) mahadev : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1162013 Files : /zookeeper/trunk/CHANGES.txt /zookeeper/trunk/src/c/src/cli.c /zookeeper/trunk/src/c/src/zookeeper.c

          People

          • Assignee:
            James Page
            Reporter:
            James Page
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development