You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Luca Rea (JIRA)" <ji...@apache.org> on 2012/11/21 11:21:58 UTC

[jira] [Created] (TS-1583) make fails - logstat.cc

Luca Rea created TS-1583:
----------------------------

             Summary: make fails - logstat.cc
                 Key: TS-1583
                 URL: https://issues.apache.org/jira/browse/TS-1583
             Project: Traffic Server
          Issue Type: Bug
          Components: Build
    Affects Versions: 3.3.0
         Environment: Fedora 17 64bit - gcc 4.7
            Reporter: Luca Rea


master trunk


make[2]: Entering directory `/home/luca/trafficserver/proxy'
  CXX    logstats.o
logstats.cc:349:74: error: template argument 3 is invalid
logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
logstats.cc:350:59: error: template argument 2 is invalid
logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
logstats.cc:359:80: error: template argument 3 is invalid
logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
logstats.cc:402:23: error: expected initializer before ‘h’
logstats.cc:404:9: error: ‘h’ was not declared in this scope
logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
logstats.cc: In member function ‘void UrlLru::_init()’:
logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
logstats.cc:1183:27: error: expected initializer before ‘o_iter’
logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
logstats.cc:2134:34: error: expected ‘;’ before ‘i’
logstats.cc:2134:34: error: ‘i’ was not declared in this scope
logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
logstats.cc:2134:75: error: ‘i’ was not declared in this scope
logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
logstats.cc: In function ‘int main(int, char**)’:
logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
make[2]: *** [logstats.o] Error 1
make[2]: Leaving directory `/home/luca/trafficserver/proxy'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/trafficserver/proxy'
make: *** [all-recursive] Error 1



--
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] (TS-1583) make fails - logstat.cc

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501844#comment-13501844 ] 

Igor Galić commented on TS-1583:
--------------------------------

Again, this works for me™. Please include the {{config.log}} for debugging.
                
> make fails - logstat.cc
> -----------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) make fails - logstat.cc

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Galić updated TS-1583:
---------------------------

    Description: 
master trunk

{noformat}
make[2]: Entering directory `/home/luca/trafficserver/proxy'
  CXX    logstats.o
logstats.cc:349:74: error: template argument 3 is invalid
logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
logstats.cc:350:59: error: template argument 2 is invalid
logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
logstats.cc:359:80: error: template argument 3 is invalid
logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
logstats.cc:402:23: error: expected initializer before ‘h’
logstats.cc:404:9: error: ‘h’ was not declared in this scope
logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
logstats.cc: In member function ‘void UrlLru::_init()’:
logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
logstats.cc:1183:27: error: expected initializer before ‘o_iter’
logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
logstats.cc:2134:34: error: expected ‘;’ before ‘i’
logstats.cc:2134:34: error: ‘i’ was not declared in this scope
logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
logstats.cc:2134:75: error: ‘i’ was not declared in this scope
logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
logstats.cc: In function ‘int main(int, char**)’:
logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
make[2]: *** [logstats.o] Error 1
make[2]: Leaving directory `/home/luca/trafficserver/proxy'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/trafficserver/proxy'
make: *** [all-recursive] Error 1
{noformat}


  was:
master trunk


make[2]: Entering directory `/home/luca/trafficserver/proxy'
  CXX    logstats.o
logstats.cc:349:74: error: template argument 3 is invalid
logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
logstats.cc:350:59: error: template argument 2 is invalid
logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
logstats.cc:359:80: error: template argument 3 is invalid
logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
logstats.cc:402:23: error: expected initializer before ‘h’
logstats.cc:404:9: error: ‘h’ was not declared in this scope
logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
logstats.cc: In member function ‘void UrlLru::_init()’:
logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
logstats.cc:1183:27: error: expected initializer before ‘o_iter’
logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
logstats.cc:2134:34: error: expected ‘;’ before ‘i’
logstats.cc:2134:34: error: ‘i’ was not declared in this scope
logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
logstats.cc:2134:75: error: ‘i’ was not declared in this scope
logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
logstats.cc: In function ‘int main(int, char**)’:
logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
make[2]: *** [logstats.o] Error 1
make[2]: Leaving directory `/home/luca/trafficserver/proxy'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/luca/trafficserver/proxy'
make: *** [all-recursive] Error 1



    
> make fails - logstat.cc
> -----------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Galić updated TS-1583:
---------------------------

    Summary: Visibility of hash_map unclear to GCC 4.7 when -std=c++11  (was: make fails - logstat.cc)
    
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "James Peach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503344#comment-13503344 ] 

James Peach commented on TS-1583:
---------------------------------

81f9f4187d284c7a55341106aa16bb7648d741e4 TS-1583: Fix clang build with ext/hash_map

Builds for me with clang Apple/clang-421.11.66, gcc 4.4, gcc 4.6 and gcc 4.7.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Galić updated TS-1583:
---------------------------

    Attachment: ts-1583.patch

This gets me as far as:
{noformat}
gmake[2]: Entering directory `/home/igalic/src/asf/trafficserver/CLANG/proxy'
clang++ -DHAVE_CONFIG_H -I. -I../../proxy -I../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib/records -I../../lib/ts -I../../proxy/http -I../../proxy/logging -I../../proxy/http/remap -I../../proxy/hdrs -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -I../../proxy/api/ts -I. -I./api/ts -I../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -DDEBUG -D_DEBUG  -std=c++11 -ggdb3 -Werror -Qunused-arguments -Wno-invalid-offsetof -MT logstats.o -MD -MP -MF .deps/logstats.Tpo -c -o logstats.o ../../proxy/logstats.cc
../../proxy/logstats.cc:526:13: error: no member named 'resize' in 'std::unordered_map<const char *, std::_List_iterator<UrlStats>, std::hash<const char *>, eqstr, std::allocator<std::pair<const char *const,
      std::_List_iterator<UrlStats> > > >'; did you mean 'size'?
      _hash.resize(_size);
            ^~~~~~
            size
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/hashtable.h:356:7: note: 'size' declared here
      size() const noexcept
      ^
../../proxy/logstats.cc:526:20: error: too many arguments to function call, expected 0, have 1
      _hash.resize(_size);
      ~~~~~~~~~~~~ ^~~~~
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/hashtable.h:355:7: note: 'size' declared here
      size_type
      ^
2 errors generated.
gmake[2]: *** [logstats.o] Error 1
{noformat}
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Alan M. Carroll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502268#comment-13502268 ] 

Alan M. Carroll commented on TS-1583:
-------------------------------------

I tested the proposed patch and it doesn't work on my gcc 4.6.3 because the unordered_map header requires additional compiler options (-std=c++0x). I have an alternative patch which is uglier but more functional for gcc 4.6.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "James Peach (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502444#comment-13502444 ] 

James Peach commented on TS-1583:
---------------------------------

FWIW, I added a HAVE_CXX_11 autoconf define; you could key the unordered_map headers off that.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503389#comment-13503389 ] 

Igor Galić commented on TS-1583:
--------------------------------

Fails on clang/Linux:
{noformat}
clang++ -DHAVE_CONFIG_H -I. -I../../proxy -I../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib/records -I../../lib/ts -I../../proxy/http -I../../proxy/logging -I../../proxy/http/remap -I../../proxy/hdrs -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -I../../proxy/api/ts -I. -I./api/ts -I../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -DDEBUG -D_DEBUG  -std=c++11 -ggdb3 -Werror -Qunused-arguments -Wno-invalid-offsetof -MT logstats.o -MD -MP -MF .deps/logstats.Tpo -c -o logstats.o ../../proxy/logstats.cc
../../proxy/logstats.cc:364:48: error: reference to 'hash' is ambiguous
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                               ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:364:54: error: expected expression
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                     ^
../../proxy/logstats.cc:364:67: error: expected unqualified-id
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                                  ^
../../proxy/logstats.cc:365:33: error: reference to 'hash' is ambiguous
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:365:39: error: expected expression
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                      ^
../../proxy/logstats.cc:365:52: error: expected unqualified-id
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                                   ^
../../proxy/logstats.cc:374:54: error: reference to 'hash' is ambiguous
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                     ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:374:60: error: expected expression
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                           ^
../../proxy/logstats.cc:374:73: error: expected member name or ';' after declaration specifiers
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
  ~~~~~~~                                                               ^
../../proxy/logstats.cc:595:3: error: unknown type name 'LruHash'
  LruHash _hash;
  ^
../../proxy/logstats.cc:417:5: error: use of undeclared identifier 'LruHash'
    LruHash::iterator h = _hash.find(url);
    ^
../../proxy/logstats.cc:417:14: error: use of class template iterator requires template arguments
    LruHash::iterator h = _hash.find(url);
             ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_iterator_base_types.h:118:12: note: template is declared here
    struct iterator
           ^
../../proxy/logstats.cc:605:8: error: unknown type name 'OriginStorage'; did you mean 'OriginStats'?
static OriginStorage origins;
       ^~~~~~~~~~~~~
       OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:606:8: error: unknown type name 'OriginSet'; did you mean 'OriginStats'?
static OriginSet *origin_set;
       ^~~~~~~~~
       OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1198:3: error: use of undeclared identifier 'OriginStorage'; did you mean 'OriginStats'?
  OriginStorage::iterator o_iter;
  ^~~~~~~~~~~~~
  OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1198:18: error: no type named 'iterator' in 'OriginStats'
  OriginStorage::iterator o_iter;
  ~~~~~~~~~~~~~~~^
../../proxy/logstats.cc:1362:43: error: no member named 'find' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                              ~~~~~~~~~~  ^
../../proxy/logstats.cc:1362:68: error: no member named 'end' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                                                       ~~~~~~~~~~  ^
../../proxy/logstats.cc:1363:32: error: no member named 'find' in 'OriginStats'
              o_iter = origins.find(tok);
                       ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[2]: *** [logstats.o] Error 1
{noformat}

So back at square one.

On FreeBSD 10 it fails for yet another reason:
{noformat}
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../../lib/ts -I../../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dfreebsd -DDEBUG -D_DEBUG -I/usr/local/include -I/usr/local/include/tcl8.4 -std=c++11 -ggdb3 -pipe -Wall -Werror -Qunused-arguments -Wno-invalid-offsetof -MT ink_time.lo -MD -MP -MF .deps/ink_time.Tpo -c ../../../lib/ts/ink_time.cc  -fPIC -DPIC -o .libs/ink_time.o
../../../lib/ts/ink_time.cc:686:41: error: cast from pointer to smaller type 'int' loses information
  ink_assert(localtime_r(clock, &tm) != (int) NULL);    /* ADK_122100 */
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../../../lib/ts/ink_assert.h:50:27: note: expanded from macro 'ink_assert'
            (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__)) \
                          ^
../../../lib/ts/ink_apidefs.h:34:40: note: expanded from macro 'likely'
#define likely(x)       __builtin_expect (!!(x), 1)
                                             ^
1 error generated.
gmake[3]: *** [ink_time.lo] Error 1
{noformat}

I'll look into the latter, but I think [~jamespeach]'s last patch, while prettier, is a step back.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] [Comment Edited] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Alan M. Carroll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502268#comment-13502268 ] 

Alan M. Carroll edited comment on TS-1583 at 11/21/12 9:01 PM:
---------------------------------------------------------------

I tested the proposed patch and it doesn't work on my gcc 4.6.3 because the unordered_map header requires additional compiler options (-std=c++0x). I have an alternative patch which is uglier but more functional for gcc 4.6.

commmit 2a4f512ee8e60114c2922facd6514d2b7de5c48c
                
      was (Author: amc):
    I tested the proposed patch and it doesn't work on my gcc 4.6.3 because the unordered_map header requires additional compiler options (-std=c++0x). I have an alternative patch which is uglier but more functional for gcc 4.6.
                  
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] [Comment Edited] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503389#comment-13503389 ] 

Igor Galić edited comment on TS-1583 at 11/24/12 12:31 PM:
-----------------------------------------------------------

Fails on clang/Linux:
{noformat}
clang++ -DHAVE_CONFIG_H -I. -I../../proxy -I../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib/records -I../../lib/ts -I../../proxy/http -I../../proxy/logging -I../../proxy/http/remap -I../../proxy/hdrs -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -I../../proxy/api/ts -I. -I./api/ts -I../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -DDEBUG -D_DEBUG  -std=c++11 -ggdb3 -Werror -Qunused-arguments -Wno-invalid-offsetof -MT logstats.o -MD -MP -MF .deps/logstats.Tpo -c -o logstats.o ../../proxy/logstats.cc
../../proxy/logstats.cc:364:48: error: reference to 'hash' is ambiguous
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                               ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:364:54: error: expected expression
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                     ^
../../proxy/logstats.cc:364:67: error: expected unqualified-id
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                                  ^
../../proxy/logstats.cc:365:33: error: reference to 'hash' is ambiguous
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:365:39: error: expected expression
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                      ^
../../proxy/logstats.cc:365:52: error: expected unqualified-id
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                                   ^
../../proxy/logstats.cc:374:54: error: reference to 'hash' is ambiguous
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                     ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:374:60: error: expected expression
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                           ^
../../proxy/logstats.cc:374:73: error: expected member name or ';' after declaration specifiers
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
  ~~~~~~~                                                               ^
../../proxy/logstats.cc:595:3: error: unknown type name 'LruHash'
  LruHash _hash;
  ^
../../proxy/logstats.cc:417:5: error: use of undeclared identifier 'LruHash'
    LruHash::iterator h = _hash.find(url);
    ^
../../proxy/logstats.cc:417:14: error: use of class template iterator requires template arguments
    LruHash::iterator h = _hash.find(url);
             ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_iterator_base_types.h:118:12: note: template is declared here
    struct iterator
           ^
../../proxy/logstats.cc:605:8: error: unknown type name 'OriginStorage'; did you mean 'OriginStats'?
static OriginStorage origins;
       ^~~~~~~~~~~~~
       OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:606:8: error: unknown type name 'OriginSet'; did you mean 'OriginStats'?
static OriginSet *origin_set;
       ^~~~~~~~~
       OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1198:3: error: use of undeclared identifier 'OriginStorage'; did you mean 'OriginStats'?
  OriginStorage::iterator o_iter;
  ^~~~~~~~~~~~~
  OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1198:18: error: no type named 'iterator' in 'OriginStats'
  OriginStorage::iterator o_iter;
  ~~~~~~~~~~~~~~~^
../../proxy/logstats.cc:1362:43: error: no member named 'find' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                              ~~~~~~~~~~  ^
../../proxy/logstats.cc:1362:68: error: no member named 'end' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                                                       ~~~~~~~~~~  ^
../../proxy/logstats.cc:1363:32: error: no member named 'find' in 'OriginStats'
              o_iter = origins.find(tok);
                       ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[2]: *** [logstats.o] Error 1
{noformat}

So back at square one.

On FreeBSD 10 it fails for yet another reason unrelated to this (mess;):
{noformat}
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../../lib/ts -I../../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dfreebsd -DDEBUG -D_DEBUG -I/usr/local/include -I/usr/local/include/tcl8.4 -std=c++11 -ggdb3 -pipe -Wall -Werror -Qunused-arguments -Wno-invalid-offsetof -MT ink_time.lo -MD -MP -MF .deps/ink_time.Tpo -c ../../../lib/ts/ink_time.cc  -fPIC -DPIC -o .libs/ink_time.o
../../../lib/ts/ink_time.cc:686:41: error: cast from pointer to smaller type 'int' loses information
  ink_assert(localtime_r(clock, &tm) != (int) NULL);    /* ADK_122100 */
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../../../lib/ts/ink_assert.h:50:27: note: expanded from macro 'ink_assert'
            (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__)) \
                          ^
../../../lib/ts/ink_apidefs.h:34:40: note: expanded from macro 'likely'
#define likely(x)       __builtin_expect (!!(x), 1)
                                             ^
1 error generated.
gmake[3]: *** [ink_time.lo] Error 1
{noformat}

I'll look into the latter, but I think [~jamespeach]'s last patch, while prettier, is a step back.
                
      was (Author: i.galic):
    Fails on clang/Linux:
{noformat}
clang++ -DHAVE_CONFIG_H -I. -I../../proxy -I../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib/records -I../../lib/ts -I../../proxy/http -I../../proxy/logging -I../../proxy/http/remap -I../../proxy/hdrs -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -I../../proxy/api/ts -I. -I./api/ts -I../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -DDEBUG -D_DEBUG  -std=c++11 -ggdb3 -Werror -Qunused-arguments -Wno-invalid-offsetof -MT logstats.o -MD -MP -MF .deps/logstats.Tpo -c -o logstats.o ../../proxy/logstats.cc
../../proxy/logstats.cc:364:48: error: reference to 'hash' is ambiguous
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                               ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:364:54: error: expected expression
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                     ^
../../proxy/logstats.cc:364:67: error: expected unqualified-id
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                                  ^
../../proxy/logstats.cc:365:33: error: reference to 'hash' is ambiguous
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:365:39: error: expected expression
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                      ^
../../proxy/logstats.cc:365:52: error: expected unqualified-id
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                                   ^
../../proxy/logstats.cc:374:54: error: reference to 'hash' is ambiguous
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                     ^
../../proxy/logstats.cc:81:18: note: candidate found by name lookup is 'hash'
using __gnu_cxx::hash;
                 ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:374:60: error: expected expression
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                           ^
../../proxy/logstats.cc:374:73: error: expected member name or ';' after declaration specifiers
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
  ~~~~~~~                                                               ^
../../proxy/logstats.cc:595:3: error: unknown type name 'LruHash'
  LruHash _hash;
  ^
../../proxy/logstats.cc:417:5: error: use of undeclared identifier 'LruHash'
    LruHash::iterator h = _hash.find(url);
    ^
../../proxy/logstats.cc:417:14: error: use of class template iterator requires template arguments
    LruHash::iterator h = _hash.find(url);
             ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_iterator_base_types.h:118:12: note: template is declared here
    struct iterator
           ^
../../proxy/logstats.cc:605:8: error: unknown type name 'OriginStorage'; did you mean 'OriginStats'?
static OriginStorage origins;
       ^~~~~~~~~~~~~
       OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:606:8: error: unknown type name 'OriginSet'; did you mean 'OriginStats'?
static OriginSet *origin_set;
       ^~~~~~~~~
       OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1198:3: error: use of undeclared identifier 'OriginStorage'; did you mean 'OriginStats'?
  OriginStorage::iterator o_iter;
  ^~~~~~~~~~~~~
  OriginStats
../../proxy/logstats.cc:154:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1198:18: error: no type named 'iterator' in 'OriginStats'
  OriginStorage::iterator o_iter;
  ~~~~~~~~~~~~~~~^
../../proxy/logstats.cc:1362:43: error: no member named 'find' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                              ~~~~~~~~~~  ^
../../proxy/logstats.cc:1362:68: error: no member named 'end' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                                                       ~~~~~~~~~~  ^
../../proxy/logstats.cc:1363:32: error: no member named 'find' in 'OriginStats'
              o_iter = origins.find(tok);
                       ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[2]: *** [logstats.o] Error 1
{noformat}

So back at square one.

On FreeBSD 10 it fails for yet another reason:
{noformat}
libtool: compile:  clang++ -DHAVE_CONFIG_H -I. -I../../../lib/ts -I../../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dfreebsd -DDEBUG -D_DEBUG -I/usr/local/include -I/usr/local/include/tcl8.4 -std=c++11 -ggdb3 -pipe -Wall -Werror -Qunused-arguments -Wno-invalid-offsetof -MT ink_time.lo -MD -MP -MF .deps/ink_time.Tpo -c ../../../lib/ts/ink_time.cc  -fPIC -DPIC -o .libs/ink_time.o
../../../lib/ts/ink_time.cc:686:41: error: cast from pointer to smaller type 'int' loses information
  ink_assert(localtime_r(clock, &tm) != (int) NULL);    /* ADK_122100 */
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
../../../lib/ts/ink_assert.h:50:27: note: expanded from macro 'ink_assert'
            (void)(likely(EX) ? (void)0 : _ink_assert(#EX, __FILE__, __LINE__)) \
                          ^
../../../lib/ts/ink_apidefs.h:34:40: note: expanded from macro 'likely'
#define likely(x)       __builtin_expect (!!(x), 1)
                                             ^
1 error generated.
gmake[3]: *** [ink_time.lo] Error 1
{noformat}

I'll look into the latter, but I think [~jamespeach]'s last patch, while prettier, is a step back.
                  
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502418#comment-13502418 ] 

Igor Galić commented on TS-1583:
--------------------------------

With clang this still fails with:
{noformat}
clang++ -DHAVE_CONFIG_H -I. -I../../proxy -I../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib/records -I../../lib/ts -I../../proxy/http -I../../proxy/logging -I../../proxy/http/remap -I../../proxy/hdrs -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -I../../proxy/api/ts -I. -I./api/ts -I../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -DDEBUG -D_DEBUG  -std=c++11 -ggdb3 -Werror -Qunused-arguments -Wno-invalid-offsetof -MT logstats.o -MD -MP -MF .deps/logstats.Tpo -c -o logstats.o ../../proxy/logstats.cc
../../proxy/logstats.cc:62:39: error: target of using declaration conflicts with declaration already in scope
     namespace std { using __gnu_cxx::hash; }
                                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: target of using declaration
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: conflicting declaration
    struct hash : public __hash_base<size_t, _Tp>
           ^
1 error generated.
gmake[2]: *** [logstats.o] Error 1
{noformat}
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] [Comment Edited] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Alan M. Carroll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502216#comment-13502216 ] 

Alan M. Carroll edited comment on TS-1583 at 11/21/12 7:24 PM:
---------------------------------------------------------------

I fixed this by adding "std::" to hash<>. Otherwise "hash" is apparently ambiguous.

Turns out there is a std::hash and one in a BC related _gnu_cxx namespace. I think the std namespace has the one we want.
                
      was (Author: amc):
    I fixed this by adding "std::" to hash<>. Otherwise "hash" is apparently ambiguous, presumably because there is a global "hash" function somewhere. Unfortunately I have never managed to get ctags to work so I can't say where that might be.
                  
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] [Comment Edited] (TS-1583) make fails - logstat.cc

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501899#comment-13501899 ] 

Igor Galić edited comment on TS-1583 at 11/21/12 12:15 PM:
-----------------------------------------------------------

If i understand clang's error output correctly, we have a visibility issue, now that we're strictly using {{-std=c++11}}
{noformat}
gmake[2]: Entering directory `/home/igalic/src/asf/trafficserver/CLANG/proxy'
clang++ -DHAVE_CONFIG_H -I. -I../../proxy -I../lib/ts  -I../../iocore/eventsystem -I../../iocore/net -I../../iocore/aio -I../../iocore/hostdb -I../../iocore/cache -I../../iocore/cluster -I../../iocore/utils -I../../iocore/dns -I../../lib/records -I../../lib/ts -I../../proxy/http -I../../proxy/logging -I../../proxy/http/remap -I../../proxy/hdrs -I../../mgmt -I../../mgmt/preparse -I../../mgmt/utils -I../../proxy/api/ts -I. -I./api/ts -I../../lib -D_LARGEFILE64_SOURCE=1 -D_COMPILE64BIT_SOURCE=1 -D_GNU_SOURCE -D_REENTRANT -Dlinux -DDEBUG -D_DEBUG  -std=c++11 -ggdb3 -Werror -Qunused-arguments -Wno-invalid-offsetof -MT logstats.o -MD -MP -MF .deps/logstats.Tpo -c -o logstats.o ../../proxy/logstats.cc
../../proxy/logstats.cc:349:48: error: reference to 'hash' is ambiguous
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                               ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:349:54: error: expected expression
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                     ^
../../proxy/logstats.cc:349:67: error: expected unqualified-id
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                                  ^
../../proxy/logstats.cc:350:33: error: reference to 'hash' is ambiguous
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:350:39: error: expected expression
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                      ^
../../proxy/logstats.cc:350:52: error: expected unqualified-id
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                                   ^
../../proxy/logstats.cc:359:54: error: reference to 'hash' is ambiguous
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                     ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:359:60: error: expected expression
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                           ^
../../proxy/logstats.cc:359:73: error: expected member name or ';' after declaration specifiers
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
  ~~~~~~~                                                               ^
../../proxy/logstats.cc:580:3: error: unknown type name 'LruHash'
  LruHash _hash;
  ^
../../proxy/logstats.cc:402:5: error: use of undeclared identifier 'LruHash'
    LruHash::iterator h = _hash.find(url);
    ^
../../proxy/logstats.cc:402:14: error: use of class template iterator requires template arguments
    LruHash::iterator h = _hash.find(url);
             ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_iterator_base_types.h:118:12: note: template is declared here
    struct iterator
           ^
../../proxy/logstats.cc:590:8: error: unknown type name 'OriginStorage'; did you mean 'OriginStats'?
static OriginStorage origins;
       ^~~~~~~~~~~~~
       OriginStats
../../proxy/logstats.cc:139:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:591:8: error: unknown type name 'OriginSet'; did you mean 'OriginStats'?
static OriginSet *origin_set;
       ^~~~~~~~~
       OriginStats
../../proxy/logstats.cc:139:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1183:3: error: use of undeclared identifier 'OriginStorage'; did you mean 'OriginStats'?
  OriginStorage::iterator o_iter;
  ^~~~~~~~~~~~~
  OriginStats
../../proxy/logstats.cc:139:8: note: 'OriginStats' declared here
struct OriginStats
       ^
../../proxy/logstats.cc:1183:18: error: no type named 'iterator' in 'OriginStats'
  OriginStorage::iterator o_iter;
  ~~~~~~~~~~~~~~~^
../../proxy/logstats.cc:1347:43: error: no member named 'find' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                              ~~~~~~~~~~  ^
../../proxy/logstats.cc:1347:68: error: no member named 'end' in 'OriginStats'
            if (origin_set ? (origin_set->find(tok) != origin_set->end()) : 1) {
                                                       ~~~~~~~~~~  ^
../../proxy/logstats.cc:1348:32: error: no member named 'find' in 'OriginStats'
              o_iter = origins.find(tok);
                       ~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[2]: *** [logstats.o] Error 1
{noformat}
                
      was (Author: i.galic):
    According to clang we have a visibility issue here:
{noformat}
gmake[2]: Entering directory `/home/igalic/src/asf/trafficserver/CLANG/proxy'
  CXX    logstats.o
../../proxy/logstats.cc:349:48: error: reference to 'hash' is ambiguous
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                               ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:349:54: error: expected expression
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                     ^
../../proxy/logstats.cc:349:67: error: expected unqualified-id
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                                  ^
../../proxy/logstats.cc:350:33: error: reference to 'hash' is ambiguous
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:350:39: error: expected expression
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                      ^
../../proxy/logstats.cc:350:52: error: expected unqualified-id
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                                   ^
../../proxy/logstats.cc:359:54: error: reference to 'hash' is ambiguous
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                     ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:359:60: error: expected expression
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                           ^
../../proxy/logstats.cc:359:73: error: expected member name or ';' after declaration specifiers
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
  ~~~~~~~                                                               ^
../../proxy/logstats.cc:580:3: error: unknown type name 'LruHash'
  LruHash _hash;
  ^
../../proxy/logstats.cc:402:5: error: use of undeclared identifier 'LruHash'
    LruHash::iterator h = _hash.find(url);
    ^
../../proxy/logstats.cc:402:14: error: use of class template iterator requires template arguments
    LruHash::iterator h = _hash.find(url);
             ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_iterator_base_types.h:118:12: note: template is declared here
    struct iterator
           ^
{noformat}
                  
> make fails - logstat.cc
> -----------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503394#comment-13503394 ] 

Igor Galić commented on TS-1583:
--------------------------------

>From #llvm:
{quote}
< d0k> jMCg: you're comparing a pointer against NULL, why the cast?
< d0k> jMCg: on a 64 bit platform it truncates the value of the pointer to 32 bits, that's not legal in c++
< d0k> also comparing a pointer and an int is dubious
{quote}
I should probably move these out into a separate bug.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) make fails - logstat.cc

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501899#comment-13501899 ] 

Igor Galić commented on TS-1583:
--------------------------------

According to clang we have a visibility issue here:
{noformat}
gmake[2]: Entering directory `/home/igalic/src/asf/trafficserver/CLANG/proxy'
  CXX    logstats.o
../../proxy/logstats.cc:349:48: error: reference to 'hash' is ambiguous
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                               ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:349:54: error: expected expression
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                     ^
../../proxy/logstats.cc:349:67: error: expected unqualified-id
typedef hash_map <const char *, OriginStats *, hash <const char *>, eqstr> OriginStorage;
                                                                  ^
../../proxy/logstats.cc:350:33: error: reference to 'hash' is ambiguous
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:350:39: error: expected expression
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                      ^
../../proxy/logstats.cc:350:52: error: expected unqualified-id
typedef hash_set <const char *, hash <const char *>, eqstr> OriginSet;
                                                   ^
../../proxy/logstats.cc:359:54: error: reference to 'hash' is ambiguous
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                     ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/backward/hash_fun.h:69:12: note: candidate found by name lookup is '__gnu_cxx::hash'
    struct hash { };
           ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/functional_hash.h:57:12: note: candidate found by name lookup is 'std::hash'
    struct hash : public __hash_base<size_t, _Tp>
           ^
../../proxy/logstats.cc:359:60: error: expected expression
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
                                                           ^
../../proxy/logstats.cc:359:73: error: expected member name or ';' after declaration specifiers
  typedef hash_map<const char *, LruStack::iterator, hash <const char *>, eqstr> LruHash;
  ~~~~~~~                                                               ^
../../proxy/logstats.cc:580:3: error: unknown type name 'LruHash'
  LruHash _hash;
  ^
../../proxy/logstats.cc:402:5: error: use of undeclared identifier 'LruHash'
    LruHash::iterator h = _hash.find(url);
    ^
../../proxy/logstats.cc:402:14: error: use of class template iterator requires template arguments
    LruHash::iterator h = _hash.find(url);
             ^
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/stl_iterator_base_types.h:118:12: note: template is declared here
    struct iterator
           ^
{noformat}
                
> make fails - logstat.cc
> -----------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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

Re: [jira] [Commented] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by Igor Galić <i....@brainsware.org>.
trying to do that now.

----- Original Message -----
> 
>     [
>     https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502458#comment-13502458
>     ]
> 
> Alan M. Carroll commented on TS-1583:
> -------------------------------------
> 
> jpeach says this can be fixed by adding to line 58 (the gcc version
> check before the import)
> 
> "&& !defined(__clang__)"
> 
> Someone with access to clang should test that and commit if it works.
>                 
> > Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> > ---------------------------------------------------------
> >
> >                 Key: TS-1583
> >                 URL: https://issues.apache.org/jira/browse/TS-1583
> >             Project: Traffic Server
> >          Issue Type: Bug
> >          Components: Build
> >    Affects Versions: 3.3.0
> >         Environment: Fedora 17 64bit - gcc 4.7
> >            Reporter: Luca Rea
> >         Attachments: ts-1583.patch
> >
> >
> > master trunk
> > {noformat}
> > make[2]: Entering directory `/home/luca/trafficserver/proxy'
> >   CXX    logstats.o
> > logstats.cc:349:74: error: template argument 3 is invalid
> > logstats.cc:349:89: error: invalid type in declaration before ‘;’
> > token
> > logstats.cc:350:59: error: template argument 2 is invalid
> > logstats.cc:350:70: error: invalid type in declaration before ‘;’
> > token
> > logstats.cc:359:80: error: template argument 3 is invalid
> > logstats.cc: In member function ‘void UrlLru::add_stat(const char*,
> > int64_t, int, int, int, int)’:
> > logstats.cc:402:23: error: expected initializer before ‘h’
> > logstats.cc:404:9: error: ‘h’ was not declared in this scope
> > logstats.cc:404:20: error: request for member ‘end’ in
> > ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type
> > ‘UrlLru::LruHash {aka int}’
> > logstats.cc:461:21: error: request for member ‘find’ in
> > ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type
> > ‘UrlLru::LruHash {aka int}’
> > logstats.cc:462:26: error: request for member ‘end’ in
> > ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type
> > ‘UrlLru::LruHash {aka int}’
> > logstats.cc:463:19: error: request for member ‘erase’ in
> > ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type
> > ‘UrlLru::LruHash {aka int}’
> > logstats.cc:522:18: error: assignment of read-only location ‘*(u +
> > ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> > logstats.cc:522:18: error: cannot convert
> > ‘std::list<UrlStats>::iterator {aka
> > std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> > logstats.cc: In member function ‘void UrlLru::_init()’:
> > logstats.cc:536:13: error: request for member ‘resize’ in
> > ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type
> > ‘UrlLru::LruHash {aka int}’
> > logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*,
> > bool)’:
> > logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> > logstats.cc:1347:43: error: request for member ‘find’ in ‘*
> > origin_set’, which is of non-class type ‘OriginSet {aka int}’
> > logstats.cc:1347:68: error: request for member ‘end’ in ‘*
> > origin_set’, which is of non-class type ‘OriginSet {aka int}’
> > logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> > logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’,
> > which is of non-class type ‘OriginStorage {aka int}’
> > logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’,
> > which is of non-class type ‘OriginStorage {aka int}’
> > logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’
> > to ‘char’ [-fpermissive]
> > logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> > logstats.cc:2132:16: error: request for member ‘empty’ in
> > ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> > logstats.cc:2134:25: error: invalid use of qualified-name
> > ‘::iterator’
> > logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> > logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> > logstats.cc:2134:46: error: request for member ‘begin’ in
> > ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> > logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’,
> > which is of non-class type ‘OriginStorage {aka int}’
> > logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> > logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> > logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> > logstats.cc: In function ‘int main(int, char**)’:
> > logstats.cc:2295:21: error: request for member ‘insert’ in ‘*
> > origin_set’, which is of non-class type ‘OriginSet {aka int}’
> > logstats.cc:2330:25: error: request for member ‘insert’ in ‘*
> > origin_set’, which is of non-class type ‘OriginSet {aka int}’
> > make[2]: *** [logstats.o] Error 1
> > make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> > make: *** [all-recursive] Error 1
> > {noformat}
> 
> --
> 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
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


[jira] [Commented] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Alan M. Carroll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502458#comment-13502458 ] 

Alan M. Carroll commented on TS-1583:
-------------------------------------

jpeach says this can be fixed by adding to line 58 (the gcc version check before the import)

"&& !defined(__clang__)"

Someone with access to clang should test that and commit if it works.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) make fails - logstat.cc

Posted by "Igor Galić (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Galić updated TS-1583:
---------------------------

    Comment: was deleted

(was: Again, this works for me™. Please include the {{config.log}} for debugging.)
    
> make fails - logstat.cc
> -----------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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] (TS-1583) Visibility of hash_map unclear to GCC 4.7 when -std=c++11

Posted by "Alan M. Carroll (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-1583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502216#comment-13502216 ] 

Alan M. Carroll commented on TS-1583:
-------------------------------------

I fixed this by adding "std::" to hash<>. Otherwise "hash" is apparently ambiguous, presumably because there is a global "hash" function somewhere. Unfortunately I have never managed to get ctags to work so I can't say where that might be.
                
> Visibility of hash_map unclear to GCC 4.7 when -std=c++11
> ---------------------------------------------------------
>
>                 Key: TS-1583
>                 URL: https://issues.apache.org/jira/browse/TS-1583
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.3.0
>         Environment: Fedora 17 64bit - gcc 4.7
>            Reporter: Luca Rea
>         Attachments: ts-1583.patch
>
>
> master trunk
> {noformat}
> make[2]: Entering directory `/home/luca/trafficserver/proxy'
>   CXX    logstats.o
> logstats.cc:349:74: error: template argument 3 is invalid
> logstats.cc:349:89: error: invalid type in declaration before ‘;’ token
> logstats.cc:350:59: error: template argument 2 is invalid
> logstats.cc:350:70: error: invalid type in declaration before ‘;’ token
> logstats.cc:359:80: error: template argument 3 is invalid
> logstats.cc: In member function ‘void UrlLru::add_stat(const char*, int64_t, int, int, int, int)’:
> logstats.cc:402:23: error: expected initializer before ‘h’
> logstats.cc:404:9: error: ‘h’ was not declared in this scope
> logstats.cc:404:20: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:461:21: error: request for member ‘find’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:462:26: error: request for member ‘end’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:463:19: error: request for member ‘erase’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc:522:18: error: assignment of read-only location ‘*(u + ((sizetype)((long unsigned int)((UrlLru*)this)->UrlLru::_hash)))’
> logstats.cc:522:18: error: cannot convert ‘std::list<UrlStats>::iterator {aka std::_List_iterator<UrlStats>}’ to ‘const char’ in assignment
> logstats.cc: In member function ‘void UrlLru::_init()’:
> logstats.cc:536:13: error: request for member ‘resize’ in ‘((UrlLru*)this)->UrlLru::_hash’, which is of non-class type ‘UrlLru::LruHash {aka int}’
> logstats.cc: In function ‘int parse_log_buff(LogBufferHeader*, bool)’:
> logstats.cc:1183:27: error: expected initializer before ‘o_iter’
> logstats.cc:1347:43: error: request for member ‘find’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1347:68: error: request for member ‘end’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:1348:15: error: ‘o_iter’ was not declared in this scope
> logstats.cc:1348:32: error: request for member ‘find’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1349:27: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:1356:39: error: invalid conversion from ‘OriginStats*’ to ‘char’ [-fpermissive]
> logstats.cc: In function ‘void my_exit(const ExitStatus&)’:
> logstats.cc:2132:16: error: request for member ‘empty’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:25: error: invalid use of qualified-name ‘::iterator’
> logstats.cc:2134:34: error: expected ‘;’ before ‘i’
> logstats.cc:2134:34: error: ‘i’ was not declared in this scope
> logstats.cc:2134:46: error: request for member ‘begin’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:68: error: request for member ‘end’ in ‘origins’, which is of non-class type ‘OriginStorage {aka int}’
> logstats.cc:2134:73: error: expected ‘)’ before ‘;’ token
> logstats.cc:2134:75: error: ‘i’ was not declared in this scope
> logstats.cc:2134:78: error: expected ‘;’ before ‘)’ token
> logstats.cc: In function ‘int main(int, char**)’:
> logstats.cc:2295:21: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> logstats.cc:2330:25: error: request for member ‘insert’ in ‘* origin_set’, which is of non-class type ‘OriginSet {aka int}’
> make[2]: *** [logstats.o] Error 1
> make[2]: Leaving directory `/home/luca/trafficserver/proxy'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/luca/trafficserver/proxy'
> make: *** [all-recursive] Error 1
> {noformat}

--
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