nathan-russell/hashmap

hashmap has been removed from CRAN?

jemunro opened this issue · 5 comments

hashmap has been removed from CRAN?

I just ran into this too. I installed using devtools::install_github("nathan-russell/hashmap") but I needed to update the Rcpp package from 1.0.4 to 1.0.4.6; it failed on 1.0.4 but succeeded with warnings using 1.0.4.6.

I hope the CRAN version archiving gets addressed.

This is still an issue. Package "hashmap" is not found with Rcpp version 1.0.9. devtools::install_github("nathan-russell/hashmap") also failed for me:

> devtools::install_github("nathan-russell/hashmap")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo nathan-russell/hashmap@HEAD
✔  checking for file ‘/private/var/folders/s5/8c3440t516q0764ngq5plsg00000gp/T/Rtmpk0xnqZ/remotes19412f78df92/nathan-russell-hashmap-39d547d/DESCRIPTION’ ...
─  preparing ‘hashmap’:
✔  checking DESCRIPTION meta-information
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘hashmap_0.2.2.tar.gz’
   
* installing *source* package ‘hashmap’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DBOOST_NO_INT64_T -DBOOST_NO_INTEGRAL_INT64_T -DBOOST_NO_LONG_LONG -DNO_SPP_LONG_LONG -I../inst/include/hashmap -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c HashMapClass.cpp -o HashMapClass.o
In file included from HashMapClass.cpp:21:
In file included from ./../inst/include/hashmap/HashTemplate.hpp:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered_map.hpp:17:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered/unordered_map.hpp:18:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/functional/hash.hpp:6:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/container_hash/hash.hpp:342:27: error: no type named 'uint64_t' in namespace 'boost'; did you mean simply 'uint64_t'?
            inline static boost::uint64_t fn(boost::uint64_t h, boost::uint64_t k)
                          ^~~~~~~~~~~~~~~
                          uint64_t
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here
typedef unsigned long long uint64_t;
                           ^
In file included from HashMapClass.cpp:21:
In file included from ./../inst/include/hashmap/HashTemplate.hpp:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered_map.hpp:17:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered/unordered_map.hpp:18:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/functional/hash.hpp:6:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/container_hash/hash.hpp:342:46: error: no type named 'uint64_t' in namespace 'boost'; did you mean simply 'uint64_t'?
            inline static boost::uint64_t fn(boost::uint64_t h, boost::uint64_t k)
                                             ^~~~~~~~~~~~~~~
                                             uint64_t
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here
typedef unsigned long long uint64_t;
                           ^
In file included from HashMapClass.cpp:21:
In file included from ./../inst/include/hashmap/HashTemplate.hpp:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered_map.hpp:17:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered/unordered_map.hpp:18:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/functional/hash.hpp:6:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/container_hash/hash.hpp:342:65: error: no type named 'uint64_t' in namespace 'boost'; did you mean simply 'uint64_t'?
            inline static boost::uint64_t fn(boost::uint64_t h, boost::uint64_t k)
                                                                ^~~~~~~~~~~~~~~
                                                                uint64_t
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here
typedef unsigned long long uint64_t;
                           ^
In file included from HashMapClass.cpp:21:
In file included from ./../inst/include/hashmap/HashTemplate.hpp:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered_map.hpp:17:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered/unordered_map.hpp:18:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/functional/hash.hpp:6:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/container_hash/hash.hpp:344:23: error: no type named 'uint64_t' in namespace 'boost'; did you mean simply 'uint64_t'?
                const boost::uint64_t m = (boost::uint64_t(0xc6a4a793) << 32) + 0x5bd1e995;
                      ^~~~~~~~~~~~~~~
                      uint64_t
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h:31:28: note: 'uint64_t' declared here
typedef unsigned long long uint64_t;
                           ^
In file included from HashMapClass.cpp:21:
In file included from ./../inst/include/hashmap/HashTemplate.hpp:25:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered_map.hpp:17:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/unordered/unordered_map.hpp:18:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/functional/hash.hpp:6:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/container_hash/hash.hpp:344:51: error: no member named 'uint64_t' in namespace 'boost'
                const boost::uint64_t m = (boost::uint64_t(0xc6a4a793) << 32) + 0x5bd1e995;
                                           ~~~~~~~^
5 errors generated.
make: *** [HashMapClass.o] Error 1
ERROR: compilation failed for package ‘hashmap’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/hashmap’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/s5/8c3440t516q0764ngq5plsg00000gp/T//Rtmpk0xnqZ/file19411dbc1c56/hashmap_0.2.2.tar.gz’ had non-zero exit status

I ran into this issue on my Macbook (had no issues installing on Linux machine). My fix below; note I don't know an awful lot about types/c++/what you shouldn't change in your dev folder, but wanted to use this library so proceeded with some caution.

Something to do with ill-defined types in the boost library (or at least the part hashmap wants to interface with). I fixed this by navigating to Library/Frameworks/R.framework/Versions/4.2/Resources/library/BH/include/boost/container_hash/hash.hpp and changing each instance of boost::uint64_t to simply ::uint64_t.

Hopefully this helps someone (even if there's been considerable time since the issue was opened, and the last comment).

Seems I can't find the package in R cran, while install by github is interrupt regularly, hope someone could figure out the way to use this package, I think it could improve performance.

@jamesmurray7 Hi, thank you very much! It is a good method to solve this problem.