Open andrieshiemstra opened 3 years ago
awaiting response at https://github.com/theduke/quickjs-rs/pull/114
any movement about this one?
any movement about this one?
Are you interested in 32bit or windows support?
I solved my raspberry needs by using 64bit raspberryOS
I'm not sure if quickjs supports windows nowadays, also the people at quickjs-ng seem to have some attention for that.
I'l see what happens if i re-enable the windows tests, and between work and private matters i'm working on getting quickjs-ng working with this runtime..
i need windows support, i was checking other quick-js wrapper and i've found that quick-js doesn't work natively on windows but there are some patches for making it work. for example the lib DelSkayn/rquickjs support windows using the cargo patch command (there are .patch files in the project) and theduke/quickjs-rs support windows by building with the x86_64-pc-windows-gnu toolchain
hi, I enabled the windows test and it seems to work... can you try building on windows?
same error, the problem seams to be hirofa-quickjs-sys
error: failed to run custom build command for `hirofa-quickjs-sys v0.2.0`
Caused by:
process didn't exit successfully: `E:\Stuff\Repos\quickjs_es_runtime\target\debug\build\hirofa-quickjs-sys-91a31657cfb1cb4d\build-script-build` (exit code:
1)
--- stderr
Compiling quickjs...
error occurred: Command "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Z7" "-Brepro" "-W4" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-FoE:\\Stuff\\Repos\\quickjs_es_runtime\\target\\debug\\build\\hirofa-quickjs-sys-2ff5798602a9047d\\out\\5c9f59ba85dde1f8-cutils.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\debug\\build\\hirofa-quickjs-sys-2ff5798602a9047d\\out\\quickjs\\cutils.c" with args "cl.exe" did not execute successfully (status code exit code: 2).
and if i use the x86_64-pc-windows-gnu target i get
The following warnings were emitted during compilation:
warning: during RTL pass: final
warning: E:\Stuff\Repos\quickjs_es_runtime\target\x86_64-pc-windows-gnu\debug\build\hirofa-quickjs-sys-0ccb6a66b5629f7a\out\quickjs\quickjs.c: In function 'invalid_from_string':
warning: E:\Stuff\Repos\quickjs_es_runtime\target\x86_64-pc-windows-gnu\debug\build\hirofa-quickjs-sys-0ccb6a66b5629f7a\out\quickjs\quickjs.c:1551:1: internal compiler error: in based_loc_descr, at dwarf2out.c:14264
warning: }
warning: ^
warning: libbacktrace could not find executable to open
warning: Please submit a full bug report,
warning: with preprocessed source if appropriate.
warning: See <https://sourceforge.net/projects/mingw-w64> for instructions.
error: failed to run custom build command for `hirofa-quickjs-sys v0.2.0`
Caused by:
process didn't exit successfully: `E:\Stuff\Repos\quickjs_es_runtime\target\debug\build\hirofa-quickjs-sys-ecb0aca63e18bc49\build-script-build` (exit code: 1)
--- stdout
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-gnu
CC_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_gnu
CC_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-gnu
CFLAGS_x86_64-pc-windows-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_gnu
CFLAGS_x86_64_pc_windows_gnu = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
running: "gcc.exe" "-O2" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wchar-subscripts" "-Wno-array-bounds" "-Wno-format-truncation" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-unused-parameter" "-Wundef" "-Wuninitialized" "-Wunused" "-Wwrite-strings" "-funsigned-char" "-Wno-cast-function-type" "-Wno-implicit-fallthrough" "-Wno-enum-conversion" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-o" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\9f829f07dd61cb3c-cutils.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\quickjs\\cutils.c"
exit code: 0
running: "gcc.exe" "-O2" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wchar-subscripts" "-Wno-array-bounds" "-Wno-format-truncation" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-unused-parameter" "-Wundef" "-Wuninitialized" "-Wunused" "-Wwrite-strings" "-funsigned-char" "-Wno-cast-function-type" "-Wno-implicit-fallthrough" "-Wno-enum-conversion" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-o" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\9f829f07dd61cb3c-libbf.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\quickjs\\libbf.c"
exit code: 0
running: "gcc.exe" "-O2" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wchar-subscripts" "-Wno-array-bounds" "-Wno-format-truncation" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-unused-parameter" "-Wundef" "-Wuninitialized" "-Wunused" "-Wwrite-strings" "-funsigned-char" "-Wno-cast-function-type" "-Wno-implicit-fallthrough" "-Wno-enum-conversion" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-o" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\9f829f07dd61cb3c-libregexp.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\quickjs\\libregexp.c"
exit code: 0
running: "gcc.exe" "-O2" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wchar-subscripts" "-Wno-array-bounds" "-Wno-format-truncation" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-unused-parameter" "-Wundef" "-Wuninitialized" "-Wunused" "-Wwrite-strings" "-funsigned-char" "-Wno-cast-function-type" "-Wno-implicit-fallthrough" "-Wno-enum-conversion" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-o" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\9f829f07dd61cb3c-libunicode.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\quickjs\\libunicode.c"
exit code: 0
running: "gcc.exe" "-O2" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wchar-subscripts" "-Wno-array-bounds" "-Wno-format-truncation" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-unused-parameter" "-Wundef" "-Wuninitialized" "-Wunused" "-Wwrite-strings" "-funsigned-char" "-Wno-cast-function-type" "-Wno-implicit-fallthrough" "-Wno-enum-conversion" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-o" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\9f829f07dd61cb3c-quickjs.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\quickjs\\quickjs.c"
cargo:warning=during RTL pass: final
cargo:warning=E:\Stuff\Repos\quickjs_es_runtime\target\x86_64-pc-windows-gnu\debug\build\hirofa-quickjs-sys-0ccb6a66b5629f7a\out\quickjs\quickjs.c: In function 'invalid_from_string':
cargo:warning=E:\Stuff\Repos\quickjs_es_runtime\target\x86_64-pc-windows-gnu\debug\build\hirofa-quickjs-sys-0ccb6a66b5629f7a\out\quickjs\quickjs.c:1551:1: internal compiler error: in based_loc_descr, at dwarf2out.c:14264
cargo:warning= }
cargo:warning= ^
cargo:warning=libbacktrace could not find executable to open
cargo:warning=Please submit a full bug report,
cargo:warning=with preprocessed source if appropriate.
cargo:warning=See <https://sourceforge.net/projects/mingw-w64> for instructions.
exit code: 1
--- stderr
Compiling quickjs...
error occurred: Command "gcc.exe" "-O2" "-ffunction-sections" "-fdata-sections" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "-Wall" "-Wextra" "-Wchar-subscripts" "-Wno-array-bounds" "-Wno-format-truncation" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-unused-parameter" "-Wundef" "-Wuninitialized" "-Wunused" "-Wwrite-strings" "-funsigned-char" "-Wno-cast-function-type" "-Wno-implicit-fallthrough" "-Wno-enum-conversion" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"2024-01-13\"" "-DCONFIG_BIGNUM" "-o" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\9f829f07dd61cb3c-quickjs.o" "-c" "E:\\Stuff\\Repos\\quickjs_es_runtime\\target\\x86_64-pc-windows-gnu\\debug\\build\\hirofa-quickjs-sys-0ccb6a66b5629f7a\\out\\quickjs\\quickjs.c" with args "gcc.exe" did not execute successfully (status code exit code: 1).
well, i know using msvc requires a lot of patching so that probably a no-go unstill projects like quickjs-ng fix it and we can use that
mingw64 should work (as it does in my test) could you see what the windows test case does https://github.com/HiRoFa/quickjs_es_runtime/actions/runs/7811729245/job/21307353232 and spot any differences in path/executable compared to your output?
I don't have a windows dev box so i can;'t be of the greatest help with this...
ok, by looking at the logs i was able to figure it out. i was using Mingw-64 and not the Msys2's Mingw-64, but still i'm not passing all the tests should i be concerned?
running 81 tests
test facades::abstraction_tests::test1 ... ok
test facades::tests::test_async ... ok
test facades::tests::test_func ... ok
test facades::tests::test_eval_sync ... ok
test facades::tests::test_eval_await ... ok
test facades::abstraction_tests::serde_tests_value ... ok
test facades::abstraction_tests::test_serde ... ok
test facades::abstraction_tests::serde_tests_serialize ... ok
test facades::tests::test_stack_size ... ok
test quickjs_utils::arrays::tests::test_array ... ok
test quickjs_utils::bigints::tests::test_bigint ... ok
test quickjs_utils::compile::tests::test_bytecode ... ok
test quickjs_utils::compile::tests::test_bytecode_bad_compile ... ok
test quickjs_utils::compile::tests::test_bytecode_bad_run ... ok
test quickjs_utils::compile::tests::test_compile ... ok
test quickjs_utils::dates::tests::test_date ... ok
test quickjs_utils::errors::tests::test_ex0 ... ok
error: test failed, to rerun pass `--lib`
Caused by:
process didn't exit successfully: `E:\Stuff\Repos\quickjs_es_runtime\target\x86_64-pc-windows-gnu\debug\deps\quickjs_runtime-9ffef702a3863770.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Well, there's progress :)
I updated some test code so the tests log to quickjs_runtime.log, could you update and rerun the tests with
cargo test -- --test-threads=1
Should give a better idea which test fails and why
with this command cargo test -- --test-threads=1 the tests fails immediately and i get no logs
running 81 tests
test builder::tests::test_module_loader ... error: test failed, to rerun pass `--lib`
Caused by:
process didn't exit successfully: `E:\Stuff\Repos\quickjs_es_runtime\target\debug\deps\quickjs_runtime-d36558528a0e69cc.exe --test-threads=1` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
but running cargo test gave me the same result as the previous comment and also generated the .log file quickjs_runtime.log
the file interrupts and gave no informations about the error.
I'm running the tests on Windows 10 x64 with an AMD cpu and 16gb of ram
EDIT: i'm probably blind... the problem seems to be "builder::tests::test_module_loader"
EDIT2: i investigated a bit and found that everything's except modules works, every single module test failed
and of course test_module_loader was one that did not init logging correctly yet :(
i updated the code so that test case also logs to the log file, could you try again please?
just
cargo test --color=always --package quickjs_runtime --lib builder::tests::test_module_loader -- --exact
hmm, it fails after compiling a module...
I do a get_module_def(&compiled_module)
which expects the pointer to point a q::JSModuleDef
but I know compiling modules nowadays returns a Promise... (see https://github.com/bellard/quickjs/issues/232) so there might be a problem with that... not sure why it fails for you on windows and not in the github test run or on my linux stuf...
i may need to fall-back to the last 2023 release of quickjs....
-- edit -- that was nonsense.... the module is only compiled there, not running yet.. i;m gonna add some more log lines so we can see which call actually fails
please try again
quickjs_runtime.log later i will try on another windows machine, maybe this one have something messed up?
anyway if i remove the "import {foo} from 'some_module.mes';" part from the test it runs and ends without any issue
There is a new version of quickjs-ng out which should provide support for compiling with msvc
https://github.com/quickjs-ng/quickjs/releases/tag/v0.4.0
I'll have a look at making that work with ci but don't have a windows box to test beyond that...
windows test fails with msvc, will look into this later
error: failed to run custom build command for `hirofa-quickjs-sys v0.4.0`
Caused by:
process didn't exit successfully: `D:\a\quickjs_es_runtime\quickjs_es_runtime\target\debug\build\hirofa-quickjs-sys-172d59631406bafc\build-script-build` (exit code: 1)
--- stdout
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
CC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
CC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
DEBUG = Some("true")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
CFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
CFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
CC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
CC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-pc-windows-msvc
CFLAGS_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_pc_windows_msvc
CFLAGS_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_x86_64-pc-windows-msvc
CC_x86_64-pc-windows-msvc = None
cargo:rerun-if-env-changed=CC_x86_64_pc_windows_msvc
CC_x86_64_pc_windows_msvc = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(862): note: see declaration of 'getservbyname'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2320): error C2375: 'getprotobynumber': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(866): note: see declaration of 'getprotobynumber'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2337): error C2375: 'getprotobyname': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(868): note: see declaration of 'getprotobyname'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2357): error C2375: 'WSAStartup': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(872): note: see declaration of 'WSAStartup'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2377): error C2375: 'WSACleanup': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(876): note: see declaration of 'WSACleanup'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2394): error C2375: 'WSASetLastError': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(878): note: see declaration of 'WSASetLastError'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2411): error C2375: 'WSAGetLastError': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(880): note: see declaration of 'WSAGetLastError'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2432): error C2375: 'WSAIsBlocking': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(882): note: see declaration of 'WSAIsBlocking'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2450): error C2375: 'WSAUnhookBlockingHook': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(884): note: see declaration of 'WSAUnhookBlockingHook'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2468): error C2375: 'WSASetBlockingHook': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(886): note: see declaration of 'WSASetBlockingHook'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2486): error C2375: 'WSACancelBlockingCall': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(888): note: see declaration of 'WSACancelBlockingCall'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2504): error C2375: 'WSAAsyncGetServByName': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(890): note: see declaration of 'WSAAsyncGetServByName'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2532): error C2375: 'WSAAsyncGetServByPort': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(898): note: see declaration of 'WSAAsyncGetServByPort'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2560): error C2375: 'WSAAsyncGetProtoByName': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(906): note: see declaration of 'WSAAsyncGetProtoByName'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2586): error C2375: 'WSAAsyncGetProtoByNumber': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(913): note: see declaration of 'WSAAsyncGetProtoByNumber'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2612): error C2375: 'WSAAsyncGetHostByName': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(920): note: see declaration of 'WSAAsyncGetHostByName'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2638): error C2375: 'WSAAsyncGetHostByAddr': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(927): note: see declaration of 'WSAAsyncGetHostByAddr'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2668): error C2375: 'WSACancelAsyncRequest': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(936): note: see declaration of 'WSACancelAsyncRequest'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock2.h(2686): error C2375: 'WSAAsyncSelect': redefinition; different linkage
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\winsock.h(938): note: see declaration of 'WSAAsyncSelect'
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.h(329): warning C4244: 'function': conversion from 'uint32_t' to 'uint16_t', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(37): warning C4068: unknown pragma 'GCC'
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(51): warning C4244: '=': conversion from 'int' to 'char', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(60): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(220): warning C4244: '=': conversion from 'unsigned int' to 'uint8_t', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(223): warning C4244: '=': conversion from 'unsigned int' to 'uint8_t', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(226): warning C4244: '=': conversion from 'unsigned int' to 'uint8_t', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(229): warning C4244: '=': conversion from 'unsigned int' to 'uint8_t', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(247): warning C4244: 'return': conversion from '__int64' to 'int', possible loss of data
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(309): warning C4018: '<': signed/unsigned mismatch
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(616): warning C4115: 'timezone': named type definition in parentheses
D:\a\quickjs_es_runtime\quickjs_es_runtime\target\x86_64-pc-windows-msvc\debug\build\hirofa-quickjs-sys-4ac51c0cae66319b\out\quickjs\cutils.c(677): warning C4068: unknown pragma 'GCC'
--- stderr
Compiling quickjs...
error occurred: Command "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.39.33519\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-O2" "-Z7" "-Brepro" "-W4" "-D_GNU_SOURCE" "-DCONFIG_VERSION=\"quickjs-ng-0.4.1\"" "-DCONFIG_BIGNUM" "-FoD:\\a\\quickjs_es_runtime\\quickjs_es_runtime\\target\\x86_64-pc-windows-msvc\\debug\\build\\hirofa-quickjs-sys-4ac51c0cae66319b\\out\\4a308a6144ff6f2a-cutils.o" "-c" "D:\\a\\quickjs_es_runtime\\quickjs_es_runtime\\target\\x86_64-pc-windows-msvc\\debug\\build\\hirofa-quickjs-sys-4ac51c0cae66319b\\out\\quickjs\\cutils.c" with args "cl.exe" did not execute successfully (status code exit code: 2).
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 1.
I've got issues with 32-bits which I cannot easily fix (I'm developing on a DE10-Nano which has a Cortex-A9 processor with 32-bits address space). I get a Segfault when trying to run the simple example from the docs.
Is there anything I can help with to make this happen? QuickJS says they're supposed to support the processor.
Hi @hansl
Yes i've been unable to get anything working on 32bit (tried raspbian 32 bit and such) it does compile but the simplest api calls fail with segfaults... i have no idea why.. but also haven't looked to deep because i don't use 32 bits anymore. (also i don't know enough about rust-c interop to try any meaningful fixes..)
In order to make this happen I guess we should start by compiling quickjs-sys on a 32 bit system and get a simple test case working.. also see if there is any difference when using quickjs-ng...
quickjs-ng
also fails. I'll see what I can do.
get it working on 32bit raspbian and get the windows action on github working