Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if using "internal ZMQ" before messing with RPATH #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mingwandroid
Copy link

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.

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
mingwandroid added a commit to AnacondaRecipes/r-pbdzmq-feedstock that referenced this pull request Jan 24, 2018
@mingwandroid
Copy link
Author

Seems I may have broken Windows here, suggestions welcome.

@snoweye
Copy link
Owner

snoweye commented Jan 24, 2018

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.

@mingwandroid
Copy link
Author

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.

@mingwandroid
Copy link
Author

You can read more about The Anaconda Distribution here: https://www.anaconda.com

@snoweye
Copy link
Owner

snoweye commented Jan 25, 2018

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_ZMQ is 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.

@mingwandroid
Copy link
Author

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.

@snoweye
Copy link
Owner

snoweye commented Jan 26, 2018

  • If you need to specify the external libraries, you can do these flags to pass them into pbdZMQ and skip the internal shipped one.
  • install.lib.R does not do install_name_tool to external libraries regardless what cases. It only applies to the one shipped within pbdZMQ when a libzmq*.dylib is built.
  • Unless you copy any libzmq* from outside of pbdZMQ, length(lib.osx) will be 0 when external libraries are provided, because lib.osx <- list.files(pattern = "libzmq\\.(.*)\\.dylib") at line 7 of install.lib.R will not have anything.

What is your case?

@snoweye
Copy link
Owner

snoweye commented Feb 11, 2018

I don't think this is needed, so I close this one. Let me know if there are other problems.

@snoweye snoweye closed this Feb 11, 2018
@mingwandroid
Copy link
Author

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?

@snoweye
Copy link
Owner

snoweye commented May 5, 2018

Either one is fine. I will alter any of them if the changes don't upset CRAN.

@snoweye snoweye reopened this May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants