External Email - Use Caution
Hi there,
Thank you for directing me to the CMake fswiki. I was able to install the third party packages and execute the command `cmake . -DFS_PACKAGES_DIR="path/to/pkgs"`.
However, when I run `make -j4` (after adjusting a few bash files in various libraries to find (#include) other libraries) I am met with numerous similarly-worded link error lines under the step "Linking Fortran executable t4imgs_4dfp" with the general schema:
/usr/bin/ld: path/to/fortran-related/filename: relocation R_X86_64_32 against `some.variable.or.file.name` can not be used when making a PIE object; recompile with -fPIC
where path/to/fortran-related/filename is either CMakeFiles/t4imgs_4dfp.dir/some-file.c.o or /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.a(some-function.o)
I tried finding a solution online and found the suggestion to add a global -fPIC flag via export CXXFLAGS="$CXXFLAGS -fPIC" (https://stackoverflow.com/questions/13812185/how-to-recompile-with-fpic). I tried this by starting completely over with a new clone of the freesurfer repo and calling cmake . -DFS_PACKAGES_DIR="path/to/pkgs" and the make still failed at the same point.
Other suggestions (e.g., to add --enable-shared at ./configure(in that same thread linked above)) suggest adding arguments when configuring, but since this is all part of the make process I'm not sure whether that's possible.
Any advice? I did not find any similar issues in the archive.
Thank you very much,
Christian McDaniel
________________________________ From: fsbuild fsbuild@contbay.com Sent: Wednesday, October 31, 2018 2:29:59 AM To: freesurfer@nmr.mgh.harvard.edu Cc: Christian Lee Mcdaniel Subject: Re: [Freesurfer] Third party dependencies directory not found when building from source
Hello Christian,
Allow me to suggest that you try following the instructions for the Fresrufer cmake build located here, http://freesurfer.net/fswiki/CMake
Besides the option to build the 3rd party packages with build_packages.py script, you can also download an archive of the prebuilt packages from http://surfer.nmr.mgh.harvard.edu/pub/data/fspackages/prebuilt/
Another option would be to install the equivalent of the CentOS 7 packages on the Ubuntu system you are using, i.e., you may need to install at least cmake, so you will likely need sudo/admin privileges.
Christian Lee Mcdaniel wrote mailto:clm121@uga.edu October 30, 2018 at 21:43 via Postboxhttps://www.postbox-inc.com/?utm_source=email&utm_medium=sumlink&utm_campaign=reach
External Email - Use Caution
Hello Developers,
I am attempting to build Freesurfer from source on my Ubuntu 18.04.1 LTS machine. I have followed the instructions on the freesurfer_linux_developershttp://freesurfer.net/fswiki/freesurfer_linux_developers_page wiki, and have successfully gotten through steps 1 and 2. However, when trying to install the third party dependencies at step 3 via wget ftp://surfer.nmr.mgh.harvard.edu/pub/dist/fs_supportlibs/prebuilt/centos6_x86_64/centos6-x86_64-packages.tar.gz, I get the following response: