GithubHelp home page GithubHelp logo

Comments (4)

N3xed avatar N3xed commented on June 16, 2024 1

However, I'm fairly sure that's only happening because of a bug with Cargo Workspaces, where the target set in config.toml is not respected (so it was trying to build for x86_64-unknown-linux-gnu, rather than xtensa-esp32s2-espidf).

That's strange.

From my understanding, OUT_DIR would only be set like above if $HOST == $TARGET.

Ahh so it was like that, there's actually a FIXME in the code for this already. I'll fix it for the next release.

I think it's pretty unlikely that someone's building on an ESP32, right?

Haven't thought about that, but I guess embuild could be used for other targets where this could be the case. We were just unlucky with this bug I guess.

Are you accepting PRs for embuild? If so, I'd be happy to make one.

Sure we do. But this is so minor, I'll fix it right now.

from esp-idf-sys.

N3xed avatar N3xed commented on June 16, 2024

Yeah, a bug like this was destined to pop out.

Currently, we get the workspace directory by popping 6 folders off of esp-idf-sys's out dir in the hopes that this lands us outside of the target (i.e. the build) directory.

Could you verify why this doesn't work in your case?

from esp-idf-sys.

ryanc-me avatar ryanc-me commented on June 16, 2024

So, I've done a bit more digging. It looks like OUT_DIR was sometimes set like this (note the missing target triple):

/opt/esp32s2-workspace/target/debug/build/esp-idf-sys-79af92772c653ed1/out/

However, I'm fairly sure that's only happening because of a bug with Cargo Workspaces, where the target set in config.toml is not respected (so it was trying to build for x86_64-unknown-linux-gnu, rather than xtensa-esp32s2-espidf).

From my understanding, OUT_DIR would only be set like above if $HOST == $TARGET. I think it's pretty unlikely that someone's building on an ESP32, right?

For what it's worth, I think there are maybe two options to fix the "problem":

  • Check if $TARGET == $HOST in workspace_dir(), and if so, only pop(5).
  • Loop while doing pop(1) until you land in a dir named target, whose parent contains a Cargo.toml, then jump up one more directory.

Are you accepting PRs for embuild? If so, I'd be happy to make one.

from esp-idf-sys.

N3xed avatar N3xed commented on June 16, 2024

Fixed with version 0.30.0

from esp-idf-sys.

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.