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

Enhancement: Set paths to dependencies in CMakeLists.txt #523

Open
toomanycats opened this issue Sep 21, 2023 · 5 comments
Open

Enhancement: Set paths to dependencies in CMakeLists.txt #523

toomanycats opened this issue Sep 21, 2023 · 5 comments

Comments

@toomanycats
Copy link

I've been building the latest AFNI from source on CentOS 7. I've found it difficult to manage the R and Python
environments. It would be super helpful if the build system allowed me to specify their location.

I think it would also be good to have a make task that gets the template data. I suggest using Github's LFS.

I forked the repo and started working on this for Linux only but got overwhelmed.

@mrneont
Copy link
Contributor

mrneont commented Sep 23, 2023

Hi-

Re. the template data, we generally just:

curl -O https://afni.nimh.nih.gov/pub/dist/atlases/afni_atlases_dist.tgz

That seems a good way to go, rather than involving the Makefile?

Re. managing R and Python envs, what do you have in mind? One difficulty is that users might have different locations/setups for R and Python on their OS, and we wouldn't want to force just one location. We have recommendations listed on the setup pages, but users can do other things, too.

Re. CentOS 7: it is certainly fine to build your own, but are you aware of these pre-compiled binaries, too?
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_linux_RH.html

--pt

@toomanycats
Copy link
Author

Thank you for the atlas info I couldn't find that information in the online docs.

WRT to R and Python environments, I'm suggesting the use of cmake variables rather than relying on system versions.
For instance IIRC the Python scripts have #!/usr/bin/env python. Just like the INSTALLDIR is a variable, do the same for R and Python.

My idea directly addresses the different locations. Unless I'm misunderstanding the build options, there currently isn't a way to specify the location of R or Python.

WRT binaries vs a build: Well I've already built this thing :) I prefer to build software when I can. I like to understand the build systems of tools that the lab wants to use. In fact I'd like to submit a PR for some CMAKE ideas I have but I need more time to figure it out. Maybe If I just work on the Linux MakeFile I'm using and make that work, you could give me some hints to apply it to the parent makefile.

@afni-rickr
Copy link
Contributor

Note that build_afni_.py (e.g. build_afni.py -build_root ~/afni/build) will include atlases in the build process.

@toomanycats
Copy link
Author

Is that curl command in the doc ? I didn't see it. It's in my personal build notes now.

@afni-rickr
Copy link
Contributor

Our instructions for building AFNI at this point are to use build_afni.py, which downloads the atlases. And if users do not use build_afni.py, they are generally just downloading a pre-built package (like linux_centos_7_64.tgz, which might apply to you), which also comes with atlases. So we do not explicitly tell users how to get them very often, unless they want a special set of atlases.

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

No branches or pull requests

3 participants