[Insight-users] Re: install itk under cygwin

Quan Chen quanchen at gmail.com
Wed Jun 14 18:38:42 EDT 2006


I found the problem.  When I install cygwin, I only have bash.exe installed,
I don't have sh.exe.  It seems that some scripts the cmake is running
requires sh to exist.  So I just copied bash.exe to sh.exe and it worked. I
am wondering if either itk or cmake can add a check of whether sh exists or
not to prevent such issue happening.
Now, I can get it to work with gcc and g++ (export CC=/bin/gcc.exe; export
CXX=/bin/c++.exe) under cygwin.  However, now I try to use the intel
compiler under cygwin (I used intel compiler under windows with visual
studio .net and it worked).  My intel compiler is installed under program
file and I created a link in the /bin/ directory.  I did export
CC=/bin/icl.exe and export CXX=/bin/icl.exe, however when I configure
ccmake, I got the error that icl unable to compile a simple program.  The
error message is included in the following, anybody have a clue?

 The C compiler "/bin/icl.exe" is not able to compile a simple test program.
 It fails with the following output:
  /bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
 CMakeFiles/cmTryCompileExec.dir/build
 make[1]: Entering directory
 `/cygdrive/c/newitk/itksource/InsightToolkit-2.2.0/bin/CMakeFiles/CMakeTmp'
 Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
 /bin/icl.exe   -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o   -c
 /cygdrive/c/newitk/itksource/InsightToolkit-2.2.0
/bin/CMakeFiles/CMakeTmp/test
 CCompiler.c
 Intel(R) C++ Compiler for 32-bit applications, Version 8.1    Build
20051008Z

 Copyright (C) 1985-2005 Intel Corporation.  All rights reserved.
 make[1]: Leaving directory
 `/cygdrive/c/newitk/itksource/InsightToolkit-2.2.0/bin/CMakeFiles/CMakeTmp'
 icl: Command line warning: ignoring option '-c'; no argument required

 icl: Command line error: no files specified; for help type "icl -help"
 make[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1
 make: *** [cmTryCompileExec/fast] Error 2


 CMake will not be able to correctly generate this project.



On 6/13/06, Quan Chen <quanchen at gmail.com> wrote:
>
>  I was using cmakesetup.exe under windows to setup the itk and it work
> perfectly.  Recently I try to install it under cygwin.  However, I failed at
> the first step!  I followed the instructions, create a bin directory, set
> environment variable CC and CXX (is that required step?) using export, and
> run ccmake with argument of source directory.  However, after a few
> configuration tries, I got the message saying my system is unknown to cmake
> (running uname give me CYGWIN_NT- 5.1).  Then the testCCompiler.c failed
> to compile because the system cannot find the path specified.  This file is
> in the source directory tree but not in the binary directory tree.  I am
> wondering if there is a missing step to copy it from source directory to the
> binary directory?  Should I turn on the CMAKE_USE_RELATIVE_PATH?  What is
> the CMAKE_INSTALL_PREFIX?  is that where the cmake should be located?  The
> cmake I installed comes with cygwin, it is located under /bin, version
> 2.4-patch 2.
>
>
>
> The error message is list below:
>
>
> System is unknown to cmake, create:
> /usr/share/cmake-2.4.2/Modules/Platform/UnknownOS.cmake to use this
> system,
> please send your config file to cmake at www.cmake.org so it can be added to
> cmake
>
> You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please send
> that
> file to cmake at www.cmake.org.
>
> System is unknown to cmake, create:
> /usr/share/cmake-2.4.2/Modules/Platform/UnknownOS.cmake to use this
> system,
> please send your config file to cmake at www.cmake.org so it can be added to
> cmake
>
> The C compiler "/usr/bin/gcc" is not able to compile a simple test
> program.
> It fails with the following output:
>  nmake -f CMakeFiles/cmTryCompileExec.dir/build.make
> CMakeFiles/cmTryCompileExec.dir/build
>
> Microsoft (R) Program Maintenance Utility Version 7.10.3077
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
> Microsoft (R) Program Maintenance Utility Version 7.10.3077
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
> "Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o"
> /usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o   -c
> /cygdrive/c/newitk/itksource/InsightToolkit-2.2.0/bin/CMakeFiles/CMakeTmp/test
>
> CCompiler.c
> The system cannot find the path specified.
> NMAKE : fatal error U1077: '' : return code '0x1'
> Stop.
> NMAKE : fatal error U1077: '"c:\program files\microsoft visual studio .NET
> 2003\vc7\bin\nmake.exe"' : return code '0x2'
> Stop.
>
>
> CMake will not be able to correctly generate this project.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060614/f1140d44/attachment.htm


More information about the Insight-users mailing list