ssalonen / libcec-sys Goto Github PK
View Code? Open in Web Editor NEWFFI bindings for the libcec
License: GNU General Public License v2.0
FFI bindings for the libcec
License: GNU General Public License v2.0
copy_dir
hasn't been maintained in 5 years, so it is probably best to upgrade to something more recent, like dircpy.
Attempting to build a project which depends on libcec-sys
or cec-rs
yields error:
LINK : fatal error LNK1181: cannot open input file 'cec.lib'
Smoke tests apparently all fail...
Using 'smoke test' to find out if libcec is installed
Smoke testing with libcec major 6
smoke_abi6.c
build/smoke_abi6.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int
smoke_abi6.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise referenced in function main
smoke_abi6.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main
C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\smoke_abi6_out.exe : fatal error LNK1120: 2 unresolved externals
smoke_abi6 -> fail: Ok(Output { status: ExitStatus(ExitStatus(2)), stdout: "smoke_abi6.c\r\nbuild/smoke_abi6.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int\r\nsmoke_abi6.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise
referenced in function main\r\nsmoke_abi6.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main\r\nC:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\smoke_abi6_out.exe : fatal error LNK1120: 2 unresolved extern
als\r\n", stderr: "" })
Smoke testing with libcec major 5
smoke_abi5.c
build/smoke_abi5.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int
smoke_abi5.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise referenced in function main
smoke_abi5.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main
C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\smoke_abi5_out.exe : fatal error LNK1120: 2 unresolved externals
smoke_abi5 -> fail: Ok(Output { status: ExitStatus(ExitStatus(2)), stdout: "smoke_abi5.c\r\nbuild/smoke_abi5.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int\r\nsmoke_abi5.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise
referenced in function main\r\nsmoke_abi5.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main\r\nC:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\smoke_abi5_out.exe : fatal error LNK1120: 2 unresolved extern
als\r\n", stderr: "" })
Smoke testing with libcec major 4
smoke_abi4.c
build/smoke_abi4.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int
smoke_abi4.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise referenced in function main
smoke_abi4.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main
C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\smoke_abi4_out.exe : fatal error LNK1120: 2 unresolved externals
smoke_abi4 -> fail: Ok(Output { status: ExitStatus(ExitStatus(2)), stdout: "smoke_abi4.c\r\nbuild/smoke_abi4.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int\r\nsmoke_abi4.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise
referenced in function main\r\nsmoke_abi4.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main\r\nC:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\smoke_abi4_out.exe : fatal error LNK1120: 2 unresolved extern
als\r\n", stderr: "" })
Building vendored libcec
Will be happy to send a PR for more detailed README in that regard, if it can be narrowed down.
Cargo.toml
[package]
name = "cec_example"
version = "0.1.0"
edition = "2021"
[dependencies]
libcec-sys = "4.0.3"
main.rs
use libcec_sys;
fn main() {
println!("Hello, world!");
}
C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\x64\cec.dll
C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\x64
as that made a bit more sense to me, still, same result.C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\include
Developer command prompt
or regular cmd
cargo build
or cargo build --release
Build process of libcec-sys recognizing the cec.dll
and dynamically linking with it.
Verbose output for cargo build -vv
Fresh cc v1.0.82
Fresh cmake v0.1.50
Fresh fs_extra v1.3.0
Fresh pkg-config v0.3.27
Dirty libcec-sys v4.0.3: the env variable PATH changed
Compiling libcec-sys v4.0.3
Running `C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-c1b139439b26a8d7\build-script-build`
[libcec-sys 4.0.3] cargo:rerun-if-changed=build
[libcec-sys 4.0.3] cargo:rerun-if-changed=vendor
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LD_LIBRARY_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LDFLAGS
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=INCLUDE
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CFLAGS
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CXX
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CXXFLAGS
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIB
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CL
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=_CL_
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Using pkg-config to find out if libcec is installed
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] pkg-config with libcec major 6
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_NO_PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] pkg_config(>=6) -> fail: Err(Could not run `"pkg-config" "--libs" "--cflags" "libcec" "libcec >= 6"`
[libcec-sys 4.0.3] The pkg-config command could not be found.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Most likely, you need to install a pkg-config package for your OS.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] If you've already installed it, ensure the pkg-config command is one of the
[libcec-sys 4.0.3] directories in the PATH environment variable.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] If you did not expect this build to link to a pre-installed system library,
[libcec-sys 4.0.3] then check documentation of the libcec-sys crate for an option to
[libcec-sys 4.0.3] build the library from source, or disable features or dependencies
[libcec-sys 4.0.3] that require pkg-config.)
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] pkg-config with libcec major 5
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_NO_PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] pkg_config(>=5) -> fail: Err(Could not run `"pkg-config" "--libs" "--cflags" "libcec" "libcec >= 5"`
[libcec-sys 4.0.3] The pkg-config command could not be found.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Most likely, you need to install a pkg-config package for your OS.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] If you've already installed it, ensure the pkg-config command is one of the
[libcec-sys 4.0.3] directories in the PATH environment variable.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] If you did not expect this build to link to a pre-installed system library,
[libcec-sys 4.0.3] then check documentation of the libcec-sys crate for an option to
[libcec-sys 4.0.3] build the library from source, or disable features or dependencies
[libcec-sys 4.0.3] that require pkg-config.)
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] pkg-config with libcec major 4
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_NO_PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=LIBCEC_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_PATH
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
[libcec-sys 4.0.3] pkg_config(>=4) -> fail: Err(Could not run `"pkg-config" "--libs" "--cflags" "libcec" "libcec >= 4"`
[libcec-sys 4.0.3] The pkg-config command could not be found.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Most likely, you need to install a pkg-config package for your OS.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] If you've already installed it, ensure the pkg-config command is one of the
[libcec-sys 4.0.3] directories in the PATH environment variable.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] If you did not expect this build to link to a pre-installed system library,
[libcec-sys 4.0.3] then check documentation of the libcec-sys crate for an option to
[libcec-sys 4.0.3] build the library from source, or disable features or dependencies
[libcec-sys 4.0.3] that require pkg-config.)
[libcec-sys 4.0.3] OPT_LEVEL = Some("0")
[libcec-sys 4.0.3] TARGET = Some("x86_64-pc-windows-msvc")
[libcec-sys 4.0.3] HOST = Some("x86_64-pc-windows-msvc")
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] CC_x86_64-pc-windows-msvc = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] CC_x86_64_pc_windows_msvc = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_CC
[libcec-sys 4.0.3] HOST_CC = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CC
[libcec-sys 4.0.3] CC = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
[libcec-sys 4.0.3] CRATE_CC_NO_DEFAULTS = None
[libcec-sys 4.0.3] CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
[libcec-sys 4.0.3] DEBUG = Some("true")
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
[libcec-sys 4.0.3] CFLAGS_x86_64-pc-windows-msvc = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
[libcec-sys 4.0.3] CFLAGS_x86_64_pc_windows_msvc = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=HOST_CFLAGS
[libcec-sys 4.0.3] HOST_CFLAGS = None
[libcec-sys 4.0.3] cargo:rerun-if-env-changed=CFLAGS
[libcec-sys 4.0.3] CFLAGS = None
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Using 'smoke test' to find out if libcec is installed
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Smoke testing with libcec major 6
[libcec-sys 4.0.3] smoke_abi6.c
[libcec-sys 4.0.3] build/smoke_abi6.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int
[libcec-sys 4.0.3] smoke_abi6.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise referenced in function main
[libcec-sys 4.0.3] smoke_abi6.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main
[libcec-sys 4.0.3] C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\smoke_abi6_out.exe : fatal error LNK1120: 2 unresolved externals
[libcec-sys 4.0.3] smoke_abi6 -> fail: Ok(Output { status: ExitStatus(ExitStatus(2)), stdout: "smoke_abi6.c\r\nbuild/smoke_abi6.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int\r\nsmoke_abi6.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise
referenced in function main\r\nsmoke_abi6.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main\r\nC:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\smoke_abi6_out.exe : fatal error LNK1120: 2 unresolved extern
als\r\n", stderr: "" })
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Smoke testing with libcec major 5
[libcec-sys 4.0.3] smoke_abi5.c
[libcec-sys 4.0.3] build/smoke_abi5.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int
[libcec-sys 4.0.3] smoke_abi5.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise referenced in function main
[libcec-sys 4.0.3] smoke_abi5.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main
[libcec-sys 4.0.3] C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\smoke_abi5_out.exe : fatal error LNK1120: 2 unresolved externals
[libcec-sys 4.0.3] smoke_abi5 -> fail: Ok(Output { status: ExitStatus(ExitStatus(2)), stdout: "smoke_abi5.c\r\nbuild/smoke_abi5.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int\r\nsmoke_abi5.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise
referenced in function main\r\nsmoke_abi5.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main\r\nC:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\smoke_abi5_out.exe : fatal error LNK1120: 2 unresolved extern
als\r\n", stderr: "" })
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Smoke testing with libcec major 4
[libcec-sys 4.0.3] smoke_abi4.c
[libcec-sys 4.0.3] build/smoke_abi4.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int
[libcec-sys 4.0.3] smoke_abi4.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise referenced in function main
[libcec-sys 4.0.3] smoke_abi4.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main
[libcec-sys 4.0.3] C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\smoke_abi4_out.exe : fatal error LNK1120: 2 unresolved externals
[libcec-sys 4.0.3] smoke_abi4 -> fail: Ok(Output { status: ExitStatus(ExitStatus(2)), stdout: "smoke_abi4.c\r\nbuild/smoke_abi4.c(6): warning C4013: '_Static_assert' undefined; assuming extern returning int\r\nsmoke_abi4.obj : error LNK2019: unresolved external symbol __imp_libcec_initialise
referenced in function main\r\nsmoke_abi4.obj : error LNK2019: unresolved external symbol _Static_assert referenced in function main\r\nC:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\smoke_abi4_out.exe : fatal error LNK1120: 2 unresolved extern
als\r\n", stderr: "" })
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] Building vendored libcec
[libcec-sys 4.0.3] cargo:lib_vendored=true
[libcec-sys 4.0.3] cargo:libcec_version_major=6
[libcec-sys 4.0.3] cargo:rustc-cfg=abi6
[libcec-sys 4.0.3] Building libcec from local source
[libcec-sys 4.0.3] build libcec
[libcec-sys 4.0.3] * compiling platform library for amd64
[libcec-sys 4.0.3] The system cannot find the path specified.
[libcec-sys 4.0.3] --------------------------------------
[libcec-sys 4.0.3] Generating cmake project:
[libcec-sys 4.0.3] Architecture = amd64
[libcec-sys 4.0.3] Project type = "NMake Makefiles"
[libcec-sys 4.0.3] Cmake ARCH =
[libcec-sys 4.0.3] Project = "C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\vendor\src\platform\windows\..\"
[libcec-sys 4.0.3] Target = "C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\libcec_build\cmake\amd64"
[libcec-sys 4.0.3] Install = "C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\libcec_build\amd64"
[libcec-sys 4.0.3] Build type = Debug
[libcec-sys 4.0.3] Toolchain = Visual Studio 16 2019
[libcec-sys 4.0.3] --------------------------------------
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] CMake Warning (dev) at CMakeLists.txt:1 (project):
[libcec-sys 4.0.3] cmake_minimum_required() should be called prior to this top-level project()
[libcec-sys 4.0.3] call. Please see the cmake-commands(7) manual for usage documentation of
[libcec-sys 4.0.3] both commands.
[libcec-sys 4.0.3] This warning is for project developers. Use -Wno-dev to suppress it.
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] CMake Error at CMakeLists.txt:1 (project):
[libcec-sys 4.0.3] Running
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] 'nmake' '-?'
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] failed with:
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] The system cannot find the file specified
[libcec-sys 4.0.3]
[libcec-sys 4.0.3]
[libcec-sys 4.0.3] CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
[libcec-sys 4.0.3] CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
[libcec-sys 4.0.3] -- Configuring incomplete, errors occurred!
[libcec-sys 4.0.3] The system cannot find the path specified.
[libcec-sys 4.0.3] Compiling "C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\libcec_build\cmake\amd64" for amd64 using Visual Studio 16 2019
[libcec-sys 4.0.3] 'nmake' is not recognized as an internal or external command,
[libcec-sys 4.0.3] operable program or batch file.
[libcec-sys 4.0.3] cargo:rustc-link-search=native=C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\libcec_build\amd64
[libcec-sys 4.0.3] cargo:rustc-link-lib=cec
Running `set CARGO=\\?\C:\Users\dev\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo.exe&& set CARGO_CRATE_NAME=libcec_sys&& set CARGO_MANIFEST_DIR=C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15001f\libcec-sys-4.0.3&& set CARGO_PKG_AUTHORS="Sami Salonen"&& set C
ARGO_PKG_DESCRIPTION="FFI bindings to libcec"&& set CARGO_PKG_HOMEPAGE=https://github.com/ssalonen/libcec-sys&& set CARGO_PKG_LICENSE=GPL-2.0&& set CARGO_PKG_LICENSE_FILE=""&& set CARGO_PKG_NAME=libcec-sys&& set CARGO_PKG_README=README.md&& set CARGO_PKG_REPOSITORY=https://github.com/ssalone
n/libcec-sys&& set CARGO_PKG_RUST_VERSION=""&& set CARGO_PKG_VERSION=4.0.3&& set CARGO_PKG_VERSION_MAJOR=4&& set CARGO_PKG_VERSION_MINOR=0&& set CARGO_PKG_VERSION_PATCH=3&& set CARGO_PKG_VERSION_PRE=""&& set OUT_DIR=C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb
027\out&& set PATH="C:\Users\dev\Desktop\cec_example\target\debug\deps;C:\Users\dev\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin;C:\Users\dev\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerS
hell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\TShell\TShell\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Windows\system32\config\systemprofile\AppData\
Local\Microsoft\WindowsApps;C:\Users\dev\.cargo\bin;C:\Users\dev\AppData\Local\Microsoft\WindowsApps;C:\Users\dev\.dotnet\tools;C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\x64"&& rustc --crate-name libcec_sys --edition=2021 C:\Users\dev\.cargo\registry\src\index.crates.io-6f17d22bba15
001f\libcec-sys-4.0.3\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=291 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" -C metadata=5bdcb732714be76c -C extra-filename=-
5bdcb732714be76c --out-dir C:\Users\dev\Desktop\cec_example\target\debug\deps -L dependency=C:\Users\dev\Desktop\cec_example\target\debug\deps --cap-lints warn -L native=C:\Users\dev\Desktop\cec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\libcec_build\amd64 -l cec --cfg abi6`
Compiling cec_example v0.1.0 (C:\Users\dev\Desktop\cec_example)
Running `set CARGO=\\?\C:\Users\dev\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo.exe&& set CARGO_BIN_NAME=cec_example&& set CARGO_CRATE_NAME=cec_example&& set CARGO_MANIFEST_DIR=C:\Users\dev\Desktop\cec_example&& set CARGO_PKG_AUTHORS=""&& set CARGO_PKG_DESCRIPTION=""&& se
t CARGO_PKG_HOMEPAGE=""&& set CARGO_PKG_LICENSE=""&& set CARGO_PKG_LICENSE_FILE=""&& set CARGO_PKG_NAME=cec_example&& set CARGO_PKG_README=""&& set CARGO_PKG_REPOSITORY=""&& set CARGO_PKG_RUST_VERSION=""&& set CARGO_PKG_VERSION=0.1.0&& set CARGO_PKG_VERSION_MAJOR=0&& set CARGO_PKG_VERSION_MI
NOR=1&& set CARGO_PKG_VERSION_PATCH=0&& set CARGO_PKG_VERSION_PRE=""&& set CARGO_PRIMARY_PACKAGE=1&& set PATH="C:\Users\dev\Desktop\cec_example\target\debug\deps;C:\Users\dev\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin;C:\Users\dev\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bi
n;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\TShell\TShell\;C:\Program Files (x86)\Wind
ows Kits\8.1\Windows Performance Toolkit\;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Users\dev\.cargo\bin;C:\Users\dev\AppData\Local\Microsoft\WindowsApps;C:\Users\dev\.dotnet\tools;C:\Program Files (x86)\Pulse-Eight\USB-CEC Adapter\x64"&& rustc --crate-n
ame cec_example --edition=2021 src\main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=291 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=9064c001a4e2d1b3 --out-dir C:\Users\dev\Desktop\cec_example\tar
get\debug\deps -C incremental=C:\Users\dev\Desktop\cec_example\target\debug\incremental -L dependency=C:\Users\dev\Desktop\cec_example\target\debug\deps --extern libcec_sys=C:\Users\dev\Desktop\cec_example\target\debug\deps\liblibcec_sys-5bdcb732714be76c.rlib -L native=C:\Users\dev\Desktop\c
ec_example\target\debug\build\libcec-sys-1ce880d6c0beb027\out\libcec_build\amd64`
warning: unused import: `libcec_sys`
--> src\main.rs:1:5
|
1 | use libcec_sys;
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error: linking with `link.exe` failed: exit code: 1181
|
= note: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\link.exe" "/NOLOGO" "C:\\Users\\dev\\AppData\\Local\\Temp\\rustcfNEHsU\\symbols.o" "C:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\deps\\cec_example.132r48g5ng3ivefx.rcgu.o" "C:\\Users\\dev\\Desktop\\cec_
example\\target\\debug\\deps\\cec_example.1em56xmfe62110zg.rcgu.o" "C:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\deps\\cec_example.1zov6zdu19uyd43.rcgu.o" "C:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\deps\\cec_example.1zwx4qnssk56lvvx.rcgu.o" "C:\\Users\\dev\\Desktop\\cec_ex
ample\\target\\debug\\deps\\cec_example.3tjg6i6sg43yc97t.rcgu.o" "C:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\deps\\cec_example.484ho3fye15a81i9.rcgu.o" "C:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\deps\\cec_example.2nvipbqfc6x55fv9.rcgu.o" "/LIBPATH:C:\\Users\\dev\\Desktop
\\cec_example\\target\\debug\\deps" "/LIBPATH:C:\\Users\\dev\\Desktop\\cec_example\\target\\debug\\build\\libcec-sys-1ce880d6c0beb027\\out\\libcec_build\\amd64" "/LIBPATH:C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users
\\dev\\Desktop\\cec_example\\target\\debug\\deps\\liblibcec_sys-5bdcb732714be76c.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-4e8f46f7d0c95848.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-
msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-5db344dab6eb1d2b.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-74e09b816cbd5555.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64
-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd_detect-0e78b5195f1cb27a.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-bfdbaec42e428240.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x
86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-ece31b1fa03921a4.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libminiz_oxide-b1cda3daaedb751f.rlib" "C:\\Users\\dev\\.rustup
\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libadler-fcb0daf3e92ec962.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-943c8b115715a79a.rlib" "C:\\Users\\dev\\.rustup\\t
oolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-86ba8a5505ea3939.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-5e13ccbf89e39d2e.rlib" "C:\\Users\\dev\\.rustup\\toolc
hains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-150c9edec7571387.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-cd5722df944967ab.rlib" "C:\\Users\\dev\
\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-f671e54f90f2e08c.rlib" "C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-0157311a6d6a27aa.rlib" "cec.lib"
"kernel32.lib" "advapi32.lib" "bcrypt.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "kernel32.lib" "msvcrt.lib" "/NXCOMPAT" "/LIBPATH:C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "/OUT:C:\\Users\\dev\\Desktop\\ce
c_example\\target\\debug\\deps\\cec_example.exe" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballo
c.natvis" "/NATVIS:C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\dev\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis"
= note: LINK : fatal error LNK1181: cannot open input file 'cec.lib'
warning: `cec_example` (bin "cec_example") generated 1 warning
error: could not compile `cec_example` (bin "cec_example") due to previous error; 1 warning emitted
There is also no easy way to find installed Visual Studio versions. cc
seems capable of this, but it only exposes a method for getting the latest installed version (if they have 2022 then we can't know if they have 2019), check here.
An alternative would be to use the vswhere
utility, which comes preinstalled with Visual Studio 2017+. Since libcec
theoretically supports down to 2013, we would have to manually download the executable. In addition, we would have to pull in this dependency, which unfortunately hasn't been maintained in over 4 years. I'm not sure if there is anything else.
Edit: Although libcec
seems to compile fine with 2017, the docs state it only supports 2019+ so there could possibly be side effects. We should probably only support 2019 and if it's not installed, libcec
will automatically output a corresponding error.
Originally posted by @ok-nick in #15 (comment)
Potentially useful https://github.com/Pulse-Eight/libcec-support/blob/master/windows/config/toolchain.cmd
libcec-sys compilation seems to fail, as indicated in downstream library ssalonen/cec-rs#12
It seems that --parallel
flag is not accepted by the cmake
version used in the cross
build.
In cmake 3.12, the --parallel
flag was introduced. It looks like cmake
crate (which is used in build.rs
) started to use this new flag in rust-lang/cmake-rs#123.
The error is probably due to too old cmake
version.
Indeed, builds use docker images based on cross 0.1.16, which uses cmake 3.5.1 https://github.com/rust-embedded/cross/blob/v0.1.16/docker/cmake.sh#L4
Convenient, easy, and makes sense.
Edit: didn't mean to mark it as a bug.
Reopening #1
I think the issue here is that cmake in libcec tries to extract version information from git. However, for some reason it tries to read the consuming app's git info instead of the submodule. This is very evident when the consuming app has an empty git repo.
Repro:
cargo new cec-repro
cd cec-repro
echo 'libcec-sys = "1.0.0"' >> Cargo.toml
cargo build
This will blow up with:
-- lib info: git revision: fatal: No names found, cannot describe anything.
fatal: your current branch 'master' does not have any commits yet
fatal: ambiguous argument '..HEAD': unknown revision or path not in the working tree.
Which causes a broken header file:
tail target/debug/build/libcec-sys-*/out/vendor/src/libcec/env.h
/* information about how libCEC was compiled */
#define LIB_INFO ("git revision: fatal: No names found, cannot describe anything.
fatal: your current branch 'master' does not have any commits yet
fatal: ambiguous argument '..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
The reason this works in the bundled example is because the consuming example has a git history. However there is a subtle bug where the LIB_INFO uses an incorrect commit id:
git commit -m "empty commit" --allow-empty
git tag fake-version
cargo clean
cargo build
tail target/debug/build/libcec-sys-*/out/vendor/src/libcec/env.h
Will show:
/* information about how libCEC was compiled */
#define LIB_INFO ("git revision: fake-version, compiled on Wed Dec 23 18:23:46 UTC 2020 by
Openssl example in https://doc.rust-lang.org/cargo/reference/build-script-examples.html is something to follow here with libcec-sys and cec-rs, detection version and communicating that to deps. Cec-rs can use this to enable cfg values and conditionally compile API.
Github CI shows that sccache is not used at all on Windows. This is despite the efforts to command rustc
and cmake
to use sccache in #44
Output from sccache action:
Post job cleanup.
C:\hostedtoolcache\windows\sccache\0.5.4\x64\sccache.exe --show-stats
Compile requests 0
Compile requests executed 0
Cache hits 0
Cache misses 0
Cache timeouts 0
Cache read errors 0
Forced recaches 0
Cache write errors 0
Compilation failures 0
Cache errors 0
Non-cacheable compilations 0
Non-cacheable calls 0
Non-compilation calls 0
Unsupported compiler calls 0
Average cache write 0.000 s
Average compiler 0.000 s
Average cache read hit 0.000 s
Failed distributed compilations 0
Cache location Local disk: "C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache\\cache"
Version (client) 0.5.4
Run CI
To see compile requests and cache numbers on windows
Compiling libcec-sys v3.0.0
error: failed to run custom build command for `libcec-sys v3.0.0`
Caused by:
process didn't exit successfully: `C:/Users/nicky/Documents/crate_targets\debug\build\libcec-sys-bb45cac0d70fb383\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:lib_vendored=true
cargo:libcec_version_major=4
cargo:rustc-cfg=abi4
Building libcec from local source
cmake platform
CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-pc-windows-msvc = None
CMAKE_x86_64_pc_windows_msvc = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "C:/Users/nicky/Documents/crate_targets\\debug\\build\\libcec-sys-e405de6718a35383\\out\\vendor\\src\\platform" "-G" "Visual Studio 17
2022" "-Thost=x64" "-Ax64" "-DCMAKE_INSTALL_PREFIX=C:/Users/nicky/Documents/crate_targets\\debug\\build\\libcec-sys-e405de6718a35383\\out\\platform_build"
"-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_DEBUG= -n
ologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=Debug"
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/build
running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--parallel" "16"
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
p8-platform.vcxproj -> C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\platform_build\build\Debug\p8-platform.lib
-- Install configuration: "Debug"
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/lib/p8-platform.lib
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/os.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/windows/dlfcn-win
32.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/windows/os-socket
.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/windows/os-thread
s.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/windows/os-types.
h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/sockets/cdevsocke
t.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/sockets/socket.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/sockets/tcp.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/threads/atomics.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/threads/mutex.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/threads/threads.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/util/atomic.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/util/buffer.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/util/StringUtils.
h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/util/StdString.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/util/timeutils.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/include/p8-platform/util/util.h
-- Up-to-date: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/platform_build/lib/p8-platform/p8-platform-config.cm
ake
cargo:root=C:/Users/nicky/Documents/crate_targets\debug\build\libcec-sys-e405de6718a35383\out\platform_build
make platform
cmake libcec
CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-pc-windows-msvc = None
CMAKE_x86_64_pc_windows_msvc = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "C:/Users/nicky/Documents/crate_targets\\debug\\build\\libcec-sys-e405de6718a35383\\out\\vendor" "-G" "Visual Studio 17 2022" "-Thost=x
64" "-Ax64" "-DCMAKE_INSTALL_PREFIX=C:/Users/nicky/Documents/crate_targets\\debug\\build\\libcec-sys-e405de6718a35383\\out\\libcec_build" "-DCMAKE_C_FLAGS
= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_DEBUG= -nologo -MD -Brepro
" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=Debug"
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
-- Configured features:
-- Pulse-Eight CEC Adapter: yes
-- Pulse-Eight CEC Adapter detection: yes
-- xrandr support: no
-- Raspberry Pi support: no
-- TDA995x support: no
-- Exynos support: no
-- DRM support: no
-- AOCEC support: no
-- Python support: no
-- lib info: , features: P8_USB, P8_detect
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/nicky/Documents/crate_targets/debug/build/libcec-sys-e405de6718a35383/out/libcec_build/build
running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--parallel" "16"
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
CECClient.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECProcessor.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
LibCEC.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
LibCECC.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
LibCECDll.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
AdapterFactory.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
USBCECAdapterMessage.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
USBCECAdapterCommands.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
USBCECAdapterCommunication.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
USBCECAdapterMessageQueue.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
USBCECAdapterDetection.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECAudioSystem.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECBusDevice.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECDeviceMap.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECPlaybackDevice.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECRecordingDevice.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECTuner.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECTV.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
ANCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
CECCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
Generating Code...
Compiling...
SLCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
VLCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
RLCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
PHCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
RHCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
AQCommandHandler.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
adl-edid.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
nv-edid.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
drm-edid.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
os-edid.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
serialport.cpp
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt.h(634,1): fatal error C1189: #error: You cannot use 32-bit time_t (_USE_32BIT_
TIME_T) with _WIN64 [C:\Users\nicky\Documents\crate_targets\debug\build\libcec-sys-e405de6718a35383\out\libcec_build\build\src\libcec\cec.vcxproj]
Generating Code...
--- stderr
CMake Deprecation Warning at CMakeLists.txt:3 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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.
make: *** No targets specified and no makefile found. Stop.
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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 Deprecation Warning at src/cec-client/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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 Deprecation Warning at src/cecc-client/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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 Deprecation Warning at src/pyCecClient/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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 Deprecation Warning at src/libcec/CMakeLists.txt:3 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 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.
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1
2023-07-05T10:26:03.8372712Z [libcec-sys 4.0.1-alpha.0] LINK : fatal error LNK1104: cannot open file 'python311_d.lib'
I'm trying to use cec-rs = '2.0.1' but libcec-sys build fails.
Compiling libcec-sys v1.0.0
error: failed to run custom build command for `libcec-sys v1.0.0`
Caused by:
process didn't exit successfully: `/project/target/debug/build/libcec-sys-967053c0d25720a3/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-changed=build.rs
Building libcec from local source
running: "cmake" "/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor/src/platform" "-DCMAKE_INSTALL_PREFIX=/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"
-- Configuring done
-- Generating done
-- Build files have been written to: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/build
running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--"
Scanning dependencies of target p8-platform
[ 50%] Building CXX object CMakeFiles/p8-platform.dir/src/util/StringUtils.cpp.o
[100%] Linking CXX static library libp8-platform.a
[100%] Built target p8-platform
Install the project...
-- Install configuration: "Debug"
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/lib/libp8-platform.a
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/os.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/posix/os-socket.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/posix/os-threads.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/posix/os-types.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/sockets/cdevsocket.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/sockets/socket.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/sockets/tcp.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/threads/atomics.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/threads/mutex.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/threads/threads.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/util/atomic.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/util/buffer.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/util/StringUtils.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/util/StdString.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/util/timeutils.h
-- Installing: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/include/p8-platform/util/util.h
-- Up-to-date: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/lib/pkgconfig/p8-platform.pc
-- Up-to-date: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build/lib/p8-platform/p8-platform-config.cmake
cargo:root=/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/platform_build
running: "cmake" "/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor" "-DCMAKE_INSTALL_PREFIX=/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/libcec_build" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"
-- git found: fatal: No names found, cannot describe anything.
fatal: your current branch 'master' does not have any commits yet
fatal: ambiguous argument '..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
-- Configured features:
-- Pulse-Eight CEC Adapter: yes
-- Pulse-Eight CEC Adapter detection: yes
-- xrandr support: yes
-- Raspberry Pi support: no
-- TDA995x support: no
-- Exynos support: no
-- DRM support: yes
-- AOCEC support: no
-- Python support: no
-- lib info: git revision: fatal: No names found, cannot describe anything.
fatal: your current branch 'master' does not have any commits yet
fatal: ambiguous argument '..HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]', compiled on Wed Sep 2 05:11:09 PM UTC 2020 by janhouse@media on Linux 5.8.5-arch1-1 (x86_64), features: P8_USB, DRM, P8_detect, randr
-- Configuring done
-- Generating done
-- Build files have been written to: /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/libcec_build/build
running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--"
Scanning dependencies of target cec
[ 2%] Building CXX object src/libcec/CMakeFiles/cec.dir/CECProcessor.cpp.o
[ 5%] Building CXX object src/libcec/CMakeFiles/cec.dir/LibCEC.cpp.o
[ 8%] Building CXX object src/libcec/CMakeFiles/cec.dir/adapter/Pulse-Eight/USBCECAdapterMessage.cpp.o
[ 10%] Building CXX object src/libcec/CMakeFiles/cec.dir/adapter/Pulse-Eight/USBCECAdapterCommands.cpp.o
[ 13%] Building CXX object src/libcec/CMakeFiles/cec.dir/LibCECC.cpp.o
[ 16%] Building CXX object src/libcec/CMakeFiles/cec.dir/adapter/Pulse-Eight/USBCECAdapterCommunication.cpp.o
[ 18%] Building CXX object src/libcec/CMakeFiles/cec.dir/CECClient.cpp.o
[ 21%] Building CXX object src/libcec/CMakeFiles/cec.dir/adapter/AdapterFactory.cpp.o
--- stderr
make: *** No targets specified and no makefile found. Stop.
In file included from /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor/src/libcec/CECProcessor.cpp:34:
/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor/src/libcec/env.h:92:19: warning: missing terminating " character
92 | #define LIB_INFO ("git revision: fatal: No names found, cannot describe anything.
| ^
In file included from /project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor/src/libcec/adapter/Pulse-Eight/USBCECAdapterMessage.cpp:34:
/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor/src/libcec/env.h:92:19: warning: missing terminating " character
92 | #define LIB_INFO ("git revision: fatal: No names found, cannot describe anything.
| ^
/project/target/debug/build/libcec-sys-b1cbd7e697ae9d37/out/vendor/src/libcec/env.h:93:28: warning: character constant too long for its type
93 | fatal: your current branch 'master' does not have any commits yet
| ^~~~~~~~
I'm on Archlinux and libcec from git builds fine so I'm not sure if the problem is with libcec-sys build file or something else.
Should definitely cache python, it takes 1-2 minutes to install.
Originally posted by @ok-nick in #15 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.