Giter Site home page Giter Site logo

Comments (9)

paazmaya avatar paazmaya commented on May 29, 2024 1

After updating to fix/mac-openssl branch, while having the esp toolchain active, the command cargo version has the following output on mac:

dyld: Library not loaded: /usr/local/opt/openssl@3/lib/libssl.3.dylib
  Referenced from: /Users/paazmaya/.rustup/toolchains/esp/bin/cargo
  Reason: image not found
Abort trap: 6

from espup.

tschundler avatar tschundler commented on May 29, 2024 1

Ack, found existing bug esp-rs/rust-build#157

For @paazmaya , using homebrew to install openssl is a work-around that is working for me. (All the LLVM stuff for xtensa is resole, right? So we shouldn't need a special toolchain much longer?)

from espup.

tschundler avatar tschundler commented on May 29, 2024

(I've copied the files over myself and have working cargo, but this could possibly block others)

from espup.

SergioGasquez avatar SergioGasquez commented on May 29, 2024

Hi @tschundler!

Thanks for reporting this issue, could you try the installation with the PR branch to verify that it solves the issue?

cargo install espup --git https://github.com/esp-rs/espup --branch fix/mac-openssl
espup install
. ~/export-esp.sh

from espup.

tschundler avatar tschundler commented on May 29, 2024

oops. I probably should have been more specific about running cargo.

I create a new esp32s3 project, eg

cargo generate --git https://github.com/esp-rs/esp-template -n esps3-test
cd esps3-test

then run

cargo version

and that's what isn't statically linked, when it uses cargo in ~/.espressif/dist/rust/rust-nightly-x86_64-apple-darwin/cargo/bin/cargo

$ otool -L ~/.espressif/dist/rust/rust-nightly-x86_64-apple-darwin/cargo/bin/cargo
/Users/ted/.espressif/dist/rust/rust-nightly-x86_64-apple-darwin/cargo/bin/cargo:
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59306.101.1)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1675.129.0)
        /usr/local/opt/openssl@3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
        /usr/local/opt/openssl@3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

(on an M1 mac, it's fine. otool -L ~/.espressif/dist/rust/rust-nightly-aarch64-apple-darwin/cargo/bin/cargo doesn't list libssl, libcrypto or libz, so they must be statically linked)

...digging more, /usr/local/opt/lib seems to be a homebrew thing, so I tried brew install openssl and that put it in the expected location. Still, it should probably be static linked.

I'm not sure who owns building that special nightly rust toolchain - maybe this bug should be in a different place?

from espup.

SergioGasquez avatar SergioGasquez commented on May 29, 2024

oops. I probably should have been more specific about running cargo.

I create a new esp32s3 project, eg

cargo generate --git https://github.com/esp-rs/esp-template -n esps3-test
cd esps3-test

then run

cargo version

and that's what isn't statically linked, when it uses cargo in ~/.espressif/dist/rust/rust-nightly-x86_64-apple-darwin/cargo/bin/cargo

$ otool -L ~/.espressif/dist/rust/rust-nightly-x86_64-apple-darwin/cargo/bin/cargo
/Users/ted/.espressif/dist/rust/rust-nightly-x86_64-apple-darwin/cargo/bin/cargo:
        /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
        /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59306.101.1)
        /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1675.129.0)
        /usr/local/opt/openssl@3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
        /usr/local/opt/openssl@3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
        /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
        /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

(on an M1 mac, it's fine. otool -L ~/.espressif/dist/rust/rust-nightly-aarch64-apple-darwin/cargo/bin/cargo doesn't list libssl, libcrypto or libz, so they must be statically linked)

...digging more, /usr/local/opt/lib seems to be a homebrew thing, so I tried brew install openssl and that put it in the expected location. Still, it should probably be static linked.

I'm not sure who owns building that special nightly rust toolchain - maybe this bug should be in a different place?

Sorry, is this the output of testing the fix/mac-openssl branch? In this branch, openssl should be statically linked

from espup.

tschundler avatar tschundler commented on May 29, 2024

The problem isn't with espup itself, but with the rust-nightly that espup installs. That cargo, that it puts in ~/.rustup/toolchains/esp/bin/cargo is what doesn't have openssl static linked.

The location it expects is where http://brew.sh puts it, not a standard MacOS location. I have no problem otherwise with cargo from https://rustup.rs/, only what espup installs.

Is there somewhere better for the bug to be?

from espup.

SergioGasquez avatar SergioGasquez commented on May 29, 2024

Is there somewhere better for the bug to be?

Probably, could you open up an issue in https://github.com/esp-rs/rust-build with your conclusions? I will still merge #153 as I think its an improvement

from espup.

SergioGasquez avatar SergioGasquez commented on May 29, 2024

Ack, found existing bug esp-rs/rust-build#157

Sorry I completely forgot about that issue, where I also participated

All the LLVM stuff for xtensa is resole, right? So we shouldn't need a special toolchain much longer?

Yes, the first 10 patches have now been accepted, hopefully, we will have Xtensa support in LLVM and Rust in the future!

from espup.

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.