mschubert / clustermq

R package to send function calls as jobs on LSF, SGE, Slurm, PBS/Torque, or each via SSH
https://mschubert.github.io/clustermq/
Apache License 2.0
146 stars 27 forks source link

Configure script can now install when package directory is not a git repo (Ie, when installing from github source in another R session) #264

Closed strazto closed 2 years ago

strazto commented 3 years ago

I'd recommend a squash for this one, half of my commits were me struggling with curl & tar options lmao.

Resolves #263

On my HPC, build paths are a bit unreliable - though the hpc appears to provide a zeromq module, (4.1.3), for whatever reason, the relevant headers weren't being found when I tried to build from master.

I noticed that in develop you were bundling zeromq, so I decided to try it out

When installing this via renv, I would hit the following:

renv::install("mschubert/clustermq@develop")
# paraphrasing
# configure 13: src/libzmq/autogen.sh not found
# error trace

I thought my HPC build tools were the problem for a bit, but with investigation, I realized that this was bc the submodules were not being initialized, so src/libzmq was empty.

To resolve this, we can explicitly tell it to initialize these submodules. Doing this threw an error when installing via

renv::install("mschubert/clustermq@develop")
# paraphrasing
# configure: Not a git directory
# error trace

when installing via github, packages aren't pulled as repos, they're taken from release

When i tried to resolve this by cloning, I ran into another problem which was a bit more specific to my hpc build environment -

I just couldn't get libzeromq/autogen.sh to work properly. Rather than fix this, I figured it would be more reliable to skip the autogen step entirely by pulling from release & using the released ./configure .

mschubert commented 3 years ago

I'm afraid this won't work. We'll need to patch the Makefile.am for CRAN, doing this on the auto-generated files is too difficult

strazto commented 3 years ago

I'm afraid this won't work. We'll need to patch the Makefile.am for CRAN, doing this on the auto-generated files is too difficult

Sure - I'm not really sure what your proposal entails - I can't find a Makefile.am (I see our Makevars.in files, though).

If you can elaborate on what you're proposing, I can try to enact it. For now, my personal fork is sufficient for my own purposes

mschubert commented 2 years ago

Thanks, I'm adding the submodules in configure now if they're not present in https://github.com/mschubert/clustermq/commit/a017225a763ad8a7c240c147503d95c2ced17fea.

The tarball will already have the pre-configured libzmq, so you'll only need to use autogen.sh if you're cloning from git.