You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Ricky Zhou (JIRA)" <ji...@apache.org> on 2009/04/15 08:55:15 UTC

[jira] Created: (HADOOP-5678) Mixed up #includes in c++ files.

Mixed up #includes in c++ files.
--------------------------------

                 Key: HADOOP-5678
                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
             Project: Hadoop Core
          Issue Type: Bug
         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
            Reporter: Ricky Zhou


src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.

When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:

{quote}
     [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
     [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
     [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
     [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
     [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
     [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
{quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5678) Mixed up #includes in c++ files.

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

Ricky Zhou updated HADOOP-5678:
-------------------------------

    Attachment: hadoop-includes-2.patch

This patch allows the C++ files to compile without errors for me.  This one also uses new-style includes as well.

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes-2.patch, hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5678) Mixed up #includes in c++ files.

Posted by "Ricky Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699093#action_12699093 ] 

Ricky Zhou commented on HADOOP-5678:
------------------------------------

My mistake, I think I clicked "Submit Patch" too early.  Could I get a code review for the patch?

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5678) Mixed up #includes in c++ files.

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

Ricky Zhou updated HADOOP-5678:
-------------------------------

    Status: In Progress  (was: Patch Available)

Thanks for the review, trying to submit this for testing again.

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes-2.patch, hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5678) Mixed up #includes in c++ files.

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

Ricky Zhou updated HADOOP-5678:
-------------------------------

    Attachment: hadoop-includes.patch

This patch fixes the build issues by correcting the includes.  I also changed a few sprintfs to snprintfs (I can split those out into a separate patch if desired).

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HADOOP-5678) Mixed up #includes in c++ files.

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

Ricky Zhou resolved HADOOP-5678.
--------------------------------

    Resolution: Fixed

Somebody else got a fix in for this.

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes-2.patch, hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5678) Mixed up #includes in c++ files.

Posted by "Sreekanth Ramakrishnan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699114#action_12699114 ] 

Sreekanth Ramakrishnan commented on HADOOP-5678:
------------------------------------------------

The patch looks fine to me.

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes-2.patch, hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5678) Mixed up #includes in c++ files.

Posted by "Sreekanth Ramakrishnan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699104#action_12699104 ] 

Sreekanth Ramakrishnan commented on HADOOP-5678:
------------------------------------------------

What gcc version are you using? 

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5678) Mixed up #includes in c++ files.

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

Nigel Daley updated HADOOP-5678:
--------------------------------

    Component/s: build

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: build
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes-2.patch, hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5678) Mixed up #includes in c++ files.

Posted by "Ricky Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699106#action_12699106 ] 

Ricky Zhou commented on HADOOP-5678:
------------------------------------

I'm running gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-5678) Mixed up #includes in c++ files.

Posted by "Sreekanth Ramakrishnan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-5678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699108#action_12699108 ] 

Sreekanth Ramakrishnan commented on HADOOP-5678:
------------------------------------------------

There has been a dependency move in gcc 4.3. The related bug in gnu is [28080|http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28080] also, [http://www.cyrius.com/journal/2007/05/10#gcc-4.3-include] but I don't know if we are currently supporting gcc 4.3 in the source. 

Plus I the patch is incomplete HadoopPipes.cc also needs to be changed.

Why don't we use {{#include <cstring> #include <cstdio> #include <cstdlib>}} instead of  c style headers? We are anyway modifiying c++ source right?

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-5678) Mixed up #includes in c++ files.

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

Ricky Zhou updated HADOOP-5678:
-------------------------------

    Status: Patch Available  (was: Open)

> Mixed up #includes in c++ files.
> --------------------------------
>
>                 Key: HADOOP-5678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-5678
>             Project: Hadoop Core
>          Issue Type: Bug
>         Environment: Fedora 10, gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
>            Reporter: Ricky Zhou
>         Attachments: hadoop-includes.patch
>
>
> src/c++/pipes/impl/HadoopPipes.cc, src/c++/utils/impl/SerialUtils.cc, and src/c++/utils/impl/StringUtils.cc fail to compile due to some mixed up #includes.
> When running ant -Dcompile.c++=true clean compile-c++ on svn trunk, I get errors about undeclared functions in the above files, such as:
> {quote}
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'uint64_t HadoopUtils::getCurrentMillis()':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:74: error: 'strerror' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::quoteString(const std::string&, const char*)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:103: error: 'strchr' was not declared in this scope
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc: In function 'std::string HadoopUtils::unquoteString(const std::string&)':
>      [exec] /home/ricky/h/test/hadoop-0.18.3/src/c++/utils/impl/StringUtils.cc:144: error: 'strtol' was not declared in this scope
> {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.