[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cmake fails (mxe latest version 22/01/2020)
From: |
ah |
Subject: |
cmake fails (mxe latest version 22/01/2020) |
Date: |
Wed, 22 Jan 2020 13:14:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
Hello there and thank you for MXE.
I have successfully used mxe on my linux30-fedora system to build qt5
project for windows. That works ridiculously consistently and fluid, not
a single problem whatsoever! (nobody has ever imagined building windows
executables would be so painless like back in watcom's days!).
However, yesterday I tried to build libzip-1.5.2 which uses CMAKE and it
failed. The error was CCACHE related.
I have since re-installed completely mxe to latest version (as of
22/01/2020) and REMOVED ccache from my system (dnf remove ccache)
COMPLETELY.
But the problems still persists. This is what I got in the first run.
And a bit further down what I got after I did:
chmod -R 770 /usr/local/mxe/.ccache
My question to you dear developers of MXE is obviously how to fix this
problem if possible. Alternatively HOW TO REMOVE AND DISABLE that
dreaded (sorry) ccache completely from my systems. It seems that it took
over like a virus and is now mediating between me and my binaries albeit
lamely. Eventually breaking the workflow.
In my previous configuration I searched and followed advice about
setting this to /usr/local/mxe/settings.mk
MXE_USE_CCACHE=
I also exported on my shell the following but it did not help (or it was
too late because ccache already made the damage).
export CCACHE_DISABLE=1
Please help if you know the answer. (I have no problem with ccache, the
concept is sound but I don't like it when it breaks my beloved mxe)
Many Thanks,
Andreas
I am using the following script to compile my CPP code for windows:
#!/bin/bash
MXE="/usr/local/mxe"
PATH="${MXE}/usr/bin/:${PATH}"
rm -rf libzip-1.5.2/build
mkdir -p libzip-1.5.2/build
cd libzip-1.5.2/build
MXE_TARGETS=i686-w64-mingw32.static
MXE_USE_CCACHE=
CMD="${MXE}/usr/bin/i686-w64-mingw32.static-cmake \
-DCMAKE_C_COMPILER=/usr/local/mxe/usr/bin/i686-w64-mingw32.static-gcc \
-DCMAKE_CXX_COMPILER=/usr/local/mxe/usr/bin/i686-w64-mingw32.static-g++ \
-DCMAKE_INSTALL_PREFIX=$PWD/../install/win64 \
-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON .. \
"
eval ${CMD}
if [ $? -ne 0 ]; then echo "$0 : command ${CMD} failed"; exit 1; fi
##### end of compilation script using cmake
Please find below relevant command output as: 1) what I got the first
run of the above script, 2) what I got the second run, after I changed
permissions of said .ccache directory, 3) cmake's stdout and stderr log
files for the second run.
###############
Running "virgin" mxe after fresh installation to latest version:
== Using MXE wrapper: /usr/local/mxe/usr/bin/i686-w64-mingw32.static-cmake
- cmake version 3.15.4
- warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored
== Using MXE toolchain:
/usr/local/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
== Using MXE runresult:
/usr/local/mxe/usr/share/cmake/modules/TryRunResults.cmake
== Adding "-DCMAKE_BUILD_TYPE=Release"
loading initial cache file
/usr/local/mxe/usr/share/cmake/modules/TryRunResults.cmake
-- The C compiler identification is GNU 5.5.0
-- Check for working C compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
-- Check for working C compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
-- broken
CMake Error at
/usr/local/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60
(message):
The C compiler
"/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir:
/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_bb0ea/fast &&
/usr/bin/gmake -f CMakeFiles/cmTC_bb0ea.dir/build.make
CMakeFiles/cmTC_bb0ea.dir/build
gmake[1]: Entering directory
'/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_bb0ea.dir/testCCompiler.c.obj
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
-o CMakeFiles/cmTC_bb0ea.dir/testCCompiler.c.obj -c
/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeTmp/testCCompiler.c
ccache: error: Failed to create temporary file for
/usr/local/mxe/.ccache/tmp/testCCompi.stdout: Permission denied
gmake[1]: *** [CMakeFiles/cmTC_bb0ea.dir/build.make:66:
CMakeFiles/cmTC_bb0ea.dir/testCCompiler.c.obj] Error 1
gmake[1]: Leaving directory
'/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_bb0ea/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:8 (PROJECT)
-- Configuring incomplete, errors occurred!
See also
"/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeOutput.log".
See also
"/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeError.log".
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /usr/local/mxe/usr/bin/i686-w64-mingw32.static-gcc
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_POLICY_DEFAULT_CMP0017
CMAKE_POLICY_DEFAULT_CMP0020
CMake Generate step failed. Build files cannot be regenerated correctly.
bin/build-for-windows.bash : command
/usr/local/mxe/usr/bin/i686-w64-mingw32.static-cmake
-DCMAKE_C_COMPILER=/usr/local/mxe/usr/bin/i686-w64-mingw32.static-gcc
-DCMAKE_CXX_COMPILER=/usr/local/mxe/usr/bin/i686-w64-mingw32.static-g++
-DCMAKE_INSTALL_PREFIX=/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/../install/win64
-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON .. failed
######################
This is the second run of cmake, after I changed permissions to
/usr/local/mxe/.ccache to 770 (now is writable by me).
== Using MXE wrapper: /usr/local/mxe/usr/bin/i686-w64-mingw32.static-cmake
- cmake version 3.15.4
- warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored
== Using MXE toolchain:
/usr/local/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
== Using MXE runresult:
/usr/local/mxe/usr/share/cmake/modules/TryRunResults.cmake
== Adding "-DCMAKE_BUILD_TYPE=Release"
loading initial cache file
/usr/local/mxe/usr/share/cmake/modules/TryRunResults.cmake
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:8 (PROJECT):
The CMAKE_C_COMPILER:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
is not a full path to an existing compiler tool.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full
path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also
"/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeOutput.log".
See also
"/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeError.log".
bin/build-for-windows.bash : command
/usr/local/mxe/usr/bin/i686-w64-mingw32.static-cmake
-DCMAKE_C_COMPILER=/usr/local/mxe/usr/bin/i686-w64-mingw32.static-gcc
-DCMAKE_CXX_COMPILER=/usr/local/mxe/usr/bin/i686-w64-mingw32.static-g++
-DCMAKE_INSTALL_PREFIX=/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/../install/win64
-DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON .. failed
################################
This is cmake's log files after the second run:
$ cat
/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeOutput.log
The target system is: Windows - - i686
The host system is: Linux - 5.4.10-100.fc30.x86_64 - x86_64
#################################
$ cat
/PROJECTS/QT5/3rdparty/LIBZIP/libzip-1.5.2/build/CMakeFiles/CMakeError.log
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags:
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: -c
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: -Aa
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: -D__CLASSIC_C__
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags:
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: -c
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: -Aa
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: -D__CLASSIC_C__
The output was:
Permission denied
Compiling the C compiler identification source file "CMakeCCompilerId.c"
failed.
Compiler:
/usr/local/mxe/usr/x86_64-pc-linux-gnu/bin/i686-w64-mingw32.static-gcc
Build flags:
Id flags: --target=arm-arm-none-eabi;-mcpu=cortex-m3
The output was:
Permission denied
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler":
Checking whether the C compiler is IAR using "" did not match "IAR .+
Compiler":
- cmake fails (mxe latest version 22/01/2020),
ah <=