caffe2 icon indicating copy to clipboard operation
caffe2 copied to clipboard

hash_set deprecated

Open thatguymike opened this issue 9 years ago • 9 comments

From GCC deprecation page https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_sgi.html

<hash_map> <hash_set> <rb_tree>

Annoyingly, this is buried in glog but throws a lot of deprecation warnings during build. Not sure if we should just report to glog and silence the warning.

thatguymike avatar Feb 18 '17 01:02 thatguymike

T_T glog :(

I guess we can put an -W message to suppress it? What specific deprecation warning are we getting?

Yangqing avatar Feb 21 '17 18:02 Yangqing

Actually, it seems that glog already supports unordered_set instead of hash_set:

https://github.com/google/glog/blob/0472b91c5defdf90cff7292e3bf7bd86770a9a0a/src/glog/stl_logging.h.in#L41

Maybe this is due to the ubuntu apt-get package not properly compiled.

Yangqing avatar Feb 21 '17 18:02 Yangqing

We could also move glog to a submodule and compile it ourselves to solve this - slightly heavy-handed though...

slayton58 avatar Feb 22 '17 13:02 slayton58

Would you guys be fine with tolerating the warning message? :)

Yangqing avatar Feb 24 '17 04:02 Yangqing

I would prefer to properly get rid of the warning messages only because they are so many (hundreds) and I always ignore them all. This way we can notice new warning messages which could save us from bugs :) http://www.cprogramming.com/tutorial/compiler_warnings.html

pooyadavoodi avatar Feb 24 '17 22:02 pooyadavoodi

We can silence the warning for now.

thatguymike avatar Feb 25 '17 00:02 thatguymike

@thatguymike Mike - what is the build environment you use? I cannot repro on my 16.04 so I probably need a VM.

Yangqing avatar Feb 26 '17 02:02 Yangqing

14.04 fully updated

thatguymike avatar Feb 26 '17 03:02 thatguymike

Should have been fixed in https://github.com/caffe2/caffe2/pull/172 - feel free to reopen this @thatguymike :)

Yangqing avatar Feb 27 '17 18:02 Yangqing