Git Product home page Git Product logo

Comments (5)

kirans-bp avatar kirans-bp commented on May 20, 2024 2

Thanks for the quick fix @Equanox. It works now

from bob.

Equanox avatar Equanox commented on May 20, 2024 1

Thx, we could reproduce the issue on another M1. It doesn't appear on Linux. Looks like there is indeed a difference between using nix-shell and bob. We'll try to provide a solution asap.

from bob.

Equanox avatar Equanox commented on May 20, 2024

Hey Kirans, thx for creating this issue. You're doing it right, the dependencies are defined correctly.

I tried to setup a very basic rust project using cargo 1.60.0 & serde on linux, though i couldn't reproduce the error. Guess my project was too basic to reproduce.

This is the bob.yaml I used.

build:
  build: 
    cmd: |
      cd hello_cargo && cargo run
    rebuild: always

dependencies:
  - cargo

And it worked out well, here is the output.

$:~/rustserde$ bob build 
Running task build with 0 dependencies
Using 16 workers

build	      Finished dev [unoptimized + debuginfo] target(s) in 0.01s
build	       Running `target/debug/hello_cargo`
build	  serialized = {"x":1,"y":2}
build	  deserialized = Point { x: 1, y: 2 }
build	...done

● ● ● ●
Ran 1 tasks in 30.3ms
  build              	✔       	(30.3ms)

You can compare environments directly by adding env to the bob build task. This will show you the used dependencies when looking at the PATH.

Can you give me some more information to reproduce your issue? bob version, your system?

from bob.

kirans-bp avatar kirans-bp commented on May 20, 2024

Hi I'm on a Macbook M1. I'm trying to reproduce this issue step by step with a small project and documenting below

bob.yaml

dependencies:
  - cargo

build:
  build:
    cmd: cargo run
    rebuild: always

Cargo.toml

[package]
name = "bobb"
version = "0.1.0"
edition = "2021"

[dependencies]
eyre = "*"

src/main.rs

fn main() -> eyre::Result<()> {
    println!("Hello, world!");
    Ok(())
}

With the above basic setup, the first error I get is

build             error: linker `cc` not found
build               |
build               = note: No such file or directory (os error 2)
build
build             error: could not compile `eyre` due to previous error
build             warning: build failed, waiting for other jobs to finish...

I add clang_13 and rebuild, which gives me

build                Compiling eyre v0.6.8
build             error: linking with `cc` failed: exit status: 1
build               |
build               = note: "cc" "-arch" "arm64" "/tmp/rustc1IKfS7/symbols.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.0.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.1.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.10.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.11.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.12.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.13.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.14.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.15.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.2.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.3.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.4.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.5.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.6.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.7.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.8.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.build_script_build.950b1ec5-cgu.9.rcgu.o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7.k09is1w0h23ctk1.rcgu.o" "-L" "/private/tmp/bobb/target/debug/deps" "-L" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libstd-08068d401c25d211.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-84be07e68b9d00f4.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libobject-4804c562fc61a807.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-279301e6a5d99fea.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-fbfb344f09805b90.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libgimli-616191dd1d974165.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-4687ef078813d96d.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-1386b7e41dd1fd86.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-26b1aa4af9d5f07a.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-8a7d5d906c81e365.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libadler-327750ded6594992.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-b801be618a24f1bf.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libunwind-fa75ed5f72174942.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-adf0011e71898575.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/liblibc-3d5bcaabca1cfe44.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/liballoc-cd287cf1e41c0ec4.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-d99e291378cbf0b8.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libcore-fcdbad0d5b23b740.rlib" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-9ba449e7b506e8b4.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/4cv7zfwcagivr385ww5x4s3scy22infp-rustc-1.64.0/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/private/tmp/bobb/target/debug/build/eyre-d51eb41dd982e1e7/build_script_build-d51eb41dd982e1e7" "-Wl,-dead_strip" "-nodefaultlibs"
build               = note: ld: library not found for -liconv
build                       clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
build
build
build             error: could not compile `eyre` due to previous error

I add libiconv and rebuild. It gives me the same error as above.

I'm wondering if its because I'm on M1?

This is my final bob.yaml

dependencies:
  - cargo
  - clang_13
  - libiconv

build:
  build:
    cmd: cargo run
    rebuild: always
» bob --version
bob version 0.6.2 darwin/arm64

from bob.

Equanox avatar Equanox commented on May 20, 2024

@kirans-bp the 0.6.3 release should fix your issue. We are now making sure the environment is similar to the one genrated by nix-shell, introduced in #251 . Can you double check if the fix works for you?

from bob.

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.