I have been having this issue repeatedly in the last step where we build it with the command "ninja aseprite".
The error is as follows :
C:\aseprite\third_party\json11\json11.cpp : warning C4710: '__cdecl json11::Statics::~Statics(void) __ptr64': function not inlined
[398/1526] Building C object third_party\cmark\src\CMakeFiles\cmark_static.dir\utf8.c.obj
cl : Command line warning D9025 : overriding '/W3' with '/W4'
ninja: build stopped: subcommand failed.
Any help on the given issue would be much appreciated!
Aseprite and System version :
Aseprite v1.2.34.1
Windows 10 (64bit)
CMake-3.23.1-windows-x86_64
Ninja v1.11.0
Skia-m102
Visual Studio 2022 (SDK and the other requirements already installed)
Related
im trying to set up my vs and vsc to run opencv with cuda but im getting this error when i try to include it in my program
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build "c:/Users/hamoz/Documents/OCV C++ VSC/build" --config Release --target opencvgputest -j 14 --
[build] MSBuild version 17.4.1+9a89d02ff for .NET Framework
[build] main.cpp
[build] C:\Users\hamoz\Documents\OCV C++ VSC\main.cpp(8,21): error C2871: 'Cuda': a namespace with this name does not exist [C:\Users\hamoz\Documents\OCV C++ VSC\build\opencvgputest.vcxproj]
[build] C:\Users\hamoz\Documents\OCV C++ VSC\main.cpp(9,20): error C2871: 'dnn': a namespace with this name does not exist [C:\Users\hamoz\Documents\OCV C++ VSC\build\opencvgputest.vcxproj]
[build] C:\Users\hamoz\Documents\OCV C++ VSC\main.cpp(13,5): error C3861: 'printCudaDeviceInfo': identifier not found [C:\Users\hamoz\Documents\OCV C++ VSC\build\opencvgputest.vcxproj]
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build "c:/Users/hamoz/Documents/OCV C++ VSC/build" --config Release --target opencvgputest -j 14 -- exited with code: 1
[build] Build finished with exit code 1
[main] Failed to prepare executable target with name "undefined"
both cuda and dnn are in the bin file for opencv and WITH_CUDA and WITH_CUDNN are on on cmake config
i tried checking the directories tried modifying my CMakeLists.txt file but no use
My current Android application contains some cpp code
It was gradle synching, cleaning, building, and running fine with no errors until i installed the latest version of cmake with homebrew
the version of cmake installed on my mac is 3.24.1
and my Android project has
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.24.1)
and gradle of
kotlinOptions {
jvmTarget = '11'
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.24.1'
}
}
i can synch gradle, build, refresh linked c++ projects without any issues
however when i clean project i get the following errors
> Task :shared:covert:externalNativeBuildCleanDevelopmentDebug FAILED
Clean native-lib-armeabi-v7a
C/C++: /bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
> Task :shared:covert:externalNativeBuildCleanDevelopmentRelease FAILED
Clean native-lib-x86
C/C++: /bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
> Task :shared:covert:externalNativeBuildCleanProductionDebug FAILED
Clean native-lib-armeabi-v7a
C/C++: /bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
> Task :shared:covert:externalNativeBuildCleanProductionRelease FAILED
Clean native-lib-x86
C/C++: /bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
> Task :shared:covert:externalNativeBuildCleanStagingDebug FAILED
Clean native-lib-armeabi-v7a
C/C++: /bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
> Task :shared:covert:externalNativeBuildCleanStagingRelease FAILED
Clean native-lib-x86
C/C++: /bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
C/C++: ninja: error: rebuilding 'build.ninja': subcommand failed
and this
FAILURE: Build completed with 6 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':shared:covert:externalNativeBuildCleanDevelopmentDebug'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/frank/github/mobile-android-showcase/shared/covert/.cxx/Debug/5u70473e/armeabi-v7a'
[0/1] Re-running CMake...
FAILED: build.ninja
/usr/local/Cellar/cmake/3.23.2/bin/cmake --regenerate-during-build -S/Users/frank/github/mobile-android-showcase/shared/covert/src/main/cpp -B/Users/frank/github/mobile-android-showcase/shared/covert/.cxx/Debug/5u70473e/armeabi-v7a
C++ build system [clean] failed while executing:
/Users/frank/Library/Android/sdk/cmake/3.22.1/bin/ninja \
-C \
/Users/frank/github/mobile-android-showcase/shared/covert/.cxx/Debug/5u70473e/armeabi-v7a \
clean
from /Users/frank/github/mobile-android-showcase/shared/covert
/bin/sh: /usr/local/Cellar/cmake/3.23.2/bin/cmake: No such file or directory
ninja: error: rebuilding 'build.ninja': subcommand failed
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
Android studio only allows me to install highest cmake version of 3.22.1
my gradle file resembles this
buildscript {
ext {
compose_version = '1.3.0-beta02'
}
dependencies {
classpath 'com.google.gms:google-services:4.3.13'
}
}
plugins {
id 'com.android.application' version '7.3.0-rc01' apply false
id 'com.android.library' version '7.3.0-rc01' apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
id 'com.google.dagger.hilt.android' version '2.43.2' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
how can i resolve these project clean errors?
the android studio version i am employing is
Android Studio Dolphin | 2021.3.1 RC 1
Build #AI-213.7172.25.2113.8913347, built on August 6, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 12
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
com.android.aas (3.5.1)
Its OK
I found a really simple (if surprising) fix
i searched replaced the entire file system in android studio
replacing 3.23.2 with 3.24.1
While trying to compile amazon-kinesis-video-streams-producer-sdk-cpp-repo I am getting an error
crypto\uplink-x86_64.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'.
I do not understand this. I checked solutions online but I do not have any VS project. I am running all these commands just to compile the OpenSSL library. I tried running on x86 Native Tools Command Prompt as specified in this question. Still same error.
I am using Windows 10 and Visual Studio 2017.
Here are the steps I followed:
1: Clone the repo. Installed cmake and pkg-config.
2: I built the directory and navigated to it:
mkdir -p amazon-kinesis-video-streams-producer-sdk-cpp/build
cd amazon-kinesis-video-streams-producer-sdk-cpp
3: Run the following command in Developer's command prompt for VS 2017:
cmake -G "MinGW Makefiles"
Here is the error I am getting:
crypto\uplink-x86_64.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
Could Not Find C:\Users\amay\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\libopenssl\build\src\project_libopenssl\libcrypto-1_1-x64.*
NMAKE : fatal error U1077: 'link' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x86\nmake.exe"' : return code '0x2'
Stop.
mingw32-make.exe[2]: *** [CMakeFiles\project_libopenssl.dir\build.make:130: build/src/project_libopenssl-stamp/project_libopenssl-build] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:94: CMakeFiles/project_libopenssl.dir/all] Error 2
mingw32-make.exe: *** [Makefile:102: all] Error 2
CMake Error at dependency/libkvscproducer/kvscproducer-src/CMake/Utilities.cmake:93 (message):
CMake step for libopenssl failed: 2
Call Stack (most recent call first):
dependency/libkvscproducer/kvscproducer-src/CMakeLists.txt:66 (build_dependency)
-- Configuring incomplete, errors occurred!
See also "C:/Users/amay/amazon-kinesis-video-streams-producer-sdk-cpp/CMakeFiles/CMakeOutput.log".
Would appreciate any help!
Tried running with x64 Native Tools Command Prompt and it worked.
C:\Users\UAL\Desktop\New folder\New folder\v8>ninja -C out.gn/x64.release
ninja: Entering directory `out.gn/x64.release'
[1/9] LINK cctest.exe cctest.exe.pdb
FAILED: cctest.exe cctest.exe.pdb
ninja -t msvc -e environment.x64 -- ../../third_party/llvm-build/Release+Asserts/bin/lld-link.exe /nologo /OUT:./cctest.exe /PDB:./cctest.exe.pdb #./cctest.exe.rsp
lld-link: error: <root>: undefined symbol: mainCRTStartup
ninja: build stopped: subcommand failed.
I have also set the environment variables as:
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_MSVS_VERSION =2015
I am just trying to build the hello world application with the steps provided here
I currently have cmake, clang and ninja installed on windows. I am trying to use CMake to generate a ninja build file to compile a very simple hello world program.
My CMakeLists.txt looks like this:
cmake_minimum_required(VERSION 2.8)
project(test_project)
add_executable(main main.cpp)
main.cpp is a simple hello world program.
On the command line I run this: cmake -G Ninja .. and I get the following errors:
-- The C compiler identification is Clang 3.5.0
clang.exe: error: no such file or directory: '/nologo'
clang.exe: error: no such file or directory: '/showIncludes'
-- The CXX compiler identification is Clang 3.5.0
clang.exe: error: no such file or directory: '/nologo'
clang.exe: error: no such file or directory: '/showIncludes'
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/llvm_build/RelWithDebInfo/bin/clang.exe" is
not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/test_proj/build/CMakeFiles/CMakeTmp
Run Build Command:C:/ninja/ninja.exe cmTryCompileExec375034429
[1/2] Building C object
CMakeFiles\cmTryCompileExec375034429.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTryCompileExec375034429.exe
FAILED: cmd.exe /c cd . &&
C:\llvm_build\RelWithDebInfo\bin\clang.exe
CMakeFiles\cmTryCompileExec375034429.dir\testCCompiler.c.obj -o
cmTryCompileExec375034429.exe && cd .
clang.exe: error: unable to execute command: program not executable
clang.exe: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "C:/test_proj/build/CMakeFiles/CMakeOutput.log".
See also "C:/test_proj/build/CMakeFiles/CMakeError.log".
The CMakeError.log file looks like this:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/llvm_build/RelWithDebInfo/bin/clang.exe
Build flags:
Id flags:
The output was:
1
clang.exe: error: unable to execute command: program not executable
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: C:/llvm_build/RelWithDebInfo/bin/clang++.exe
Build flags:
Id flags:
The output was:
1
clang++.exe: error: unable to execute command: program not executable
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
Determining if the C compiler works failed with the following output:
Change Dir: C:/test_proj/build/CMakeFiles/CMakeTmp
Run Build Command:C:/ninja/ninja.exe cmTryCompileExec2120850158
[1/2] Building C object CMakeFiles\cmTryCompileExec2120850158.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTryCompileExec2120850158.exe
FAILED: cmd.exe /c cd . && C:\llvm_build\RelWithDebInfo\bin\clang.exe CMakeFiles\cmTryCompileExec2120850158.dir\testCCompiler.c.obj -o cmTryCompileExec2120850158.exe && cd .
clang.exe: error: unable to execute command: program not executable
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
It appears that cmake is trying to test clang with windows options /nologo and /showIncludes. I cannot figure out how to tell cmake to pass the proper arguments.
FWIW I'm running 64bit Windows 7
EDIT:
So I looked through the built in cmake files and I found that the CMakeClDeps.cmake file was the culprit for adding the /nologo /showIncludes options. It appears that if I set Clang as the compiler then cmake thinks that visual studio is the compiler (it sets MSVC_C_ARCHITECTURE_ID to x86).
I removed the line in CMakeDetermineCompilerId.cmake that sets MSVC_C_ARCHITECTURE_ID and after trying again I get the following errors:
-- The C compiler identification is Clang 3.5.0
-- The CXX compiler identification is Clang 3.5.0
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/llvm_build/RelWithDebInfo/bin/clang.exe" is
not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/test_proj/build/CMakeFiles/CMakeTmp
Run Build Command:C:/ninja/ninja.exe cmTryCompileExec2815594422
[1/2] Building C object
CMakeFiles\cmTryCompileExec2815594422.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTryCompileExec2815594422.exe
FAILED: cmd.exe /c cd . &&
C:\llvm_build\RelWithDebInfo\bin\clang.exe
CMakeFiles\cmTryCompileExec2815594422.dir\testCCompiler.c.obj -o
cmTryCompileExec2815594422.exe && cd .
clang.exe: error: unable to execute command: program not executable
clang.exe: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "C:/test_proj/build/CMakeFiles/CMakeOutput.log".
See also "C:/test_proj/build/CMakeFiles/CMakeError.log".
Don't know if it can be helpful but I had the same error. Now I can compile with clang(3.7.1)/ninja(1.6)/cmake(3.4.1) on Windows performing the following actions in a build directory:
load the relevant vcvarsXX.bat file (e.g. "<Your Visual Studio location>\VC\vcvarsall.bat" x86)
set both CC and CXX to clang-cl (instead of clang and clang++)
run cmake -G Ninja <project>
run cmake --build .
Turns out the second set of errors I received were because clang could not find the linker. I had built clang using visual studio but at the time it couldn't find the visual studio linker. All I had to do was run it in the visual studio development console.
CMake still thinks that clang is a visual studio compiler so in the CMakeDetermineCompilerId.cmake file there is a line that looks like this:
set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
and I changed it to look like this
if (COMPILER_ID MATCHES "MSVC")
set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
endif()
Hopefully this doesn't break any other CMake functionality.