Hello Ruy, The -r flag to will cause the build to skip some dependencies, e.g., sometimes makefiles will rebuild the world when you don’t need them to, so if you are building only 1 file, then it can be useful.
It works for me to cd to ./freesurfer/trc and do the same thing without using -r, i.e., $ cd ./freesurfer/trc $ rm -f dmri_train dmri_train.o $ make dmri_train But I’m doing this in a freesurfer tree where I have already built everything once, or I’ve run the preconfigure, configure steps, and done a make from the top of the tree (./freesurfer). If you see a Makefile in a directory where you want to build, then you can look for the program name in the Makefile. In this case, if you search for dmi_train in ./freesurfer/trc/Makefile you will see at line 819, dmri_train$(EXEEXT): $(dmri_train_OBJECTS) $(dmri_train_DEPENDENCIES) $(EXTRA_dmri_train_DEPENDENCIES) This is the rule to build dmri_train, or the target to build (dmri_train$(EXEEXT)) is on the left hand side of a colon, its dependencies are on the right hand side of the colon, and the commands to build it are what follows underneath. The variable $(EXEEXT) gets set to be whatever the executable extension is for the OS you are building on; in the case of linux this is set to an empty string, so for linux the rule could be written as, dmri_train: $(dmri_train_OBJECTS) $(dmri_train_DEPENDENCIES) $(EXTRA_dmri_train_DEPENDENCIES) So you can expect that telling make to build the target “dmri_train” should do something, i.e., “make dmri_train”. But the dependencies for dmri_train include some libraries, which do not get built just by typing “make dmri_train” under ./freesurfer/trc when nothing else has been built in the tre. We can look at trying to remedy this, but I think the expectation has been that people build from the top of the tree (or at least do that once). - rob On May 2, 2018, at 7:16 PM, Ricardo Valle <ruyval...@gmail.com<mailto:ruyval...@gmail.com>> wrote: External Email - Use Caution Hello Rob, No, I mean the dmri_train binary that is part of Tracula. The main source file is ./freesurfer/trc/dmri_train.cxx. I don’t mind building the whole tree if necessary, but I haven’t been able to do so either. Do you know what the -r flag to make does? Thank you, Ruy On May 2, 2018, at 6:51 PM, Dicamillo, Robert <rdicami...@mgh.harvard.edu<mailto:rdicami...@mgh.harvard.edu>> wrote: Hello Ruy, Do you mean the mri_train binary that gets built under ./freesurfer/mri_train ? (I see a ./freesurfer/dmri_poistats, ./freesurfer/dmri_tensroreig but not a ./freesurfer/dmri_train). Things are not necessarily setup so you can cd to ./freesurfer/<subdir> and just build what is there in isolation from the rest of the tree. But for ./freesiurfer/mri_train, you could try the following, which worked for me on a Mac, e.g., after changing mri_train.c, $ cd ./freesurfer/mri_train $ rm -f mri_train mri_train.o $ make -r mri_train - rob On May 2, 2018, at 5:37 PM, Ricardo Valle <ruyval...@gmail.com<mailto:ruyval...@gmail.com>> wrote: External Email - Use Caution Hello, I need help recompiling dmri_train for Mac. It seems like the instructions in the Mac Developer’s don’t work. When I cd to the trc subdirectory and run make, I am told there is nothing to do. I tried editing the Makefile, adding bin_PROGRAMS = dmri_train, at which point I got a different error. I then uncommented some other lines in the Makefile and managed to start compiling dmri_train, but I’ve been getting a never-ending sequence of errors, essentially telling me that the compiler can’t find various dependencies (boost/program_options.h, itk*.h, etc.). I’ve tried running ./configure with various flags that disable or enable various build options, copying over .h files from other locations, adding -I <path> directives for the compiler in the Makefile, etc. etc. to no avail. Thank you, Ruy On Apr 30, 2018, at 5:19 PM, Ricardo Valle <ruyval...@gmail.com<mailto:ruyval...@gmail.com>> wrote: Dear Freesurfer community, I am trying to recompile Freesurfer in order to get a binary of the latest version of dmri_train. I have been following the instructions in the Freesurfer Mac Developer’s page<https://surfer.nmr.mgh.harvard.edu/fswiki/freesurfer_mac_developers_page> and am stuck at the following: git annex get --metadata fstags=makeinstall . I am attaching the output (stdout and stderr) from this command to this email. Please note that I called the git-annex repository mgh rather than datasrc. The purpose of running this is so I can run make install. Is there a way of recompiling only dmri_train or only the dmri_* programs? If not, do you know why git-annex might be giving me problems and how to solve this? Thank you, Ruy <fs-annex-get.txt> _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.