CMake error on FLTK
NoelJacob opened this issue · 2 comments
NoelJacob commented
When I compile an simple fltk demo app, I get the following error:
cargo zigbuild --release --target x86_64-pc-windows-msvc
Compiling cc v1.0.90
Compiling crossbeam-utils v0.8.19
Compiling paste v1.0.14
Compiling bitflags v2.4.2
Compiling ttf-parser v0.20.0
Compiling raw-window-handle v0.6.0
Compiling cmake v0.1.50
Compiling crossbeam-channel v0.5.12
Compiling fltk-sys v1.4.26
error: failed to run custom build command for `fltk-sys v1.4.26`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `/home/noel/Dev/spacehub-fltk/target/release/build/fltk-sys-a19216c7c84ad3bc/build-script-main` (exit status: 101)
--- stdout
cargo:rerun-if-changed=build/android.rs
cargo:rerun-if-changed=build/bundled.rs
cargo:rerun-if-changed=build/link.rs
cargo:rerun-if-changed=build/main.rs
cargo:rerun-if-changed=build/source.rs
cargo:rerun-if-changed=build/utils.rs
cargo:rerun-if-changed=build/fltk_config.rs
cargo:rerun-if-changed=build/pkg_config.rs
cargo:rerun-if-env-changed=CC
cargo:rerun-if-env-changed=CXX
cargo:rerun-if-env-changed=CFLTK_TOOLCHAIN
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=CFLTK_WAYLAND_ONLY
cargo:rerun-if-env-changed=CFLTK_GENERATE_BUNDLE_DIR
cargo:rerun-if-changed=cfltk/CMakeLists.txt
cargo:rerun-if-changed=cfltk/include/cfl.h
cargo:rerun-if-changed=cfltk/include/cfl_widget.h
cargo:rerun-if-changed=cfltk/include/cfl_group.h
cargo:rerun-if-changed=cfltk/include/cfl_input.h
cargo:rerun-if-changed=cfltk/include/cfl_window.h
cargo:rerun-if-changed=cfltk/include/cfl_button.h
cargo:rerun-if-changed=cfltk/include/cfl_box.h
cargo:rerun-if-changed=cfltk/include/cfl_menu.h
cargo:rerun-if-changed=cfltk/include/cfl_dialog.h
cargo:rerun-if-changed=cfltk/include/cfl_valuator.h
cargo:rerun-if-changed=cfltk/include/cfl_browser.h
cargo:rerun-if-changed=cfltk/include/cfl_misc.h
cargo:rerun-if-changed=cfltk/include/cfl_text.h
cargo:rerun-if-changed=cfltk/include/cfl_image.h
cargo:rerun-if-changed=cfltk/include/cfl_draw.h
cargo:rerun-if-changed=cfltk/include/cfl_table.h
cargo:rerun-if-changed=cfltk/include/cfl_surface.h
cargo:rerun-if-changed=cfltk/include/cfl_printer.h
cargo:rerun-if-changed=cfltk/include/cfl_utils.h
cargo:rerun-if-changed=cfltk/include/cfl_macros.h
cargo:rerun-if-changed=cfltk/include/cfl_lock.h
cargo:rerun-if-changed=cfltk/include/cfl_prefs.h
cargo:rerun-if-changed=cfltk/include/cfl_widget.hpp
cargo:rerun-if-changed=cfltk/src/cfl_lock.cpp
cargo:rerun-if-changed=cfltk/src/cfl_new.cpp
cargo:rerun-if-changed=cfltk/src/cfl.cpp
cargo:rerun-if-changed=cfltk/src/cfl_widget.cpp
cargo:rerun-if-changed=cfltk/src/cfl_group.cpp
cargo:rerun-if-changed=cfltk/src/cfl_window.cpp
cargo:rerun-if-changed=cfltk/src/cfl_button.cpp
cargo:rerun-if-changed=cfltk/src/cfl_box.cpp
cargo:rerun-if-changed=cfltk/src/cfl_menu.cpp
cargo:rerun-if-changed=cfltk/src/cfl_dialog.cpp
cargo:rerun-if-changed=cfltk/src/cfl_valuator.cpp
cargo:rerun-if-changed=cfltk/src/cfl_browser.cpp
cargo:rerun-if-changed=cfltk/src/cfl_misc.cpp
cargo:rerun-if-changed=cfltk/src/cfl_text.cpp
cargo:rerun-if-changed=cfltk/src/cfl_image.cpp
cargo:rerun-if-changed=cfltk/src/cfl_input.cpp
cargo:rerun-if-changed=cfltk/src/cfl_draw.cpp
cargo:rerun-if-changed=cfltk/src/cfl_table.cpp
cargo:rerun-if-changed=cfltk/src/cfl_tree.cpp
cargo:rerun-if-changed=cfltk/src/cfl_surface.cpp
cargo:rerun-if-changed=cfltk/src/cfl_printer.cpp
cargo:rerun-if-changed=cfltk/src/cfl_font.cpp
cargo:rerun-if-changed=cfltk/src/cfl_utils.cpp
cargo:rerun-if-changed=cfltk/src/cfl_prefs.cpp
cargo:rerun-if-changed=cfltk/src/Fl_Simple_Terminal.cxx
cargo:rerun-if-changed=cfltk/src/cfl_nswindow.m
cargo:rerun-if-changed=cfltk/fltk.patch
CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = Some("/home/noel/.cache/cargo-zigbuild/0.18.3/cmake/x86_64-pc-windows-msvc-toolchain.cmake")
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 "/home/noel/Dev/spacehub-fltk/target/x86_64-pc-windows-msvc/release/build/fltk-sys-b414ecf8360fce65/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/noel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fltk-sys-1.4.26/cfltk" "-G" "Ninja" "-DFLTK_USE_SYSTEM_LIBPNG=OFF" "-DFLTK_USE_SYSTEM_LIBJPEG=OFF" "-DFLTK_USE_SYSTEM_ZLIB=OFF" "-DCFLTK_LINK_IMAGES=ON" "-DOpenGL_GL_PREFERENCE=GLVND" "-DFLTK_BUILD_GL=OFF" "-DCFLTK_USE_OPENGL=OFF" "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" "-DCFLTK_CARGO_BUILD=ON" "-DFLTK_BUILD_EXAMPLES=OFF" "-DFLTK_BUILD_TEST=OFF" "-DFLTK_BUILD_FLUID=OFF" "-DFLTK_BUILD_FLTK_OPTIONS=OFF" "-DFLTK_OPTION_LARGE_FILE=ON" "-DFLTK_BUILD_HTML_DOCS=OFF" "-DFLTK_BUILD_PDF_DOCS=OFF" "-DCMAKE_TOOLCHAIN_FILE=/home/noel/.cache/cargo-zigbuild/0.18.3/cmake/x86_64-pc-windows-msvc-toolchain.cmake" "-DCMAKE_INSTALL_PREFIX=/home/noel/Dev/spacehub-fltk/target/x86_64-pc-windows-msvc/release/build/fltk-sys-b414ecf8360fce65/out" "-DCMAKE_C_FLAGS= --target=x86_64-pc-windows-msvc -ffunction-sections -fdata-sections -m64 --target=x86_64-pc-windows-msvc" "-DCMAKE_CXX_FLAGS= --target=x86_64-pc-windows-msvc -ffunction-sections -fdata-sections -m64 --target=x86_64-pc-windows-msvc" "-DCMAKE_ASM_FLAGS= --target=x86_64-pc-windows-msvc -ffunction-sections -fdata-sections -m64 --target=x86_64-pc-windows-msvc" "-DCMAKE_BUILD_TYPE=Release"
-- The C compiler identification is Clang 16.0.6 with GNU-like command-line
-- The CXX compiler identification is Clang 16.0.6 with GNU-like command-line
-- Configuring incomplete, errors occurred!
--- stderr
error: patch failed: src/Fl_win32.cxx:610
error: src/Fl_win32.cxx: patch does not apply
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
CMake Error at /usr/share/cmake/Modules/Platform/Windows-Clang.cmake:135 (enable_language):
No CMAKE_RC_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "RC" or the CMake cache entry CMAKE_RC_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
/usr/share/cmake/Modules/Platform/Windows-Clang.cmake:244 (__windows_compiler_clang_gnu)
/usr/share/cmake/Modules/Platform/Windows-Clang.cmake:262 (__windows_compiler_clang_base)
/usr/share/cmake/Modules/Platform/Windows-Clang-C.cmake:2 (__windows_compiler_clang)
/usr/share/cmake/Modules/CMakeCInformation.cmake:48 (include)
CMakeLists.txt:4 (project)
thread 'main' panicked at /home/noel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:
command did not execute successfully, got: exit status: 1
build script failed, must exit now
stack backtrace:
0: rust_begin_unwind
at /rustc/5bd5d214effd494f4bafb29b3a7a2f6c2070ca5c/library/std/src/panicking.rs:647:5
1: core::panicking::panic_fmt
at /rustc/5bd5d214effd494f4bafb29b3a7a2f6c2070ca5c/library/core/src/panicking.rs:72:14
2: cmake::fail
3: cmake::run
4: cmake::Config::build
5: build_script_main::source::build
6: build_script_main::main
7: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Process finished with exit code 101
NoelJacob commented
main.rs:
// #![windows_subsystem = "windows"]
use fltk::{prelude::*, *};
// use window_vibrancy::{apply_acrylic, apply_blur, apply_mica};
fn main() {
let a = app::App::default().with_scheme(app::Scheme::Gtk);;
let mut w = window::Window::default().with_size(400, 300);
w.end();
w.show();
// apply_acrylic(&w, Some((10, 10, 10, 90))).expect("Unsupported platform! 'apply_acrylic' is only supported on Windows");
a.run().unwrap();
}
Cargo.toml:
[package]
name = "simple-fltk"
license = "AGPL-3"
version = "0.0.1"
edition = "2021"
[dependencies]
fltk = { version = "1.4.26", features = [ "rwh06" ] }
#glow = "0.13.1"
#window-vibrancy = "0.5.0"
messense commented
There is no support for windows msvc target.