Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technical issue: build fail paho-mqtt-sys when compile Window App on LinuxOS #233

Open
khang3052002 opened this issue Jul 9, 2024 · 0 comments

Comments

@khang3052002
Copy link

Hello everyone, I'm having issues building with paho-mqtt-sys and cmake on cargo-xwin/cmake/x86_64-pc-windows-msvc. Has anyone encountered this before, and if so, how did you resolve it? I greatly appreciate any assistance you can provide. Thank you very much.

Here is the error log:

warning: [email protected]: Compiler family detection failed due to error: ToolExecError: Command "clang-cl" "-E" "/opt/atlassian/pipelines/agent/build/src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out/15841264545540224795detect_compiler_family.c" with args clang-cl did not execute successfully (status code exit status: 1). error: failed to run custom build command for paho-mqtt-sys v0.9.0Caused by: process didn't exit successfully:/opt/atlassian/pipelines/agent/build/src-tauri/target/release/build/paho-mqtt-sys-d455b17364e4b4b0/build-script-build (exit status: 101) --- stdout debug:Running the bundled build for Paho C debug:Building for Windows debug:Building with MSVC cargo:rerun-if-changed=build.rs CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = Some("/root/.cache/cargo-xwin/cmake/x86_64-pc-windows-msvc-toolchain.cmake") CMAKE_GENERATOR_x86_64-pc-windows-msvc = None CMAKE_GENERATOR_x86_64_pc_windows_msvc = None TARGET_CMAKE_GENERATOR = None CMAKE_GENERATOR = Some("Ninja") cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "clang-cl" "-E" "/opt/atlassian/pipelines/agent/build/src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out/13824543651244770846detect_compiler_family.c" with args clang-cl did not execute successfully (status code exit status: 1). cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "clang-cl" "-E" "/opt/atlassian/pipelines/agent/build/src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out/7921558823703125471detect_compiler_family.c" with args clang-cl did not execute successfully (status code exit status: 1). cargo:warning=Compiler family detection failed due to error: ToolExecError: Command "clang-cl" "-E" "/opt/atlassian/pipelines/agent/build/src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out/15841264545540224795detect_compiler_family.c" with args clang-cl did not execute successfully (status code exit status: 1). CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None TARGET_CMAKE_PREFIX_PATH = None CMAKE_PREFIX_PATH = None CMAKE_x86_64-pc-windows-msvc = None CMAKE_x86_64_pc_windows_msvc = None TARGET_CMAKE = None CMAKE = None running: cd "src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/paho-mqtt-sys-0.9.0/paho.mqtt.c/" "-G" "Ninja" "-DPAHO_BUILD_SHARED=off" "-DPAHO_BUILD_STATIC=on" "-DPAHO_ENABLE_TESTING=off" "-DPAHO_HIGH_PERFORMANCE=on" "-DPAHO_WITH_SSL=on" "-DOPENSSL_ROOT_DIR=/root/openssl-3/x64" "-DCMAKE_TOOLCHAIN_FILE=/root/.cache/cargo-xwin/cmake/x86_64-pc-windows-msvc-toolchain.cmake" "-DCMAKE_INSTALL_PREFIX=/opt/atlassian/pipelines/agent/build/src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out" "-DCMAKE_C_FLAGS= /DWIN32 -nologo -MD -Brepro -m64 --target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/root/.cache/cargo-xwin/xwin/crt/include /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/ucrt /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/um /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/shared" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro -m64 --target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/root/.cache/cargo-xwin/xwin/crt/include /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/ucrt /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/um /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/shared" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro -m64 --target=x86_64-pc-windows-msvc -Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/root/.cache/cargo-xwin/xwin/crt/include /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/ucrt /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/um /imsvc/root/.cache/cargo-xwin/xwin/sdk/include/shared" "-DCMAKE_BUILD_TYPE=Release" -- Configuring incomplete, errors occurred! See also "/opt/atlassian/pipelines/agent/build/src-tauri/target/x86_64-pc-windows-msvc/release/build/paho-mqtt-sys-b4be7cfd4bf108ca/out/build/CMakeFiles/CMakeOutput.log". --- stderr fatal: not a git repository (or any of the parent directories): .git CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant