[Insight-users] Installation build errors
Luis Ibanez
luis.ibanez@kitware.com
Wed, 13 Nov 2002 09:56:32 -0500
Hi Neil,
Could you please send us your CMakeCache.txt file.
It is generated by CMake and put in the binary directory.
---
This is just a guess but it may be worth to try:
Are you enabling the USE_PTHREADS variable in CMake ?
There is a native threads library on Suns,
maybe if you disable USE_PTHREADS the native library
will be used.
BTW in your current link line, both
-lpthread and -lthread are being used...
Please let us know what you find.
Thanks
Luis
=======================================
Neil Killeen wrote:
> Hello again
>
> I am getting some errors (compile and link) on trying to build the system.
> At this stage, all i want to do is build the basic system
> including test programs, for evaluation purposes.
>
> I am using
>
> . Solaris 2.6
>
> . InsightToolkit-1.0.0 (downloaded this week)
>
> . cmake-1.4.6-sparc-sunos57-static-files.tar
>
> . /opt/SUNWspro/bin/cc
> /usr/local/gnu/bin/gcc -> gcc-2.95.3-solaris2.6
>
>
> I generated the make files ok and began the build.
>
>
> 1) Compilation error
>
> On building the system it fails after a while with
>
>
> gcc -ftemplate-depth-50
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Algorithms
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/BasicFilters
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/IO
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/FEM
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/Statistics
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/Code/Numerics/vxl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/vxl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/Code/Numerics/vxl/vcl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/vxl/vcl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/SpatialObject
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/png
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/zlib
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/MetaIO
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin -D_PTHREADS -c
> /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common/itkMultiThreader.cxx
> -o itkMultiThreader.o
> /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common/itkMultiThreader.cxx:
> In function `static int
> itk::MultiThreader::GetGlobalDefaultNumberOfThreads()':
> /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common/itkMultiThreader.cxx:93:
> implicit declaration of function `int itk::pthread_setconcurrency(...)'
>
>
> Line 93 of the source is
>
> #if defined(__SVR4) && defined(sun)
> pthread_setconcurrency(num);
> #endif
>
>
> Now I tried adding the line
>
> #include <pthread.h>
>
> to itkMultiThreader.cxx, but to no avail. On searching for
> pthread.h I found
>
> /usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.1.1/include/pthread.h
>
> which is an auto-edited version of
>
> /usr/include/pthread.h
>
> neither of which contains function pthread_setconcurrency
>
> So I commented out the offending line and proceeded ok until linking.
> Can someobody advise whether this is an appropriate solution ?
>
>
>
> 2) Linking error
>
> having now built the library trees ok, the build then failed
> once we started linking. Viz.
>
> gcc -ftemplate-depth-50
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Testing/Code/Numerics
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Algorithms
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/BasicFilters
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Common
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/IO
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/FEM
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/Statistics
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/Code/Numerics/vxl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/vxl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/Code/Numerics/vxl/vcl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/Numerics/vxl/vcl
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Code/SpatialObject
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/png
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/zlib
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Utilities/MetaIO
> -I/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin -D_PTHREADS -c
> /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/Testing/Code/Numerics/itkNumericsHeaderTest.cxx
> -o itkNumericsHeaderTest.o
>
> gcc -ftemplate-depth-50 itkNumericsHeaderTest.o -L/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin -lpthread
> -lthread -ldl -lVXLNumerics -lm -lITKCommon -lITKNumerics -lITKCommon -lVXLNumerics -lm -lpthread -lthread -ldl
> -R/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin
> -o /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/itkNumericsHeaderTest
> Undefined first referenced
> symbol in file
> streambuf::eback(void) const /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf type_info function /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> string_char_traits<char>::assign(char &, char const &)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream::write(char const *, int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkObjectFactoryBase.o)
> string_char_traits<char>::compare(char const *, char const *, unsigned int)itkNumericsHeaderTest.o
> streambuf::sys_write(char const *, int)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::sys_close(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::streambuf(int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream::ostream(int, streambuf *, ostream *)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> complex<float>::complex(float, float)itkNumericsHeaderTest.o
> streambuf::doallocate(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf type_info node /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::gptr(void) const /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> __length_error(char const *) itkNumericsHeaderTest.o
> streambuf::epptr(void) const /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream::operator<<(ostream &(*)(ostream &))itkNumericsHeaderTest.o
> complex<double>::imag(void) const itkNumericsHeaderTest.o
> complex<float>::imag(void) const itkNumericsHeaderTest.o
> complex<long double>::imag(void) constitkNumericsHeaderTest.o
> streambuf::sputc(int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ios::ios(streambuf *, ostream *) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> endl(ostream &) itkNumericsHeaderTest.o
> ostream::ios virtual table /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> istream::operator>>(char &) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkOutputWindow.o)
> string_char_traits<char>::eq(char const &, char const &)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkObjectFactoryBase.o)
> string_char_traits<char>::eos(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> string_char_traits<char>::set(char *, char const &, unsigned int)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkObjectFactoryBase.o)
> cerr itkNumericsHeaderTest.o
> streambuf::uflow(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::xsgetn(char *, int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::sys_read(char *, int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream type_info function /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ios::~ios(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::sys_stat(void *) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream::operator<<(void const *) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkEventObject.o)
> streambuf::egptr(void) const /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream::operator<<(char const *) itkNumericsHeaderTest.o
> streambuf::xsputn(char const *, int)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::pbump(int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream::operator<<(bool) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkObjectFactoryBase.o)
> ostream::operator<<(double) itkNumericsHeaderTest.o
> ostream::operator<<(int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::setg(char *, char *, char *)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::sys_seek(long, ios::seek_dir)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> complex<double>::complex(double, double)itkNumericsHeaderTest.o
> ostream::operator<<(unsigned int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkExceptionObject.o)
> ostream::operator<<(unsigned long) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkObject.o)
> streambuf::gbump(int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> ostream type_info node /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> string_char_traits<char>::copy(char *, char const *, unsigned int)itkNumericsHeaderTest.o
> streambuf::~streambuf(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> streambuf::pptr(void) const /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> complex<long double>::complex(long double, long double)itkNumericsHeaderTest.o
> streambuf::pbase(void) const /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> cin /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkOutputWindow.o)
> streambuf::sync(void) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> string_char_traits<char>::length(char const *)/DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKCommon.a(itkObjectFactoryBase.o)
> streambuf::setp(char *, char *) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> string_char_traits<char>::move(char *, char const *, unsigned int)itkNumericsHeaderTest.o
> complex<double>::real(void) const itkNumericsHeaderTest.o
> complex<float>::real(void) const itkNumericsHeaderTest.o
> streambuf::pbackfail(int) /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/libITKNumerics.a(itkOptimizer.o)
> complex<long double>::real(void) constitkNumericsHeaderTest.o
> __out_of_range(char const *) itkNumericsHeaderTest.o
> ld: fatal: Symbol referencing errors. No output written to
> /DATA/ELARA_3/nkilleen/itk/InsightToolkit-1.0.0/bin/bin/itkNumericsHeaderTest
> collect2: ld returned 1 exit status
>
>
> so a stream related problem. I am not too uptodate on the latest in the
> streams standards, but know that they have evolved. Perhaps my
> installation is missing a new (or old) library ?
>
>
> many thanks
> Neil
>
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>
>