DTIPrep icon indicating copy to clipboard operation
DTIPrep copied to clipboard

Run time error of DTIPrep because of a missed shared library

Open aghayoor opened this issue 9 years ago • 9 comments

I cloned the latest version of DTIPrep (975ed3d9653a785f96405ad96da6bd1f443d59e6) and built it on a Mac OS X 10.10.4 using default cmake parameters except that I turned off USE_DTIProcess. The build was successful, and DTIPrep binary was generated in: bin/DTIPrep.app/Contents/MacOS/DTIPrep

While all other binaries were generated in the "bin/" directory. Why is DTIPrep binary generated in a .app directory rather than the bin directory?

Also, when I run the DTIPrep on a test dataset, I get following error:

" dyld: Library not loaded: libtiff.5.dylib Referenced from: /scratch/DTIPrep/release-20160523/bin/DTIPrep.app/Contents/MacOS/DTIPrep Reason: image not found Trace/BPT trap: 5 "

Does anyone have an idea how to fix this issue?

Thank you, Ali

aghayoor avatar May 25 '16 20:05 aghayoor

The build process returns a warning about library directory:

[ 98%] Building CXX object src/CMakeFiles/DTIPrep.dir/qrc_DTIPrep.cxx.o [100%] Linking CXX executable /scratch/DTIPrep/release/bin/DTIPrep.app/Contents/MacOS/DTIPrep ld: warning: directory not found for option '-L/scratch/DTIPrep/DTIPrep/lib' [100%] Built target DTIPrep [ 98%] No install step for 'DTIPrepTools' [100%] Completed 'DTIPrepTools' [100%] Built target DTIPrepTools

aghayoor avatar May 26 '16 00:05 aghayoor

$ otool -L /scratch/DTIPrep/release/bin/DTIPrep.app/Contents/MacOS/DTIPrep | grep libtiff* libtiff.5.dylib (compatibility version 8.0.0, current version 8.4.0)

aghayoor avatar May 26 '16 00:05 aghayoor

I have updated some dependencies for DTIPrep. I believe it will solve this issue. Please update to the latest version.

juanprietob avatar Jun 01 '16 20:06 juanprietob

@juanprietob : I tried to build the latest version of DTIPrep (5f332c7e3e2880d5568067d3b6c11efec154d748) on Mac OSX 10.10.4 after your recent updates, but I got following compiler error about CMake configuration for BRAINSTools in SuperBuild.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< CMake Error at /usr/local/Cellar/cmake/3.4.3/share/cmake/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" is not able to compile a simple test program.

It fails with the following output:

Change Dir: /scratch/DTIPrep/release_20160601/BRAINSTools-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_15459/fast"

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_15459.dir/build.make CMakeFiles/cmTC_15459.dir/build

Building C object CMakeFiles/cmTC_15459.dir/testCCompiler.c.o

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wno-uninitialized -Wno-unused-parameter -Wall -Wcast-align -Wdisabled-optimization -Wextra -Wformat=2 -Winvalid-pch -Wno-format-nonliteral -Wpointer-arith -Wshadow -Wunused -Wwrite-strings -funit-at-a-time -Wno-strict-overflow -fPIC -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=/scratch/DTIPrep/release_20160601/BRAINSTools-build/10.10 -o CMakeFiles/cmTC_15459.dir/testCCompiler.c.o -c /scratch/DTIPrep/release_20160601/BRAINSTools-build/CMakeFiles/CMakeTmp/testCCompiler.c

clang: error: invalid version number in '-mmacosx-version-min=/scratch/DTIPrep/release_20160601/BRAINSTools-build/10.10'

make[4]: *** [CMakeFiles/cmTC_15459.dir/testCCompiler.c.o] Error 1

make[3]: *** [cmTC_15459/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:64 (project)

-- Configuring incomplete, errors occurred! See also "/scratch/DTIPrep/release_20160601/BRAINSTools-build/CMakeFiles/CMakeOutput.log". See also "/scratch/DTIPrep/release_20160601/BRAINSTools-build/CMakeFiles/CMakeError.log". make[2]: *** [BRAINSTools-prefix/src/BRAINSTools-stamp/BRAINSTools-configure] Error 1 make[1]: *** [CMakeFiles/BRAINSTools.dir/all] Error 2 make: *** [all] Error 2 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

aghayoor avatar Jun 02 '16 15:06 aghayoor

Have you upgraded your OS recently? It seems you need to update XCode dev tools.

juanprietob avatar Jun 02 '16 16:06 juanprietob

No I have not. My Mac OS X is Yosemite version 10.10.4, and it seems that the latest version of XCode does not work with Yosemite. However, the latest version of Xcode for Yosemite should be still good enough for building the BRAINSTools, since I can successfully build the BRAINSTools standalone on my system. Is there any way to change the CMake configurations, so the DTIPrep build will be consistent with older versions of XCode?

aghayoor avatar Jun 02 '16 16:06 aghayoor

I don't know how to make CMake compatible with different versions of XCode. What I will try to do is to create a '.app' for DTIPrep, It will probably work on your system. I will let you know when it is ready.

juanprietob avatar Jun 02 '16 16:06 juanprietob

Ok, thank you so much.

aghayoor avatar Jun 02 '16 16:06 aghayoor

I have release a new version of DTIPrep, the version is 1.2.7 and includes the latest versions of the tools. However, if you plan to contribute to DTIPrep you should update XCode and compile it.

juanprietob avatar Jun 02 '16 21:06 juanprietob