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

Restore Windows support #38

Open
conradoplg opened this issue Aug 22, 2022 · 1 comment
Open

Restore Windows support #38

conradoplg opened this issue Aug 22, 2022 · 1 comment

Comments

@conradoplg
Copy link
Contributor

conradoplg commented Aug 22, 2022

#37 removed Windows support because it was requiring a lot of work but we don't support Windows in Zebra anyway.

Restore Windows support.

This is what I tried before giving up:

  • Windows require compiling and linking to bundlecache.c (I have no idea how it works on Linux)
    • That requires compiling and linking src/zcash/cache.cpp, which requires Boost, which is super annoying
    • If you comment out the parts of orchard_ffi.rs that don't handle orchard_bundle (i.e. orchard_batch_*) then you can get away with not including bundlechache.c. But that leads to other problems:
      • Running the test results in STATUS_ENTRYPOINT_NOT_FOUND which seems to be this.

        • To work around that, adding a manifest as described there using the embed-manifest crate results in
        error: invalid instruction `cargo:rustc-link-arg-bins` from build script of `zcash_script v0.1.6 (D:\a\zcash_script\zcash_script)`
        Error: The package zcash_script v0.1.6 (D:\a\zcash_script\zcash_script) does not have a bin target.
        Error: The process 'C:\Users\runneradmin\.cargo\bin\cargo.exe' failed with exit code 101
        

        The code I used was (it's also in windows-support-attempt branch)

        if std::env::var_os("CARGO_CFG_WINDOWS").is_some() {
            embed_manifest(
                new_manifest("zcash_script").dependency(AssemblyIdentity::new(
                    "Microsoft.Windows.Common-Controls",
                    [6, 0, 0, 0],
                    0x6595b64144ccf1df,
                )),
            )
            .expect("unable to embed manifest file");
        }
teor2345 pushed a commit that referenced this issue Aug 22, 2022
* delete previous version

* Squashed 'depend/zcash/' content from commit f98166f7f5

git-subtree-dir: depend/zcash
git-subtree-split: f98166f7f556ee9b9f597d45275c32843a87b0b6

* update to zcash 5.2.0

* remove Windows support for now, see #38
@oxarbitrage
Copy link
Contributor

I was making some quick tests here, it seems there are at least 4 undefined references that we need to fix to restore support:

  • undefined reference to `CFeeRate::GetFee(unsigned long long) const'
  • undefined reference to `CalculateConventionalFee(unsigned long long)'
  • undefined reference to `CalculateLogicalActionCount(std::vector<CTxIn, std::allocator > const&, std::vector<CTxOut, std::allocator > const&, unsigned int, unsigned int, unsigned int, unsigned int)'
  • undefined reference to `libzcash::NewBundleValidityCache(rust::cxxbridge1::Str, unsigned long long)'

https://github.com/ZcashFoundation/zcash_script/actions/runs/6502088364/job/17660515982#step:6:21482

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

2 participants