pbdZMQ
pbdZMQ copied to clipboard
Check if using "internal ZMQ" before messing with RPATH
We check this via the Autotool's determined ENABLE_INTERNAL_ZMQ variable which requires AC_SUBSTing which requires generating src/install.libs.R from src/install.libs.R.in
Without this, when building this package for the Anaconda Distribution we run into:
installing via 'install.libs.R' to /opt/conda/conda-bld/r-pbdzmq_1516748012741/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/R/library/pbdZMQ
character(0)
Error in eval(ei, envir) :
None or more than one libzmq.*.dylib are found.
Seems I may have broken Windows here, suggestions welcome.
No, you should not do that. If ENABLE_INTERNAL_ZMQ were asked and set, then a libzmq.*.dylib should be built and found by install.libs.R. Otherwise, there must have something wrong during producing the libzmq.*.dylib.
It will be helpful to have more information about Anaconda Distribution, where to start it, and how it works.
The issue here is the opposite of what you say. I do not set and do not want ENABLE_INTERNAL_ZMQ. The Anaconda Distribution builds its own shared libraries for such things.
You can read more about The Anaconda Distribution here: https://www.anaconda.com
I am not sure what the opposite means.
ENABLE_INTERNAL_ZMQ will only be turned on manually when you have an external ZMQ library but you want to use the one shipped with pbdZMQ.
- "do not set and do not want". In that case, you need to provide an external zmq library, then you will not reach that error because no dylib file (
length(lib.odx) == 0) will be there or found. This seems not to be your error case, so I am not sure about this. - If you don't have the external zmq library, then the internal one will be built even you "do not set and do not want" regardless
ENABLE_INTERNAL_ZMQis true or not.
Which one is your case? If you don't have an external ZMQ library and "do not set and do not want", then I don't know a way to have pbdZMQ run.
We have an external libzmq.dylib but it is not where this code is looking for it and we do not need this code to run install_name_tool since our build system does that correctly for our required layout.
- If you need to specify the external libraries, you can do these flags to pass them into
pbdZMQand skip the internal shipped one. install.lib.Rdoes not doinstall_name_toolto external libraries regardless what cases. It only applies to the one shipped withinpbdZMQwhen alibzmq*.dylibis built.- Unless you copy any
libzmq*from outside ofpbdZMQ,length(lib.osx)will be 0 when external libraries are provided, becauselib.osx <- list.files(pattern = "libzmq\\.(.*)\\.dylib")at line 7 ofinstall.lib.Rwill not have anything.
What is your case?
I don't think this is needed, so I close this one. Let me know if there are other problems.
OK thanks. I tried your suggestion and other than needing to replace --configure-vars with --configure-args it seems to work fine. Do you want a bug report or a PR to fix the docs here?
Either one is fine. I will alter any of them if the changes don't upset CRAN.