You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michi Mutsuzaki (JIRA)" <ji...@apache.org> on 2012/11/28 00:32:58 UTC

[jira] [Created] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Michi Mutsuzaki created ZOOKEEPER-1591:
------------------------------------------

             Summary: Windows build is broken because inttypes.h doesn't exist
                 Key: ZOOKEEPER-1591
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
             Project: ZooKeeper
          Issue Type: Bug
          Components: c client
    Affects Versions: 3.5.0
         Environment: Windows
            Reporter: Michi Mutsuzaki
            Assignee: Marshall McMullen
             Fix For: 3.5.0


addrvec.h includes inttypes.h, but it is not present in the windows build environment.

https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console

f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Posted by "Marshall McMullen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507123#comment-13507123 ] 

Marshall McMullen commented on ZOOKEEPER-1591:
----------------------------------------------

No tests were added because this was a compile failure fix only. No code changed.
                
> Windows build is broken because inttypes.h doesn't exist
> --------------------------------------------------------
>
>                 Key: ZOOKEEPER-1591
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>         Environment: Windows
>            Reporter: Michi Mutsuzaki
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1591.patch
>
>
> addrvec.h includes inttypes.h, but it is not present in the windows build environment.
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console
> f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Posted by "Michi Mutsuzaki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507102#comment-13507102 ] 

Michi Mutsuzaki commented on ZOOKEEPER-1591:
--------------------------------------------

+1

Thanks for the patch, Marshall. I'll wait for the pre-commit build to pass and check this in.

--Michi
                
> Windows build is broken because inttypes.h doesn't exist
> --------------------------------------------------------
>
>                 Key: ZOOKEEPER-1591
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>         Environment: Windows
>            Reporter: Michi Mutsuzaki
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1591.patch
>
>
> addrvec.h includes inttypes.h, but it is not present in the windows build environment.
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console
> f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Posted by "Marshall McMullen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall McMullen updated ZOOKEEPER-1591:
-----------------------------------------

    Attachment: ZOOKEEPER-1591.patch

This patch removes the unnecessary include of inttypes.h in addrvec.h.

But while I was testing the compilation of this on Linux/Windows, I felt the use of the STRUCT_INITIALIZER macro was a *really* bad idea if we want to guarantee cross-platform compilation on both Linux and Windows.

Using the C99 struct field initializer extension isn't supported on Windows. If we allow that extension to be used at all in the C code then we risk breaking compatibility. Because on Linux you could do the assignments out of order from the proper order for the structure. This would happily compile on Linux but fail on Windows.

The use of the STRUCT_INITIALIZER macro is only going to mask that problem rather than enforcing stricter code wherein the order of the fields in the assignment must match the order of the fields in the structure.
                
> Windows build is broken because inttypes.h doesn't exist
> --------------------------------------------------------
>
>                 Key: ZOOKEEPER-1591
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>         Environment: Windows
>            Reporter: Michi Mutsuzaki
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1591.patch
>
>
> addrvec.h includes inttypes.h, but it is not present in the windows build environment.
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console
> f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507930#comment-13507930 ] 

Hudson commented on ZOOKEEPER-1591:
-----------------------------------

Integrated in ZooKeeper-trunk #1760 (See [https://builds.apache.org/job/ZooKeeper-trunk/1760/])
    ZOOKEEPER-1591. Windows build is broken because inttypes.h doesn't exist
(Marshall McMullen via michim) (Revision 1415847)

     Result = SUCCESS
michim : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1415847
Files : 
* /zookeeper/trunk/CHANGES.txt
* /zookeeper/trunk/src/c/include/recordio.h
* /zookeeper/trunk/src/c/src/addrvec.h
* /zookeeper/trunk/src/c/src/recordio.c
* /zookeeper/trunk/src/c/src/zookeeper.c

                
> Windows build is broken because inttypes.h doesn't exist
> --------------------------------------------------------
>
>                 Key: ZOOKEEPER-1591
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>         Environment: Windows
>            Reporter: Michi Mutsuzaki
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1591.patch
>
>
> addrvec.h includes inttypes.h, but it is not present in the windows build environment.
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console
> f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507119#comment-13507119 ] 

Hadoop QA commented on ZOOKEEPER-1591:
--------------------------------------

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

    +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/1279//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1279//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1279//console

This message is automatically generated.
                
> Windows build is broken because inttypes.h doesn't exist
> --------------------------------------------------------
>
>                 Key: ZOOKEEPER-1591
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>         Environment: Windows
>            Reporter: Michi Mutsuzaki
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1591.patch
>
>
> addrvec.h includes inttypes.h, but it is not present in the windows build environment.
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console
> f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1591) Windows build is broken because inttypes.h doesn't exist

Posted by "Marshall McMullen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507391#comment-13507391 ] 

Marshall McMullen commented on ZOOKEEPER-1591:
----------------------------------------------

Michi, do you want to go ahead and commit this change so we can get the build fixed?
                
> Windows build is broken because inttypes.h doesn't exist
> --------------------------------------------------------
>
>                 Key: ZOOKEEPER-1591
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1591
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>         Environment: Windows
>            Reporter: Michi Mutsuzaki
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1591.patch
>
>
> addrvec.h includes inttypes.h, but it is not present in the windows build environment.
> https://builds.apache.org/job/ZooKeeper-trunk-WinVS2008/596/console
> f:\hudson\hudson-slave\workspace\zookeeper-trunk-winvs2008\trunk\src\c\src\addrvec.h(22): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira