First, I had an error because there was some conflict with CUDA, so I typed: cmake -D GADGETRON_INSTALL_MATLAB_PATH=/tmp/a -D USE_CUDA=off -D CMAKE_BUILD_TYPE=Debug ~/gadgetron-jk
in order to disable the use of CUDA.
However, I get an error at the end of the build saying that the file MatlabUtils.h is not found:
[100%] Building CXX object apps/standalone/cpu/gtplus/CMakeFiles/Matlab_gt_write_analyze.dir/Matlab_gt_write_analyze.cpp.o /home/ctr28/gadgetron-jk/apps/standalone/cpu/gtplus/Matlab_gt_write_analyze.cpp:16:10: fatal error: MatlabUtils.h: No such file or directory #include "MatlabUtils.h" ^~~~~~~~~~~~~~~ compilation terminated. apps/standalone/cpu/gtplus/CMakeFiles/Matlab_gt_write_analyze.dir/build.make:62: recipe for target 'apps/standalone/cpu/gtplus/CMakeFiles/Matlab_gt_write_analyze.dir/Matlab_gt_write_analyze.cpp.o' failed make[2]: *** [apps/standalone/cpu/gtplus/CMakeFiles/Matlab_gt_write_analyze.dir/Matlab_gt_write_analyze.cpp.o] Error 1 CMakeFiles/Makefile2:3620: recipe for target 'apps/standalone/cpu/gtplus/CMakeFiles/Matlab_gt_write_analyze.dir/all' failed make[1]: *** [apps/standalone/cpu/gtplus/CMakeFiles/Matlab_gt_write_analyze.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2
I saw that the toolbox matlab is not present anymore in the new version of gadgetron, is it needed for a correct build?
I am joining as well the CMakeLists.txt file that I modified.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gadgetron
Hello Jabrane,
Matlab is not anmore necessary to compile the Gadgetron but some independent applications (included in the app folder) can be compiled (for creating mexfile ) and need Matlab. The quickest way could be to comment them in the cmake
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gadgetron
Hello Valery,
Thank you for you reply.
Please find attached 2 cmakelists, one only by doing cmake ../ from the freshly cloned gadgetron tree here https://github.com/gadgetron/gadgetron/. The other cmake is the ouput of cmake ../ after commenting the Cmakelists.txt in gadget/apps/standalone/cpu/gtplus.
Whether or not I comment I have an error at building at 20%, which seems to be related to compiler conflicts with CUDA.. By running "cmake -D USE-CUDA=off MyPathToGadgetron", this error does not appear anymore and as you said when I comment the cmake it builds without errors (thank you!).
In an older gadgetron version, I found out that there was a matlab toolbox under gadget/toolboxes. If I copy the whole matlab folder into the new gadgetron tree and run "cmake -D USE-CUDA=off MyPathToGadgetron" without commenting anything in the cmake, it builds without error with make and sudo make install. I'm wondering if those libraries are needed? Gadgetron works fine now but just wondering.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gadgetron
Hi Jabrane (and All),
We reworked the entire Matlab (and Python) subsystem for Gadgetron 4.1 to make it much cleaner and easier to work with. To have Matlab support in the current version of Gadgetron, all you need is a 'matlab' command on your PATH, and the 'gadgetron' Add-On installed in Matlab. It should just work out of the box. If it doesn't - well - that's an issue. Here's an intro to the new interface.
The new interface keeps Matlab in it's own process, and the communication has been reworked to use ISMRMRD streams. This means Gadgetron never needs to be compiled with Matlab (which used to cause a ton of headaches - particularly matching system library versions to those shipping with Matlab was painful). In fact, there should be no Matlab-specific code left in Gadgetron.
If there's still a snippet or two that requires Matlab headers to
compile, I'd consider that an oversight. The purge should have been total.
That said: I'm fairly sure the old-style Matlab toolbox still compiles. I'm also pretty sure you could get the old Matlab gadgets to compile if you wanted to. I took them out of Gadgetron to reduce the amount of pain available to new users. If you feel up for compiling them against your Matlab installation - matching versions and debugging random segfaults - they should work as well as they always did. Consider it an ill-documented option for legacy support.
Things not compiling with CUDA enabled is too common - open an issue (if it has not been fixed already).