All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Havelange <patrick.havelange@essensium.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/pkg-cargo.mk: make sure .cargo/config is used
Date: Wed, 16 Dec 2020 14:40:06 +0100	[thread overview]
Message-ID: <4337425c-31bd-fe1d-19d8-62bdb172ee97@essensium.com> (raw)
In-Reply-To: <20201210213122.035e149a@windsurf.home>

On 2020-12-10 21:31, Thomas Petazzoni wrote:
> Hello Patrick,

Hi,

> 
> On Thu, 10 Dec 2020 16:48:50 +0100
> Patrick Havelange <patrick.havelange@essensium.com> wrote:
> 
>> The way cargo searches for config file is based (among other rules)
>> on the current directory. This means that if cargo is started outside
>> of a package directory, its configuration file will not be taken
>> into account.
>> So just 'cd' into it before running cargo build/install
>>
>> This fix the issue where the build is failing in offline mode and
>> only the dl/package.tar.gz is available.
>>
>> Without this, it would have worked only if the CARGO_HOME cache had
>> been populated (by running cargo vendor for example).
>>
>> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
> 
> Thanks a lot! This does fix the "make ripgrep; make clean ripgrep"
> issue that Ryan reported. Also, for ripgrep, I no longer see anything
> being rebuilt during the install step, which is good.

glad it fixes those issues indeed.

> 
> *However*, for host-sentry-cli, even with this patch, quite a bit of
> stuff gets rebuilt during the install step. Here is how it goes:
> 
>>> host-sentry-cli 1.59.0 Extracting
> gzip -d -c /home/thomas/dl/sentry-cli/sentry-cli-1.59.0.tar.gz | tar --strip-components=1 -C /home/thomas/projets/buildroot/output/build/host-sentry-cli-1.59.0   -xf -
>>>> host-sentry-cli 1.59.0 Patching
>>>> host-sentry-cli 1.59.0 Configuring
>>>> host-sentry-cli 1.59.0 Building
> cd /home/thomas/projets/buildroot/output/build/host-sentry-cli-1.59.0 && PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/.rvm/bin:/home/thomas/.local/bin:/home/thomas/projets/git-wrappers" PKG_CONFIG="/home/thomas/projets/buildroot/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/thomas/projets/buildroot/output/host/lib/pkgconfig:/home/thomas/projets/buildroot/output/host/share/pkgconfig" RUSTFLAGS="-C link-args=-L/home/thomas/projets/buildroot/output/host/lib -C link-args=-Wl,-rpath,/home/thomas/projets/buildroot/output/host/lib" CARGO_HOME=/home/thomas/projets/buildroot/output/host/share/cargo cargo build --offline --release --manifest-path Cargo.toml --locked
>    
>     Compiling libc v0.2.71
>     Compiling cfg-if v0.1.10
>     Compiling autocfg v1.0.0
>     Compiling proc-macro2 v1.0.18

[snip]

>     Compiling git2 v0.13.6
>      Finished release [optimized] target(s) in 6m 10s
>>>> host-sentry-cli 1.59.0 Installing to host directory
> cd /home/thomas/projets/buildroot/output/build/host-sentry-cli-1.59.0 && PATH="/home/thomas/projets/buildroot/output/host/bin:/home/thomas/projets/buildroot/output/host/sbin:/home/thomas/sys/bin:/home/thomas/.gem/ruby/2.1.0/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/thomas/.rvm/bin:/home/thomas/.rvm/bin:/home/thomas/.local/bin:/home/thomas/projets/git-wrappers" PKG_CONFIG="/home/thomas/projets/buildroot/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/thomas/projets/buildroot/output/host/lib/pkgconfig:/home/thomas/projets/buildroot/output/host/share/pkgconfig" RUSTFLAGS="-C link-args=-L/home/thomas/projets/buildroot/output/host/lib -C link-args=-Wl,-rpath,/home/thomas/projets/buildroot/output/host/lib" CARGO_HOME=/home/thomas/projets/buildroot/output/host/share/cargo cargo install --offline --root /home/thomas/projets/buildroot/outpu
>   t/host --bins --path ./ --force --locked
>    Installing sentry-cli v1.59.0 (/home/thomas/projets/buildroot/output/build/host-sentry-cli-1.59.0)
>     Compiling syn v1.0.33
>     Compiling synstructure v0.12.4
>     Compiling pest_generator v2.1.3
>     Compiling serde_derive v1.0.114
>     Compiling failure_derive v0.1.8
>     Compiling scroll_derive v0.10.2
>     Compiling pest_derive v2.1.0
>     Compiling failure v0.1.8
>     Compiling which v3.1.1
>     Compiling scroll v0.10.1
>     Compiling runas v0.2.1
>     Compiling goblin v0.2.3
>     Compiling serde v1.0.114
>     Compiling sha1 v0.6.0
>     Compiling serde_json v1.0.56
>     Compiling bstr v0.2.13
>     Compiling chrono v0.4.11
>     Compiling url v2.1.1
>     Compiling string_cache v0.8.0
>     Compiling uuid v0.8.1
>     Compiling csv v1.1.3
>     Compiling globset v0.4.5
>     Compiling sourcemap v5.0.0
>     Compiling plist v0.5.5
>     Compiling anylog v0.5.0
>     Compiling git2 v0.13.6
>     Compiling elementtree v0.5.0
>     Compiling debugid v0.7.2
>     Compiling pdb v0.6.0
>     Compiling proguard v4.0.1
>     Compiling prettytable-rs v0.8.0
>     Compiling ignore v0.4.16
>     Compiling symbolic-common v7.5.0
>     Compiling sentry-types v0.14.1
>     Compiling symbolic-debuginfo v7.5.0
>      Building [====================================================>  ] 299/305: sentry-types, symbolic-debuginfo, ignore
> 
>     Compiling symbolic v7.5.0
>     Compiling sentry v0.18.1
>     Compiling sentry-cli v1.59.0 (/home/thomas/projets/buildroot/output/build/host-sentry-cli-1.59.0)
>      Finished release [optimized] target(s) in 2m 35s
>    Installing /home/thomas/projets/buildroot/output/host/bin/sentry-cli
>     Installed package `sentry-cli v1.59.0 (/home/thomas/projets/buildroot/output/build/host-sentry-cli-1.59.0)` (executable `sentry-cli`)
> 
> Any idea ?

Sadly no. I've spent some time trying various combinations of flags for 
cargo build & cargo install, without luck.

I've found this bug-report though : 
https://github.com/rust-lang/cargo/issues/8703 .

Since the first package being rebuild in this case is 'syn', I've looked 
at it and indeed it does make (non trivial) use of the [features] 
section inside its Cargo.toml. So maybe this can explain why syn is 
being rebuild (and also all similar packages and packages depending on 
those)?  I'm absolutely not sure of that explanation though.

> 
> Thomas
> 

Patrick H.

  reply	other threads:[~2020-12-16 13:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 21:36 [Buildroot] [PATCH next 00/12] Support for Cargo and Go vendoring Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 01/12] support/download/dl-wrapper: add concept of download post-processing Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 02/12] package/pkg-download.mk: add <pkg>_DOWNLOAD_POST_PROCESS variable Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 03/12] package/pkg-download.mk: add <pkg>_DL_ENV variable Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 04/12] support/download/post-process-helpers: add helper function for post process scripts Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 05/12] support/download/go-post-process: implement Go vendoring support Thomas Petazzoni
2020-11-25 20:28   ` Christian Stewart
2020-11-25 20:37     ` Thomas Petazzoni
2020-11-25 20:51       ` Christian Stewart
2020-11-25 20:45     ` Christian Stewart
2020-11-25 20:52       ` Thomas Petazzoni
2020-11-25 20:54         ` Christian Stewart
2020-11-25 21:02           ` Christian Stewart
2020-11-25 21:07   ` Ryan Barnett
2020-11-25 21:12     ` Christian Stewart
2020-11-25 21:21       ` Christian Stewart
2020-11-25 21:49         ` Ryan Barnett
2020-11-19 21:36 ` [Buildroot] [PATCH next 06/12] package/tinifier: new package Thomas Petazzoni
2020-11-21 16:37   ` Ryan Barnett
2020-11-21 18:04     ` Yann E. MORIN
2020-11-22  6:08       ` Christian Stewart
2020-11-22 20:25         ` Sam Voss
2020-11-23 14:48       ` Ryan Barnett
2020-12-10 21:46       ` Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 07/12] package/pkg-cargo.mk: introduce the cargo package infrastructure Thomas Petazzoni
2020-11-25 19:46   ` Ryan Barnett
2020-11-25 20:35     ` Thomas Petazzoni
2020-12-10 15:48   ` [Buildroot] [PATCH 1/1] package/pkg-cargo.mk: make sure .cargo/config is used Patrick Havelange
2020-12-10 20:31     ` Thomas Petazzoni
2020-12-16 13:40       ` Patrick Havelange [this message]
2020-12-16 17:33         ` Sam Voss
2020-12-16 13:58   ` [Buildroot] [PATCH next 07/12] package/pkg-cargo.mk: introduce the cargo package infrastructure Patrick Havelange
2020-12-16 14:23     ` Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 08/12] docs/manual/cargo: document the cargo-package infrastructure Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 09/12] package/ripgrep: convert to cargo infrastructure Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 10/12] package/sentry-cli: convert to host-cargo-package infrastructure Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 11/12] support/download/cargo-post-process, package/pkg-cargo.mk: enable vendoring for Cargo packages Thomas Petazzoni
2020-11-19 21:36 ` [Buildroot] [PATCH next 12/12] docs/manual/adding-packages-cargo.txt: rewrite explanation about dependency management Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4337425c-31bd-fe1d-19d8-62bdb172ee97@essensium.com \
    --to=patrick.havelange@essensium.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.