Notes |
|
(0034110)
|
Peter Kuemmel
|
2013-10-12 11:02
|
|
Setting CMAKE_C_COMPILER by hand is very hairy. Try to set it before you call "project()" for the first time. |
|
|
(0034114)
|
Damian Kaczmarek
|
2013-10-13 11:11
|
|
I am setting it with a toolchain configuration in CMAKE_TOOLCHAIN_FILE. It has always been valid. |
|
|
(0035681)
|
Peter Kuemmel
|
2014-04-13 04:57
|
|
I assume it works when you use an absolute path for CCACHE_GCC_BINARY. |
|
|
(0037037)
|
Henry Miller
|
2014-10-16 14:56
|
|
I have confirmed this with 2.8.12-2.
Even when I set an absolute path in my toolchain file, ninja is still using a relative path to the compiler, which breaks the build since the path is relative to the top of the build directory, not the subdirectory the build itself is run in. |
|
|
(0037038)
|
Henry Miller
|
2014-10-16 16:53
|
|
Problem still exists with cmake 3.0.2. |
|
|
(0037039)
|
Peter Kuemmel
|
2014-10-17 05:10
|
|
Could you please have a look at the Makefile and check if absolute paths are used? |
|
|
(0037041)
|
Henry Miller
|
2014-10-17 09:52
|
|
The Makefile uses relative paths, even when a absolute path is given in the toolchain file. |
|
|
(0037042)
|
Henry Miller
|
2014-10-17 10:37
|
|
Manually editing the generated rules.ninja file I was able to get a build, in all cases I change the relative to path to start with one .. instead of more than one.
rule CXX_COMPILER
- remove one .. from the path
rule CXX_SHARED_LIBRARY_LINKER
- remove one .. from the path
rule CXX_EXECUTABLE_LINKER
- remove two .. (../..) from the path
rule CXX_MODULE_LIBRARY_LINKER
- remove four .. (../../../..) from the path
I was able to complete my build without editing, but I suspect this is only because my build doesn't happen to use them - they all look wrong.
rule CXX_SHARED_LIBRARY_LINKER_RSP_FILE
rule CXX_EXECUTABLE_LINKER_RSP_FILE
rule CXX_STATIC_LIBRARY_LINKER
rule CXX_STATIC_LIBRARY_LINKER_RSP_FILE
rule CXX_MODULE_LIBRARY_LINKER_RSP_FILE
note, for the above my build tree looks like
<source_root>/cross_build/<architecture>/toolchain_root
<source_root>/cross_build/<architecture>/sysroot
<source_root>/cross_build/<architecture>/buildDirectory
which is to say from my build directory the path to the compiler is ../toolchain_root/path/to/compiler |
|
|
(0037045)
|
Peter Kuemmel
|
2014-10-18 08:05
|
|
I only see absolute paths in my rules.ninja.
Your compiler is within the source directory. Maybe this is the problem, or that the compiler is "created" at configure/build time.
Does it work with such a tree:
<source_root>
<cross_build>? |
|
|
(0037056)
|
Henry Miller
|
2014-10-20 09:41
|
|
If I move my compiler outside of my source tree everything works.
Unfortunately my CI system is setup to clone to the root of the only writable directory and then run build scripts from that clone. (the same CI setup is used for many unrelated projects) Since the only place I can write is the build directory I have to install my compiler there. |
|
|
(0042365)
|
Kitware Robot
|
2016-06-10 14:29
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|