[Insight-users] Error gdcm 2.0.18 build with ITK 3.20.0

Neil.Burdett at csiro.au Neil.Burdett at csiro.au
Wed Jul 27 22:45:19 EDT 2011


Hi,
    I'm string to build ITK 3.20.0 using gdcm 2.0.18. I'm building under Ubuntu 10.04 and gdcm 2.0.18 builds without errors
However, I get the following error when building ITK 3.20.0

/usr/bin/ld: /usr/local/lib/libgdcmMSFF.a(gdcmFileExplicitFilter.cxx.o): relocation R_X86_64_32S against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgdcmMSFF.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [bin/libITKIO.so.3.20.0] Error 1
make[1]: *** [Code/IO/CMakeFiles/ITKIO.dir/all] Error 2
make: *** [all] Error 2

I have, however, set "-fPIC" Below are excerpts from my ITK CMakeCache.txt file:

//Name of build on the dashboard
BUILDNAME:STRING=Linux-g++-4.4

//Build Doxygen Documentation
BUILD_DOXYGEN:BOOL=OFF

//Build the Examples directory.
BUILD_EXAMPLES:BOOL=ON

//Toggle building shared libraries
BUILD_SHARED_LIBS:BOOL=ON

//Build the testing tree.
BUILD_TESTING:BOOL=OFF

//Path to a program.
BZRCOMMAND:FILEPATH=BZRCOMMAND-NOTFOUND

//Path to a program.
CMAKE_AR:FILEPATH=/usr/bin/ar

//For backwards compatibility, what version of CMake commands and
// syntax should this version of CMake try to support.
CMAKE_BACKWARDS_COMPATIBILITY:STRING=2.4

//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo

//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-4.4

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=-fPIC

...
//C compiler.
CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.4

//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=-fPIC

...
//Value Computed by CMake
GDCM_BINARY_DIR:STATIC=/home/bur448/Downloads/itk-3.20.0/Utilities/gdcm

//The directory containing a CMake configuration file for GDCM.
GDCM_DIR:PATH=/usr/local/lib/gdcm-2.0

...
//Use an outside build of GDCM.
ITK_USE_SYSTEM_GDCM:BOOL=ON

...

ITK builds if I turn ITK_USE_SYSTEM_GDCM off but obviously not what I want.

Any help much appreciated

Cheers
Neil



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110728/3d550536/attachment.htm>


More information about the Insight-users mailing list