Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Issue with running example on windows-gnu #49

Closed
humphreylee opened this issue Mar 15, 2024 · 1 comment
Closed

Issue with running example on windows-gnu #49

humphreylee opened this issue Mar 15, 2024 · 1 comment

Comments

@humphreylee
Copy link
Contributor

Thanks for creating such a great crate. I tried to run your example on windows-gnu, but encountered error below. Upon tracing the error, there is no windows-gnu version of deno rusty. Not sure if I want to switch my rust to msvc version. Appreciate your help. Thanks.

Code:

use charming::{
    component::Legend,
    element::ItemStyle,
    series::{Pie, PieRoseType},
    Chart, ImageRenderer
};

fn main() {
    let chart = Chart::new()
        .legend(Legend::new().top("bottom"))
        .series(
            Pie::new()
                .name("Nightingale Chart")
                .rose_type(PieRoseType::Radius)
                .radius(vec!["50", "250"])
                .center(vec!["50%", "50%"])
                .item_style(ItemStyle::new().border_radius(8))
                .data(vec![
                    (40.0, "rose 1"),
                    (38.0, "rose 2"),
                    (32.0, "rose 3"),
                    (30.0, "rose 4"),
                    (28.0, "rose 5"),
                    (26.0, "rose 6"),
                    (22.0, "rose 7"),
                    (18.0, "rose 8"),
                ]),
        );

    let mut renderer = ImageRenderer::new(1000, 800);
    renderer.save(&chart, "/tmp/nightingale.svg");
}

Error messages

   Compiling if_chain v1.0.2
   Compiling lebe v0.5.2
error: failed to run custom build command for `v8 v0.81.0`

Caused by:
  process didn't exit successfully: `C:\Users\User1\elements\charm\rust\charming_ex1\target\debug\build\v8-37ec31db2e529d0e\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=.gn
  cargo:rerun-if-changed=BUILD.gn
  cargo:rerun-if-changed=src/binding.cc
  cargo:rerun-if-env-changed=CCACHE
  cargo:rerun-if-env-changed=CLANG_BASE_PATH
  cargo:rerun-if-env-changed=CXXSTDLIB
  cargo:rerun-if-env-changed=DENO_TRYBUILD
  cargo:rerun-if-env-changed=DOCS_RS
  cargo:rerun-if-env-changed=GN
  cargo:rerun-if-env-changed=GN_ARGS
  cargo:rerun-if-env-changed=HOST
  cargo:rerun-if-env-changed=NINJA
  cargo:rerun-if-env-changed=OUT_DIR
  cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
  cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
  cargo:rerun-if-env-changed=SCCACHE
  cargo:rerun-if-env-changed=V8_FORCE_DEBUG
  cargo:rerun-if-env-changed=V8_FROM_SOURCE
  cargo:rerun-if-env-changed=PYTHON
  cargo:rerun-if-env-changed=DISABLE_CLANG
  cargo:rerun-if-env-changed=EXTRA_GN_ARGS
  cargo:rerun-if-env-changed=NO_PRINT_GN_ARGS
  cargo:rustc-link-lib=static=rusty_v8
  cargo:rustc-link-lib=dylib=winmm
  cargo:rustc-link-lib=dylib=dbghelp
  download lockfile: "C:\\Users\\User1\\elements\\charm\\rust\\charming_ex1\\target\\debug\\build\\lib_download.fslock"
  static lib URL: https://github.com/denoland/rusty_v8/releases/download/v0.81.0/rusty_v8_release_x86_64-pc-windows-gnu.lib
  cargo:rustc-link-search=C:\Users\User1\elements\charm\rust\charming_ex1\target\debug\gn_out\obj
  Downloading https://github.com/denoland/rusty_v8/releases/download/v0.81.0/rusty_v8_release_x86_64-pc-windows-gnu.lib
  Downloading https://github.com/denoland/rusty_v8/releases/download/v0.81.0/rusty_v8_release_x86_64-pc-windows-gnu.lib...
  HTTP Error 404: Not Found
  Python downloader failed, trying with curl.

  --- stderr
  Traceback (most recent call last):
    File "C:\Users\User1\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.81.0\tools\download_file.py", line 64, in <module>
      sys.exit(main())
               ^^^^^^
    File "C:\Users\User1\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.81.0\tools\download_file.py", line 59, in main
      DownloadUrl(args.url, f)
    File "C:\Users\User1\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.81.0\tools\download_file.py", line 45, in DownloadUrl
      raise e
    File "C:\Users\User1\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.81.0\tools\download_file.py", line 29, in DownloadUrl
      response = urlopen(url)
                 ^^^^^^^^^^^^
    File "C:\Users\User1\msys2\clang64\lib\python3.11\urllib\request.py", line 216, in urlopen
      return opener.open(url, data, timeout)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\User1\msys2\clang64\lib\python3.11\urllib\request.py", line 525, in open
      response = meth(req, response)
                 ^^^^^^^^^^^^^^^^^^^
    File "C:\Users\User1\msys2\clang64\lib\python3.11\urllib\request.py", line 634, in http_response
      response = self.parent.error(
                 ^^^^^^^^^^^^^^^^^^
    File "C:\Users\User1\msys2\clang64\lib\python3.11\urllib\request.py", line 563, in error
      return self._call_chain(*args)
             ^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\User1\msys2\clang64\lib\python3.11\urllib\request.py", line 496, in _call_chain
      result = func(*args)
               ^^^^^^^^^^^
    File "C:\Users\User1\msys2\clang64\lib\python3.11\urllib\request.py", line 643, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 404: Not Found
  thread 'main' panicked at C:\Users\User1\.cargo\registry\src\index.crates.io-6f17d22bba15001f\v8-0.81.0\build.rs:431:3:
  assertion failed: status.success()
  stack backtrace:
     0:     0x7ff6c22e80da - std::backtrace_rs::backtrace::dbghelp::trace::h1e6812ea8adba5fb
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\..\..\backtrace\src\backtrace/dbghelp.rs:131:5
     1:     0x7ff6c22e80da - std::backtrace_rs::backtrace::trace_unsynchronized::hb8761428bdde6a3f
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\..\..\backtrace\src\backtrace/mod.rs:66:5
     2:     0x7ff6c22e80da - std::sys_common::backtrace::_print_fmt::ha78d891bef73c841
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common/backtrace.rs:68:5
     3:     0x7ff6c22e80da - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h0391ff925c868418
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common/backtrace.rs:44:22
     4:     0x7ff6c231ab3d - core::fmt::rt::Argument::fmt::h10da764d6b07683e
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\fmt/rt.rs:142:9
     5:     0x7ff6c231ab3d - core::fmt::write::h0d1a74662b4aa5bf
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\fmt/mod.rs:1120:17
     6:     0x7ff6c22de8ed - std::io::Write::write_fmt::h3d21beac8e0d2508
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\io/mod.rs:1810:15
     7:     0x7ff6c22e7f03 - std::sys_common::backtrace::_print::h9d61df6a0aa75173
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common/backtrace.rs:47:5
     8:     0x7ff6c22e7f03 - std::sys_common::backtrace::print::h7d2e30433fe4fbf0
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common/backtrace.rs:34:9
     9:     0x7ff6c22eacc9 - std::panicking::default_hook::{{closure}}::h31917a5ba9296998
    10:     0x7ff6c22ea9c8 - std::panicking::default_hook::h10d6ca42cdc89de3
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:292:9
    11:     0x7ff6c22eb3b8 - std::panicking::rust_panic_with_hook::ha7d78ac18835b62c
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:779:13
    12:     0x7ff6c22eb251 - std::panicking::begin_panic_handler::{{closure}}::h928711b767762e1f
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:649:13
    13:     0x7ff6c22e8879 - std::sys_common::backtrace::__rust_end_short_backtrace::h933c5e8d5174ab9e
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src\sys_common/backtrace.rs:171:18
    14:     0x7ff6c22eafd2 - rust_begin_unwind
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:645:5
    15:     0x7ff6c2317157 - core::panicking::panic_fmt::hc685bd5fdf74c15e
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src/panicking.rs:72:14
    16:     0x7ff6c2317212 - core::panicking::panic::haa5ab648900af052
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src/panicking.rs:144:5
    17:     0x7ff6c227b242 - build_script_build::download_file::h8f4cf28df0dbae98
    18:     0x7ff6c227b99c - build_script_build::download_static_lib_binaries::h88a22d18555d4de0
    19:     0x7ff6c2276e3c - build_script_build::main::ha511d5763763ac70
    20:     0x7ff6c228b4d6 - core::ops::function::FnOnce::call_once::h122611c92be75012
    21:     0x7ff6c2294279 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc272eadac412c9c7
    22:     0x7ff6c22888ac - std::rt::lang_start::{{closure}}::h59b8aadf7afc35d0
    23:     0x7ff6c22d1a14 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h9c9a98f97d582a39
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\core\src\ops/function.rs:284:13
    24:     0x7ff6c22d1a14 - std::panicking::try::do_call::hcdc83a0ea6591991
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:552:40
    25:     0x7ff6c22d1a14 - std::panicking::try::h5ea3e86c54fef019
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:516:19
    26:     0x7ff6c22d1a14 - std::panic::catch_unwind::h72ff0f43651fef39
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panic.rs:142:14
    27:     0x7ff6c22d1a14 - std::rt::lang_start_internal::{{closure}}::he26c620c3984b7f8
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/rt.rs:148:48
    28:     0x7ff6c22d1a14 - std::panicking::try::do_call::h2d75c103da858a58
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:552:40
    29:     0x7ff6c22d1a14 - std::panicking::try::h82d3d3826c0310a7
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panicking.rs:516:19
    30:     0x7ff6c22d1a14 - std::panic::catch_unwind::hc04bca4bf5b3cc1d
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/panic.rs:142:14
    31:     0x7ff6c22d1a14 - std::rt::lang_start_internal::h6cebd8dd02653fdc
                                 at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library\std\src/rt.rs:148:20
    32:     0x7ff6c2288887 - std::rt::lang_start::haa6170a8085366d2
    33:     0x7ff6c228047f - main
    34:     0x7ff6c22712ee - __tmainCRTStartup
                                 at C:\M\B\src\build-UCRT64\C:/M/B/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:267:15
    35:     0x7ff6c2271406 - mainCRTStartup
                                 at C:\M\B\src\build-UCRT64\C:/M/B/src/mingw-w64/mingw-w64-crt/crt\crtexe.c:188:9
    36:     0x7ffbd6ea257d - <unknown>
    37:     0x7ffbd84aaa58 - <unknown>
warning: build failed, waiting for other jobs to finish...

@humphreylee
Copy link
Contributor Author

humphreylee commented Mar 19, 2024

This issue is likely related to this issue. As workaround, I'm using HtmllRenderer to get the output.

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

No branches or pull requests

1 participant