GithubHelp home page GithubHelp logo

Comments (13)

canfeit avatar canfeit commented on May 30, 2024 4

@nathansobo Don't consider build on Windows anymore?:sob::cry::sweat::cold_sweat::disappointed::u7533:

from xray.

nathansobo avatar nathansobo commented on May 30, 2024 3

Itโ€™s probably because weโ€™re using domain sockets to connect to the server. This is definitely solvable by switching to named pipes on windows, but their semantics are a bit different and so for now we decided to delay dealing with it. This is definitely an area where we wild accept a PR. Otherwise we will get to it once we make a bit more progress elsewhere.

from xray.

nathansobo avatar nathansobo commented on May 30, 2024 2

I'm going to close this out because we're going to make a pretty big shift in our architecture that will probably change the build situation. If after that change (some time next week) there are new issues building, feel free to reopen. Thanks again for your interest.

from xray.

arpit1997 avatar arpit1997 commented on May 30, 2024

I was getting the same error on my linux machine, I installed cargo and it solved the problem. Try installing and see if it works. @Ben3eeE

from xray.

Ben3eeE avatar Ben3eeE commented on May 30, 2024

Hey, thanks for the tip ๐Ÿ™‡ I do have cargo installed though:

I:\xray\xray\xray_electron> cargo --version
cargo 0.25.0 (96d8071da 2018-02-26)

Is there some step I need to perform with cargo to get it to build?

from xray.

arpit1997 avatar arpit1997 commented on May 30, 2024

check out #27 cargo and clang solved the above problem but getting new error

from xray.

itsnotvalid avatar itsnotvalid commented on May 30, 2024

Looks like the napi script wasn't run the correct working directory. For my installation on win 10, there is only xray (symlinked) in node_modues, and there is some Cargo.toml files in those places. However, the error message points to .\xray\xray_electron\node_modules\napi\, which the folder itself isn't there.

from xray.

Ben3eeE avatar Ben3eeE commented on May 30, 2024

Yeah. I think it's supposed to be .\xray\napi and not .\xray\xray_electron\node_modules\napi. I think this is because xray\xray_electron\node_modules\xray\Cargo.toml has ../napi as a dependency because it's symlinked from xray\xray_node.

Two other things I found:

  • clang/llvm is required and should probably be added to the contributing guide
  • The node include path is not going to be correct on Windows:

https://github.com/atom/xray/blob/8c67a8e887ccd3793e5c075644d91d0fe313e816/napi/scripts/napi.js#L22-L25

This is C:\Program Files\include\node? The node headers are not in that folder and I am not even sure if they are installed on Windows by default. At least when using the installer. So maybe this also needs to be documented. I haven't had time to check and see if I was able to build something correctly with clang/llvm and the node include path setup.

A lot of maybe and uncertainty from me because I haven't had time to dig into it. But hopefully this helps ๐Ÿ™‚

from xray.

itsnotvalid avatar itsnotvalid commented on May 30, 2024

Further down the road, the Cargo.toml defined the dependencies relative to the original location of the package, not the symbolic-linked one (../napi etc.). This caused cargo to complain not finding the deps.

So my workaround for now is, go to xray\xray_node, and you would notice that node_modules has been created, and run npm build-release there. Hopefully the next time you run it would compile.

from xray.

itsnotvalid avatar itsnotvalid commented on May 30, 2024

LoL @Ben3eeE I just stumbled on the include path problem. Definitely this won't work as the README says it was only tested on Mac OS. I don't think cargo would use any external compiler unless there has been any specific setups. Right now I am trying to figure out how to plug the src of node correctly.

from xray.

itsnotvalid avatar itsnotvalid commented on May 30, 2024

After manually setting up headers for node@v8, I tried various setups (like stable-msvc, stable-gnu, mingw64, etc.), for some reason cc-rs would bind to use particular compiler, yet I couldn't find a way to specify usage of clang. As such, they kept complaining the flag dynamic_lookup, e.g.:

gcc.exe: error: dynamic_lookup: No such file or directory

If there is any ways i can tell cc-rs to use clang, that would be very helpful.

from xray.

Ben3eeE avatar Ben3eeE commented on May 30, 2024

Maybe clang is not required on Windows? The cc-rs readme seems to indicate to use msvc. I only got the clang requirement from reading Linux/macOS comments.

The dynamic_lookup seems to come from:
https://github.com/atom/xray/blob/8c67a8e887ccd3793e5c075644d91d0fe313e816/napi/scripts/napi.js#L39

Which is part of platform specific arguments. Maybe these are incorrect on Windows?

It seems possible that can be are incorrect since it's not been tested on Windows yet. Just guessing since I have no experience and haven't tested myself yet ๐Ÿ˜€

from xray.

Ben3eeE avatar Ben3eeE commented on May 30, 2024

@canfeit If you still have issues building now that the architecture change is done I recommend you open a new issue with as much details as possible about the issue you are having. I haven't had the chance to test it myself yet.

from xray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.