[Insight-users] Help: compile errors on solaris

Zhu, Yaoyao (NIH/NLM/LHC) [C] zhuyao at mail.nih.gov
Wed Jun 6 17:34:03 EDT 2007


Hi, Luis,

Thanks for your reply. 

CXX: /usr/sfw/bin/c++
C: /usr/sfw/bin/gcc

I switched off "BUILD_TESTING" and now the errors are 


Linking CXX executable ../../bin/DeformableRegistration4
Undefined                       first referenced
 symbol                             in file
vnl_unary_function<double, vnl_vector<double> >::get_range_min()
const/home/zhuyao/software/itkbuild/bin/libITKNumerics.a(itkSingleValued
VnlCostFunctionAdaptor.o)
vnl_unary_function<double, vnl_vector<double> >::get_range_max()
const/home/zhuyao/software/itkbuild/bin/libITKNumerics.a(itkSingleValued
VnlCostFunctionAdaptor.o)
ld: fatal: Symbol referencing errors. No output written to
../../bin/DeformableRegistration4
collect2: ld returned 1 exit status
*** Error code 1
The following command caused the error:
cd /home/zhuyao/software/itkbuild/Examples/Registration &&
/usr/sfw/bin/c++      -ftemplate-depth-50 -D_PTHREADS  -fPIC
"CMakeFiles/DeformableRegistration4.dir/DeformableRegistration4.o"   -o
../../bin/DeformableRegistration4  -L.
-L/home/zhuyao/software/itkbuild/bin -Wl,-Bstatic -lITKNumerics -lITKIO
-lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg
-Wl,-Bdynamic -lsocket -lnsl -Wl,-Bstatic -litkpng -litktiff -litkjpeg8
-lITKSpatialObject -lITKNumerics -lITKCommon -litkvnl_inst -litkvnl_algo
-litkv3p_netlib -litkvnl -litkvcl -Wl,-Bdynamic -lm -lthread
-Wl,-Bstatic -lITKMetaIO -litksys -Wl,-Bdynamic -ldl -Wl,-Bstatic
-lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib
-Wl,-Bdynamic -lm -Wl,-R.:/home/zhuyao/software/itkbuild/bin 
make: Fatal error: Command failed for target
`bin/DeformableRegistration4'
Current working directory /home/zhuyao/software/itkbuild
*** Error code 1
The following command caused the error:
make -f
Examples/Registration/CMakeFiles/DeformableRegistration4.dir/build.make
Examples/Registration/CMakeFiles/DeformableRegistration4.dir/build
make: Fatal error: Command failed for target
`Examples/Registration/CMakeFiles/DeformableRegistration4.dir/all'
Current working directory /home/zhuyao/software/itkbuild
*** Error code 1
The following command caused the error:
make -f CMakeFiles/Makefile2 all
make: Fatal error: Command failed for target `all'

------------------------
The followings are my settings in CMakeCache.txt:

-----------------------

//Name of build on the dashboard
BUILDNAME:STRING=SunOS-c++
 
//Build source documentation using doxygen
BUILD_DOXYGEN:BOOL=OFF
 
//Build the Examples directory.
BUILD_EXAMPLES:BOOL=ON
 
//Build ITK with shared libraries.
BUILD_SHARED_LIBS:BOOL=OFF
 
//Build the testing tree.
BUILD_TESTING:BOOL=OFF
 
//Path to a program.
CMAKE_AR:FILEPATH=/usr/ccs/bin/ar
 
//For backwards compatibility, what version of CMake commands and
// syntax should this version of CMake allow.
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=
 
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
 
//CXX compiler.
CMAKE_CXX_COMPILER:FILEPATH=/usr/sfw/bin/c++

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=' '
 
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g 
 
//Flags used by the compiler during release minsize builds. 
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 
   
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller
// files). 
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
 
//Flags used by the compiler during Release with Debug Info builds.
// 
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g

//C compiler. 
CMAKE_C_COMPILER:FILEPATH=/usr/sfw/bin/gcc
 
//Flags for C compiler. 
CMAKE_C_FLAGS:STRING=' '
 
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
 
//Flags used by the compiler during release minsize builds. 
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
 
//Flags used by the compiler during release builds (/MD /Ob1 /Oi
// /Ot /Oy /Gs will produce slightly less optimized but smaller 
// files).
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG   



-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: Wednesday, June 06, 2007 4:54 PM
To: Zhu, Yaoyao (NIH/NLM/LHC) [C]
Cc: insight-users at itk.org
Subject: Re: [Insight-users] Help: compile errors on solaris


Hi Zhu,

What values do you have in the environment variables CC and CXX ?

Please let us know,


   Thanks


     Luis


=====================================
Zhu, Yaoyao (NIH/NLM/LHC) [C] wrote:
> Hi,
> 
>  
> 
> I am compiling ITK on Solaris (SunOS whistler 5.10 Generic_125100-08
sun4u sparc SUNW,Sun-Fire-280R ), configured with gcc/g++ (version
3.4.3), and I have the 
> 
> following errors:
> 
>  
> 
> [ 41%] Building CXX object 
>
Utilities/vxl/core/vnl/tests/CMakeFiles/vnl_basic_operation_timings.dir/
basic_operation_timings.o
> 
> Linking CXX executable ../../../../../bin/vnl_basic_operation_timings
> 
> Undefined                       first referenced
> 
>  symbol                             in file
> 
> vnl_unary_function<double, vnl_vector<double> >::get_range_min() 
> const/home/zhuyao/software/itkbuild/bin/libitkvnl.so
> 
> vnl_unary_function<double, vnl_vector<double> >::get_range_max() 
> const/home/zhuyao/software/itkbuild/bin/libitkvnl.so
> 
> ld: fatal: Symbol referencing errors. No output written to 
> ../../../../../bin/vnl_basic_operation_timings
> 
> collect2: ld returned 1 exit status
> 
> *** Error code 1
> 
> The following command caused the error:
> 
> cd /home/zhuyao/software/itkbuild/Utilities/vxl/core/vnl/tests && 
> /usr/sfw/bin/c++      -ftemplate-depth-50 -D_PTHREADS  -fPIC   
> "CMakeFiles/vnl_basic_operation_timings.dir/basic_operation_timings.o"

> -o ../../../../../bin/vnl_basic_operation_timings  -L. 
> -L/home/zhuyao/software/itkbuild/bin -litkvnl -litkvcl -lm 
> -Wl,-R.:/home/zhuyao/software/itkbuild/bin
> 
> make: Fatal error: Command failed for target 
> `bin/vnl_basic_operation_timings'
> 
> Current working directory /home/zhuyao/software/itkbuild
> 
> *** Error code 1
> 
> The following command caused the error:
> 
> make -f 
>
Utilities/vxl/core/vnl/tests/CMakeFiles/vnl_basic_operation_timings.dir/
build.make 
>
Utilities/vxl/core/vnl/tests/CMakeFiles/vnl_basic_operation_timings.dir/
build
> 
> make: Fatal error: Command failed for target 
>
`Utilities/vxl/core/vnl/tests/CMakeFiles/vnl_basic_operation_timings.dir
/all'
> 
> Current working directory /home/zhuyao/software/itkbuild
> 
> *** Error code 1
> 
> The following command caused the error:
> 
> make -f CMakeFiles/Makefile2 all
> 
> make: Fatal error: Command failed for target `all'
> 
>  
> 
>  
> 
> Can anybody help?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> Yaoyao
> 
>  
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list