crates-build-env icon indicating copy to clipboard operation
crates-build-env copied to clipboard

`libunwind-14-dev` breaks `libunwind` on Linux

Open OWissett opened this issue 2 years ago • 11 comments

I am attempting to add a package to the linux image.

During the process of building the image (with libc++-dev and libc++abi-dev added to packages.txt), I get an error saying:

#6 302.5 Some packages could not be installed. This may mean that you have
#6 302.5 requested an impossible situation or if you are using the unstable
#6 302.5 distribution that some required packages have not yet been created
#6 302.5 or been moved out of Incoming.
#6 302.5 The following information may help to resolve the situation:
#6 302.5 
#6 302.5 The following packages have unmet dependencies:
#6 302.6  libunwind-14-dev : Breaks: libunwind-dev
#6 302.6 E: Unable to correct problems, you have held broken packages.

I have seen on a thread on some other forum that Ubuntu 22.04 has issues with libunwind-14

Please advise on what action is needed, I am a bit lost...

OWissett avatar Feb 06 '23 12:02 OWissett

@jyn514 @Nemo157 what are your thoughts on this?

I have seen on a thread on some other forum that Ubuntu 22.04 has issues with libunwind-14

@OWissett what were the issues that were described? Depending on the actual issues it actually feels like this could be a problem.

Do other packages here depend on it?

I see a chance that it could be removed, depending on the above, following this comment related to the distro upgrade:

here's what I did last time I upgraded the image: For each package that's been removed in the new version,

* See which commit it was added in.
  a) If it was present all the way back to the initial commit, it's likely just what was installed on our server at the time and you can safely remove it.
  b) If it was explicitly added in a PR to this repo, post here pinging the author of the PR, and asking whether they still need the package.

and that libunwind was added in the initial commit ( edab36e7794bde1a66632741c27c755acc59ed64 ).

syphar avatar Feb 08 '23 20:02 syphar

@OWissett can you confirm that switching to libunwind14-dev doesn't break the build script for libunwind-sys (https://docs.rs/crate/libunwind-sys/latest/source/build.rs)? If so, this change seems ok to me.

I tried pinging the author of libunwind-sys, but they appear to have been banned from crates.io or something like that ... not sure how that's possible.

jyn514 avatar Feb 08 '23 20:02 jyn514

I think they changed github username (https://crates.io/users/anfedotoff), which hits a edgecase that docs.rs identifies crates.io accounts by username rather than userid and doesn't update them until a new version of the crate is published. (Interestingly we do show the new github username in the repository link because of the periodic repo-data updates).

Nemo157 avatar Feb 09 '23 09:02 Nemo157

Also, there's an upstream bug about this linked in https://github.com/rust-lang/crates-build-env/pull/121

Nemo157 avatar Feb 09 '23 09:02 Nemo157

@syphar This is where I have seen this similar problem reported: https://bugs.launchpad.net/ubuntu/+source/google-glog/+bug/1991919

OWissett avatar Feb 09 '23 12:02 OWissett

If we have libunwind-14-dev instead of libunwind-dev, then libgstreamer1.0-dev breaks:

#7 12.66 The following packages have unmet dependencies:
#7 12.74  libgstreamer1.0-dev : Depends: libunwind-dev

Same thing happens if you just delete the libunwind-dev package

OWissett avatar Feb 09 '23 13:02 OWissett

Ok, then I think we're blocked on the upstream bug.

jyn514 avatar Feb 09 '23 13:02 jyn514

It seems to work if I install libc++abi-dev and libc++-dev after installing all of the main packages, since it resolves the conflicts.

However, it looks like it is removing some packages and replacing them with other ones... I am not sure if this is an issue?

Do you know which crates depend on libgstreamer?

OWissett avatar Feb 09 '23 13:02 OWissett

The crate I working on freesasa-sys, works now when I build it locally using the docker image (as described at https://forge.rust-lang.org/docs-rs/add-dependencies.html)

I need to check that libgstreamer is working

OWissett avatar Feb 09 '23 14:02 OWissett

any progress made on this?

OWissett avatar Apr 10 '24 19:04 OWissett

no progress that I know of.

It would still need some figuring out if another combination of ubuntu packages can still compile the crates that need compiling. I believe it should be possible, but needs some trial & error.

syphar avatar Apr 15 '24 16:04 syphar