Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have cygwin installed on my computer. For the project I am working on, I need to use the CMake 2.8.10.2 version. I am able to download the files for this version from 'http://www.npackd.org/p/org.cmake.CMake/2.8.10.2'. However, I need help to install this version now onto the existing cygwin on my computer.
Note: At present CMake 3.3.2 is installed on the computer (by inputting cmake --version) into cygwin. This version was installed while installing cygwin on the computer.
Please do provide step-by-step instructions as I am a newbie in Cygwin/CMake.
This is the toolchain file used for cross compiling:
Code:
# for cross compiling
SET(CMAKE_SYSTEM_NAME Generic)
# $RANDOM
SET(CMAKE_SYSTEM_VERSION 1)
# ARM compiler
SET(CMAKE_C_COMPILER C:/ARM/bin64/armcc.exe)
# ARM cpp compiler
SET(CMAKE_CXX_COMPILER C:/ARM/bin64/armcc.exe)
SET(CMAKE_AR C:/ARM/bin64/armar.exe)
#SET(CMAKE_C_LINK_EXECUTABLE C:/ARM/bin64/armlink.exe)
# location of the target environment
SET(CMAKE_FIND_ROOT_PATH $ENV{ARMROOT})
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# target specification
SET(ARCH "-DARM -DSA2_TARGET --cpu=Cortex-A9")
SET(CMAKE_C_FLAGS_INIT "${ARCH}")
SET(CMAKE_CXX_FLAGS_INIT "${CMAKE_C_FLAGS_INIT} --cpp")
Inspite of the presence of the armcc.exe file in the directory being provided to PATH (and being provided to CMAKE_C_COMPILER), cmake always returns the error that "The C compiler identification is unknown" and that it is unable to compile a simple test program.
However, on trying to compile a sample Hello World c file, it compiles without a glitch.
would be nice to show exactly the commands you executed and the error message(s) you got. I'm not really sure it is really related to the version of cmake.
Using an older version of cmake will force you to downgrade a lot of other packages I think, so anyway that will not be easy.
@kristianonline: I am starting cygwin as an administrator. Would CMake then also be called in Admin mode? Do I need to check if some particular folder is write protected?
I am supposed to "make" as the next step. But I get errors before that.
The error messages/output:
Quote:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /cygdrive/c/ARM/bin64/armcc.exe
-- Check for working C compiler: /cygdrive/c/ARM/bin64/armcc.exe -- broken
CMake Error at /usr/share/cmake-3.3.2/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/cygdrive/c/ARM/bin64/armcc.exe" is not able to compile a
simple test program.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (PROJECT)
-- Configuring incomplete, errors occurred!
See also "/cygdrive/c/_sa2/Proj/swbk/Config/Buildsystem/target/CMakeFiles/CMakeOutput.log".
See also "/cygdrive/c/_sa2/Proj/swbk/Config/Buildsystem/target/CMakeFiles/CMakeError.log".
I do not really understand it. CMake will create makefiles for you and make will produce object files and binaries (and the final result).
Ok. My mistake. You are right.
Quote:
Originally Posted by pan64
Does it work now?
No. I have not changed anything as yet. I did not understand what is wrong. Could you please have a look at the toolchain file (in above comments) and point me to what is wrong?
The above lines are incorrect. The Cygwin environment doesn't understand drive designators like "C:". You have to translate them to the Cygwin path equivalent. For example, "C:/ARM/bin64/amcc.exe" becomes "/cygdrive/c/ARM/bin64/armcc.exe".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.