[
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