mrc-ide / heartbeatr

:heartpulse::computer::heartpulse: Redis heartbeat support
https://mrc-ide.github.io/heartbeatr
Other
2 stars 1 forks source link

Error : object ‘hiredis’ is not exported by 'namespace:RedisAPI' #4

Closed amoeba closed 8 years ago

amoeba commented 8 years ago

Tried to install rrqueue today and was stopped at installing RedisHeartbeat:

Error : object ‘hiredis’ is not exported by 'namespace:RedisAPI'
ERROR: lazy loading failed for package ‘RedisHeartbeat’
* removing ‘/usr/local/lib/R/3.2/site-library/RedisHeartbeat’
Error: Command failed (1)

I'm running Mac OS 10.11.3 (though I was able to reproduce this on Ubuntu) and R 3.2.3. I see the latest Travis CI build is failing for this too. I'm new to R packaging but it looks like RedisAPI just isn't exporting what RedisHeartbeat wants. I looked for RedisAPI::hiredis but only found RedisAPI:: rcppredis_hiredis. Is this right?

More details below:

Redis 3.0.6 installed and running:

$ redis-cli PING
PONG

hiredis installed via brew

$ ls /usr/local/lib | grep hiredis
libhiredis.0.13.dylib
libhiredis.a
libhiredis.dylib
$ export DYLD_LIBRARY_PATH=/usr/local/lib
$ R
devtools::install_github("richfitz/RedisHeartbeat")
Downloading GitHub repo richfitz/RedisHeartbeat@master
from URL https://api.github.com/repos/richfitz/RedisHeartbeat/zipball/master
Installing RedisHeartbeat
Skipping 1 unavailable package: RedisAPI
'/usr/local/Cellar/r/3.2.3/R.framework/Resources/bin/R' --no-site-file  \
  --no-environ --no-save --no-restore CMD INSTALL  \
  '/private/var/folders/sd/zm72yq711_d__q2f_z50k1zm0000gp/T/RtmpZocfio/devtools162bacec5929/richfitz-RedisHeartbeat-0ff6040'  \
  --library='/usr/local/lib/R/3.2/site-library' --install-tests

* installing *source* package ‘RedisHeartbeat’ ...
** libs
clang++ -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I"/usr/local/lib/R/3.2/site-library/Rcpp/include" -I/usr/local/include  -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I../inst/include -fPIC  -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -I"/usr/local/lib/R/3.2/site-library/Rcpp/include" -I/usr/local/include  -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I../inst/include -fPIC  -g -O2  -c heartbeat.cpp -o heartbeat.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/Cellar/r/3.2.3/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/lib -o RedisHeartbeat.so RcppExports.o heartbeat.o -L/usr/local/lib -lhiredis -F/usr/local/Cellar/r/3.2.3/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/3.2/site-library/RedisHeartbeat/libs
** R
** inst
** tests
** preparing package for lazy loading
Error : object ‘hiredis’ is not exported by 'namespace:RedisAPI'
ERROR: lazy loading failed for package ‘RedisHeartbeat’
* removing ‘/usr/local/lib/R/3.2/site-library/RedisHeartbeat’
Error: Command failed (1)

I hope this is just an issue with my setup. I'm happy to help fix however I can.

richfitz commented 8 years ago

Thanks for the heads up; I've been changing all the packages quite a lot behind the scenes (or at least did a couple of months ago) and looks like things don't fit together properly anymore. I should be able to get this fixed pretty quickly.

I'm not using Redis for queuing at the moment as I changed jobs (I was using Amazon EC2 where this sort of setup works really well) so it's off my radar a bit...

richfitz commented 8 years ago

Ah, so it turns out I already dealt with this, but never pushed the changes:

https://twitter.com/rgfitzjohn/status/676086878358011905

Updates have been pushed to the RedisAPI, RedisHeartbeat and rrqueue repos (the RedisHeartbeat problem was only one of the breaking changes I introduced last year). Give it a shot and please let me know if you run into trouble.

richfitz commented 8 years ago

Looks like rrqueue and RedisHeartbeat are both passing on travis now :rocket:

Thanks for the detailed report, and apologies for the trouble.

amoeba commented 8 years ago

No worries! I just successfully installed RedisHeartbeat and rrqueue. Thanks for the quick fix and thanks for writing this amazing set of packages.