venkey-ariv / sparsehash

Automatically exported from code.google.com/p/sparsehash
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Build warnings on amd64 FreeBSD #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. include sparse_hash_map
2. compile on FreeBSD using a 64bit architecture using g++ (GNU)
3.

What is the expected output? What do you see instead?

g++ compiler issues multiple warnings when sparse_hash_map is included,
probably because of incompatibility in serialization code for 64bit c-types.
What version of the product are you using? On what operating system?
Sparsehash0.8 - FreeBSD on an AMD64 arhitecture

Please provide any additional information below.

Original issue reported on code.google.com by Yaniv...@gmail.com on 22 Aug 2007 at 2:59

GoogleCodeExporter commented 9 years ago
Can you include (attach) the complete make output?  This will make it easier to 
fix.

Original comment by csilv...@gmail.com on 22 Aug 2007 at 4:28

GoogleCodeExporter commented 9 years ago
makefile output:
-------------------------------------------
g++ -o bin.amd64_FreeBSD/hcluster_sphash nd_clustering.cpp
-I/cs/grad/lonshy/src/cpp_util/ -Wall  -O3 -DNDEBUG -DDELETE  -DUSE_SPARSE_HASH
obj.amd64_FreeBSD/cmdline.o -I/cs/proto/lonshy/tools_src/sparsehash-0.8/src/
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable: In member 
function
'void* google::sparsegroup<T, GROUP_SIZE>::realloc_or_die(void*, size_t) [with 
T =
std::pair<const unsigned int, double>, short unsigned int GROUP_SIZE = 48u]':
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:723:   
instantiated
from 'T* google::sparsegroup<T, GROUP_SIZE>::allocate_group(size_t) [with T =
std::pair<const unsigned int, double>, short unsigned int GROUP_SIZE = 48u]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:779:   
instantiated
from 'google::sparsegroup<T, GROUP_SIZE>::sparsegroup(const 
google::sparsegroup<T,
GROUP_SIZE>&) [with T = std::pair<const unsigned int, double>, short unsigned 
int
GROUP_SIZE = 48u]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:1164:   
instantiated
from 'google::sparsetable<T, GROUP_SIZE>::sparsetable(size_t) [with T =
std::pair<const unsigned int, double>, short unsigned int GROUP_SIZE = 48u]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsehash/sparsehashtable.
h:589:
  instantiated from 'google::sparse_hashtable<Value, Key, HashFcn, ExtractKey,
EqualKey, Alloc>::sparse_hashtable(const google::sparse_hashtable<Value, Key,
HashFcn, ExtractKey, EqualKey, Alloc>&, size_t) [with Value = std::pair<const
unsigned int, double>, Key = unsigned int, HashFcn = __gnu_cxx::hash<unsigned 
int>,
ExtractKey = google::sparse_hash_map<unsigned int, double, 
__gnu_cxx::hash<unsigned
int>, std::equal_to<unsigned int>, std::allocator<double> >::SelectKey, 
EqualKey =
std::equal_to<unsigned int>, Alloc = std::allocator<double>]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparse_hash_map:96:  
instantiated from here
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:714: warning: 
format
'%d' expects type 'int', but argument 3 has type 'size_t'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable: In member 
function
'void* google::sparsegroup<T, GROUP_SIZE>::realloc_or_die(void*, size_t) [with 
T =
unsigned int, short unsigned int GROUP_SIZE = 48u]':
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:723:   
instantiated
from 'T* google::sparsegroup<T, GROUP_SIZE>::allocate_group(size_t) [with T =
unsigned int, short unsigned int GROUP_SIZE = 48u]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:779:   
instantiated
from 'google::sparsegroup<T, GROUP_SIZE>::sparsegroup(const 
google::sparsegroup<T,
GROUP_SIZE>&) [with T = unsigned int, short unsigned int GROUP_SIZE = 48u]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:1164:   
instantiated
from 'google::sparsetable<T, GROUP_SIZE>::sparsetable(size_t) [with T = 
unsigned int,
short unsigned int GROUP_SIZE = 48u]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsehash/sparsehashtable.
h:589:
  instantiated from 'google::sparse_hashtable<Value, Key, HashFcn, ExtractKey,
EqualKey, Alloc>::sparse_hashtable(const google::sparse_hashtable<Value, Key,
HashFcn, ExtractKey, EqualKey, Alloc>&, size_t) [with Value = unsigned int, Key 
=
unsigned int, HashFcn = __gnu_cxx::hash<unsigned int>, ExtractKey =
google::sparse_hash_set<unsigned int, __gnu_cxx::hash<unsigned int>,
std::equal_to<unsigned int>, std::allocator<unsigned int> >::Identity, EqualKey 
=
std::equal_to<unsigned int>, Alloc = std::allocator<unsigned int>]'
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparse_hash_set:99:  
instantiated from here
/cs/proto/lonshy/tools_src/sparsehash-0.8/src/google/sparsetable:714: warning: 
format
'%d' expects type 'int', but argument 3 has type 'size_t'

Original comment by Yaniv...@gmail.com on 22 Aug 2007 at 10:56

GoogleCodeExporter commented 9 years ago
Whew!  All that for just one warning -- the joy of templates.  I see the 
problem, and
it's easy to fix; I'll do so for the next release.  This is the full warning 
output;
there aren't other warning when you compile?

Original comment by csilv...@gmail.com on 22 Aug 2007 at 11:01

GoogleCodeExporter commented 9 years ago
I thought that there were multiple warnings, but there are just the same one for
different versions of the executable. 

Thanks,
Yaniv

Original comment by Yaniv...@gmail.com on 22 Aug 2007 at 11:16

GoogleCodeExporter commented 9 years ago

Original comment by csilv...@gmail.com on 9 Oct 2007 at 8:58

GoogleCodeExporter commented 9 years ago
Sparsehash 0.9 was just released, which should fix this problem.

Original comment by csilv...@gmail.com on 9 Oct 2007 at 10:39

GoogleCodeExporter commented 9 years ago
Thank you.

Original comment by Yaniv...@gmail.com on 10 Oct 2007 at 1:00