diff mbox series

package/sentry-cli: fix build failure by bumping to 2.8.0

Message ID 20221026193606.3943977-1-thomas.petazzoni@bootlin.com
State Accepted
Headers show
Series package/sentry-cli: fix build failure by bumping to 2.8.0 | expand

Commit Message

Thomas Petazzoni Oct. 26, 2022, 7:36 p.m. UTC
For a very long time, host-sentry-cli has been failing to build with:

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
   --> /home/buildroot/autobuild/instance-2/output-1/build/host-sentry-cli-1.59.0/VENDOR/socket2/src/sockaddr.rs:176:9
    |
176 |         mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: source type: `SocketAddrV4` (48 bits)
    = note: target type: `sockaddr_in` (128 bits)

For more information about this error, try `rustc --explain E0512`.
error: could not compile `socket2` due to previous error

This socket2 create issue has apparently been fixed by upstream commit
https://github.com/rust-lang/socket2/commit/fd1565af4a82e765754d5baa3ff6e61a2627cabc,
as it removes/reworks the problematic code. This commit has been part
of socket2 since the 0.3.3 version, but sentry-cli 1.59.0 uses socket2
in version 0.3.2.

The next version of sentry-cli that has moved to a more recent
version of socket2 is 1.61.0, however this one also fails to build
with:

   Compiling sentry-cli v1.61.0 (/home/buildroot/buildroot/output/build/host-sentry-cli-1.61.0)
warning: fields `schemes` and `name` are never read
  --> src/utils/xcode.rs:41:5
   |
39 | pub struct XcodeProjectInfo {
   |            ---------------- fields in this struct
40 |     targets: Vec<String>,
41 |     schemes: Vec<String>,
   |     ^^^^^^^
42 |     configurations: Vec<String>,
43 |     name: String,
   |     ^^^^
   |
   = note: `#[warn(dead_code)]` on by default
   = note: `XcodeProjectInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

warning: `sentry-cli` (bin "sentry-cli") generated 1 warning
    Finished release [optimized] target(s) in 55.05s
  Installing /home/buildroot/buildroot/output/host/bin/sentry-cli
   Installed package `sentry-cli v1.61.0 (/home/buildroot/buildroot/output/build/host-sentry-cli-1.61.0)` (executable `sentry-cli`)

So we just gave up, and went for building the very lastest sentry-cli
version, 2.8.0, which apparently builds fine, at least in the
configurations that used to previously fail.

Yes, such a huge version bump is probably not ideal as a "minimal fix"
to backport on our stable branches, but that's probably the best we
can do without investing too much effort into this package that is
otherwise poorly maintained in Buildroot, as nobody stepped up to
address the issue even though it has been failing for months.

Fixes:

  http://autobuild.buildroot.net/results/883b83a5ee44206e0d67a30787bf5d60765ac1e4/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/sentry-cli/sentry-cli.hash | 2 +-
 package/sentry-cli/sentry-cli.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Petazzoni Oct. 30, 2022, 11:10 a.m. UTC | #1
On Wed, 26 Oct 2022 21:36:05 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> For a very long time, host-sentry-cli has been failing to build with:
> 
> error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
>    --> /home/buildroot/autobuild/instance-2/output-1/build/host-sentry-cli-1.59.0/VENDOR/socket2/src/sockaddr.rs:176:9  
>     |
> 176 |         mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
>     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     |
>     = note: source type: `SocketAddrV4` (48 bits)
>     = note: target type: `sockaddr_in` (128 bits)
> 
> For more information about this error, try `rustc --explain E0512`.
> error: could not compile `socket2` due to previous error
> 
> This socket2 create issue has apparently been fixed by upstream commit
> https://github.com/rust-lang/socket2/commit/fd1565af4a82e765754d5baa3ff6e61a2627cabc,
> as it removes/reworks the problematic code. This commit has been part
> of socket2 since the 0.3.3 version, but sentry-cli 1.59.0 uses socket2
> in version 0.3.2.
> 
> The next version of sentry-cli that has moved to a more recent
> version of socket2 is 1.61.0, however this one also fails to build
> with:
> 
>    Compiling sentry-cli v1.61.0 (/home/buildroot/buildroot/output/build/host-sentry-cli-1.61.0)
> warning: fields `schemes` and `name` are never read
>   --> src/utils/xcode.rs:41:5  
>    |
> 39 | pub struct XcodeProjectInfo {
>    |            ---------------- fields in this struct
> 40 |     targets: Vec<String>,
> 41 |     schemes: Vec<String>,
>    |     ^^^^^^^
> 42 |     configurations: Vec<String>,
> 43 |     name: String,
>    |     ^^^^
>    |
>    = note: `#[warn(dead_code)]` on by default
>    = note: `XcodeProjectInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
> 
> warning: `sentry-cli` (bin "sentry-cli") generated 1 warning
>     Finished release [optimized] target(s) in 55.05s
>   Installing /home/buildroot/buildroot/output/host/bin/sentry-cli
>    Installed package `sentry-cli v1.61.0 (/home/buildroot/buildroot/output/build/host-sentry-cli-1.61.0)` (executable `sentry-cli`)
> 
> So we just gave up, and went for building the very lastest sentry-cli
> version, 2.8.0, which apparently builds fine, at least in the
> configurations that used to previously fail.
> 
> Yes, such a huge version bump is probably not ideal as a "minimal fix"
> to backport on our stable branches, but that's probably the best we
> can do without investing too much effort into this package that is
> otherwise poorly maintained in Buildroot, as nobody stepped up to
> address the issue even though it has been failing for months.
> 
> Fixes:
> 
>   http://autobuild.buildroot.net/results/883b83a5ee44206e0d67a30787bf5d60765ac1e4/
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/sentry-cli/sentry-cli.hash | 2 +-
>  package/sentry-cli/sentry-cli.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/sentry-cli/sentry-cli.hash b/package/sentry-cli/sentry-cli.hash
index 73f818125f..3562199a82 100644
--- a/package/sentry-cli/sentry-cli.hash
+++ b/package/sentry-cli/sentry-cli.hash
@@ -1,3 +1,3 @@ 
 # locally calculated
-sha256  d687336379fd96c4ee73f24bd062d31672bd7453af53311b72977be3c8c78fef  sentry-cli-1.59.0.tar.gz
+sha256  fa06f9f47782713eef8a4f10b674e2375b9439360ab34b37558ec4b30ec84861  sentry-cli-2.8.0.tar.gz
 sha256  9503def7b54ceb6e3cd182fd59bc05d3a30d7eae481e65aaba4b495133c83c14  LICENSE
diff --git a/package/sentry-cli/sentry-cli.mk b/package/sentry-cli/sentry-cli.mk
index 58f5f1e325..15094c2d01 100644
--- a/package/sentry-cli/sentry-cli.mk
+++ b/package/sentry-cli/sentry-cli.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-SENTRY_CLI_VERSION = 1.59.0
+SENTRY_CLI_VERSION = 2.8.0
 SENTRY_CLI_SITE = $(call github,getsentry,sentry-cli,$(SENTRY_CLI_VERSION))
 SENTRY_CLI_LICENSE = BSD-3-clause
 SENTRY_CLI_LICENSE_FILES = LICENSE