efficient / libcuckoo

A high-performance, concurrent hash table
Other
1.61k stars 275 forks source link

no member "result_type" during compilation with Intel C++ compiler #21

Closed iamthebot closed 8 years ago

iamthebot commented 8 years ago

Any ideas why this might be thrown? Clang and GCC builds work fine, but we'd like to use libcuckoo with icpc.

icpc -DPACKAGE_NAME=\"libcuckoo-tests\" -DPACKAGE_TARNAME=\"libcuckoo-tests\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"libcuckoo-tests\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libcuckoo-tests\" -DVERSION=\"1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I. -O3 -DNDEBUG -pthread -pthread -std=gnu++11 -MT insert_throughput.o -MD -MP -MF .deps/insert_throughput.Tpo -c -o insert_throughput.o insert_throughput.cc /usr/include/c++/5.3.0/functional(78): error: class "cuckoohash_map<KeyType2, ValType={uint32_t={unsigned int}}, DefaultHasher, std::equal_to, std::allocator<std::pair<const KeyType2, ValType={uint32_t={unsigned int}}>>, 4UL>" has no member "result_type" { typedef typename _Functor::result_type result_type; };

ldalessa commented 8 years ago

We don't have any trouble with the libcuckoo headers/cityhash source with icpc 15.0.1. We don't compile the tests though.

One thing that sometimes happens is that std=gnu++11 will result in icpc running in a gcc emulation mode based on the gcc version it finds in your path. If you're using a module to load an intel toolchain then it sometimes causes problems because gcc can be really old. NERSC has a bunch of Cray-specific issues related to this.

It may be something entirely different, but you should definitely check.

https://www.nersc.gov/users/software/compilers/intel-fortran-c-and-c/intel-bug-reports/c-11-header-files-appear-missing-on-edison/ https://www.nersc.gov/users/software/compilers/intel-fortran-c-and-c/intel-bug-reports/intel-uses-very-old-version-of-libstdc-by-default/

ldalessa commented 8 years ago

The obvious alternative is that your version of icpc isn't compatible with the new gcc-5.3.0 standard library headers (we've seen this before with icpc 15.0.1 at least). You can "downgrade" the gcc in your path to suppress errors in that case. When I'm compiling with icpc I tend to have the gcc-4.8 series stuff in my path. There might be a way to use a different libstdc++ installation manually with icpc too.

iamthebot commented 8 years ago

Yeah, looks like the new GNU headers (>5.0) cause the issue. Intel support confirms they're releasing a fix for this soon. The tests don't fully compile, but the library itself appears to be working fine now. Thanks!