Coder Social home page Coder Social logo

Comments (8)

messense avatar messense commented on August 16, 2024 1

Please provide more information, for example, operating system, rust version, cargo-xwin version and steps to reproduce the issue.

from cargo-xwin.

sansjack avatar sansjack commented on August 16, 2024

so i have been trying to debug this and have found that:
ureq = { version = "2.5.0", default-features = false, features = ["json"] }

seems to be using ring, so i have disabled default features.
now another error arises.

error: linker `link.exe` not found                                                                                                                                               |                                                                                                                                                                              = note: No such file or directory (os error 2)                                                                                                                               

note: the msvc targets depend on the msvc linker but `link.exe` was not found

note: please ensure that VS 2013, VS 2015, VS 2017, VS 2019 or VS 2022 was installed with the Visual C++ option

error: could not compile `sysinfo` due to previous error

from cargo-xwin.

sansjack avatar sansjack commented on August 16, 2024

running on aarch64 Linux 5.4.0-1078-oracle Ubuntu 18.04 bionic
rust version is 1.61.0 x-win newest version
i am running command cargo +nightly xwin build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-pc-windows-msvc --release
this is my docker file which it is being built though, i am building from an api response:

ARG RUST_VERSION=1.61.0

FROM rust:$RUST_VERSION as builder

ENV CARGO_NET_GIT_FETCH_WITH_CLI=true

RUN git clone https://github.com/messense/cargo-xwin.git

RUN touch  /cargo-xwin/src/lib.rs && \
    cargo build --manifest-path /cargo-xwin/Cargo.toml --release

RUN touch /cargo-xwin/src/lib.rs /cargo-xwin/src/bin/cargo-xwin.rs
RUN cargo build --manifest-path /cargo-xwin/Cargo.toml --release

FROM rust:$RUST_VERSION

RUN set -eux; \
    curl --fail https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor > /usr/share/keyrings/winehq.gpg; \
    echo "deb [signed-by=/usr/share/keyrings/winehq.gpg] https://dl.winehq.org/wine-builds/debian/ bullseye main" > /etc/apt/sources.list.d/winehq.list; \
    dpkg --add-architecture i386; \
    apt-get update && apt-get install --no-install-recommends -y clang winehq-staging; \
    apt-get remove -y --auto-remove; \
    rm -rf /var/lib/apt/lists/*;

RUN rustup toolchain install nightly && \
    rustup default nightly && \
    rustup target add x86_64-pc-windows-msvc && \
    rustup component add llvm-tools-preview && \
    rustup target add x86_64-unknown-linux-musl && \
    rustup component add rust-src --toolchain nightly-aarch64-unknown-linux-gnu && \
    rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-musl


COPY --from=builder /cargo-xwin/target/release/cargo-xwin /usr/local/cargo/bin/

EXPOSE 5000

RUN apt-get update -y
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt-get install build-essential -y
RUN apt-get install clang lldb lld -y
RUN apt install python3.9 -y
RUN apt-get install python3 -y
RUN apt-get install python3-pip -y
RUN apt-get install -y upx
RUN apt-get install musl-tools -y

ADD https://xxx:[email protected]/repos/sansjack02/s0ft-builder/git/refs/heads/main version.json

RUN git clone https://[email protected]/sansjack02/s0ft-builder.git

WORKDIR /s0ft-builder

RUN pip3 install -r requirements.txt

COPY dotenvs/builder.env .env

ENV FLASK_DEBUG=development

ENTRYPOINT [ "python3.9" ]

CMD ["builder.py"]

my toml file for the project being built

[profile.release]
debug = false
strip = "symbols"
opt-level = "z"
overflow-checks = true
debug-assertions = false
panic = "abort"
incremental = false

[build-dependencies]
build-data = "0.1"

[dependencies]
tokio-tungstenite = { version = "0.17", features = ["native-tls"] }
steamlocate = "1.0.1"
futures-channel = "0.3.21"
tokio = { version = "1.21", features = [
    "net",
    "rt",
    "sync",
    "time",
    "macros",
    "rt-multi-thread",
] }
futures = "0.3"
futures-util = "0.3"
serde_json = "1.0.81"
serde = { version = "1.0.137", features = ["derive"] }
ureq = { version = "2.5.0", default-features = false, features = ["json"] }
winreg = "0.10.1"
sysinfo = "0.26"
mac_address = "1.1.3"
hex = "0.4.3"
sha256 = "1.0.3"
enigo = "0.0.14"
winapi = { version = "0.3.9", features = [
    "handleapi",
    "processthreadsapi",
    "psapi",
    "winuser",
    "debugapi",
    "winuser",
] }
smbios-lib = "0.9.0"
json = "0.12.4"
rand = "0.8.5"
spin_sleep = "1.1.1"
glam = { version = "0.21.3", default-features = false, features = ["libm"] }
obfstr = "0.4.0"
wmi = "0.11.0"
pretty_env_logger = "0.4.0"
log = "0.4"

from cargo-xwin.

sansjack avatar sansjack commented on August 16, 2024

bump

from cargo-xwin.

messense avatar messense commented on August 16, 2024

Your reproduce steps are too complex and not complete, a minimal reproducible git repository would be much more helpful.

from cargo-xwin.

sansjack avatar sansjack commented on August 16, 2024

Your reproduce steps are too complex and not complete, a minimal reproducible git repository would be much more helpful.

i cannot really do this due to the project being private, you can see my docker file and project toml which is being compiled inside of the docker file is there anything in the edited dockerfile which is missing, or any packages which would causes link.exe error?

from cargo-xwin.

messense avatar messense commented on August 16, 2024

I don't see anything obviously, you need to dig deeper. link.exe isn't required by cargo-xwin because we use lld-link.

from cargo-xwin.

sansjack avatar sansjack commented on August 16, 2024

I don't see anything obviously, you need to dig deeper. link.exe isn't required by cargo-xwin because we use lld-link.

not sure why link.exe is attempting to be called then, do you know any reason from the top of your head?

from cargo-xwin.

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.