Github messages for voidlinux
 help / color / mirror / Atom feed
From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [ISSUE] Cross building packages with `libgomp-devel` in makedepends breaks the masterdir
Date: Fri, 21 May 2021 20:36:13 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31055@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 2917 bytes --]

New issue by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/31055

Description:
From `xlocate libgomp.spec`:

```
[...]
cross-x86_64-linux-musl-libc-0.34_1     /usr/x86_64-linux-musl/usr/lib/libgomp.spec
libgomp-devel-10.2.1pre1_3      /usr/lib/libgomp.spec
```

`makedepends` are installed in the cross root after the cross toolchain is installed in the host, which means `libgomp-devel` replaces `libgomp.spec` from the cross toolchain. Then, when the dependencies are removed, all the `usr/lib/libgomp*` files are removed, leaving the cross toolchain broken (`xbps-pkgdb` complains).

@q66 suggested fixing this by adding `libgomp` related stuff to `cross-vpkg-dummy`, so that it would be resolved to `cross-vpkg-dummy`, but that doesn't fix things, since it apparently breaks how XBPS resolves libraries (might be a xbps bug too, @Chocimier and @Duncaen):

My patch:

```diff
diff --git a/srcpkgs/cross-vpkg-dummy/template b/srcpkgs/cross-vpkg-dummy/template
index 9de559bce0..a0125a8ef9 100644
--- a/srcpkgs/cross-vpkg-dummy/template
+++ b/srcpkgs/cross-vpkg-dummy/template
@@ -1,6 +1,6 @@
 # Template file for 'cross-vpkg-dummy'
 pkgname=cross-vpkg-dummy
-version=0.37
+version=0.38
 revision=1
 build_style=meta
 short_desc="Dummy meta-pkg for cross building packages with xbps-src"
@@ -23,6 +23,8 @@ provides="
 	libgfortran-devel-9999_1
 	libgo-9999_1
 	libgo-devel-9999_1
+	libgomp-9999_1
+	libgomp-devel-9999_1
 	libobjc-9999_1
 	libobjc-devel-9999_1
 	gcc-9999_1
@@ -44,6 +46,8 @@ conflicts="
 	libgfortran-devel>=0
 	libgo>=0
 	libgo-devel>=0
+	libgomp>=0
+	libgomp-devel>=0
 	libobjc>=0
 	libobjc-devel>=0
 	gcc>=0
@@ -56,6 +60,7 @@ shlib_provides="
 	libgcc_s.so.1
 	libgnat-10.so
 	libgnarl-10.so
+	libgomp.so.1
 	libstdc++.so.6
 	libgfortran.so.5"
 ```

Result of trying to install something and a package that's replaced by `cross-vpkg-dummy` (this is what happens in the `makedepends` install step):

```
<bps-install -c host/repocache-aarch64-musl/ -r usr/aarch64-linux-musl/ alsa-lib libgomp-devel
acl-2.3.1_1: broken, unresolvable shlib `libc.so'
alsa-lib-1.2.4_2: broken, unresolvable shlib `libc.so'
Transaction aborted due to unresolved shlibs.
```

This would lead me to assume there's a limitation in how `cross-vpkg-dummy` works in that you can't use it to replace things in `makedepends`, and, furthermore, that our unusual split of "full featured cross toolchains" and "separate subpackage for each feature in native toolchains"  leads to breakage in this scenario.

This can also be observed if one removes `nocross` from `gnustep-base`, where it also fails in the `makedepends` installation step due to `libobjc-devel`.

A heavy handed solution is adding such libraries to `hostmakedepends` or conditionally to `makedepends` only when not cross building, but that's very ugly.

             reply	other threads:[~2021-05-21 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 18:36 ericonr [this message]
2021-12-28  3:54 ` tornaria
2021-12-28  3:58 ` tornaria
2022-01-04  8:18 ` ericonr
2022-01-10 14:38 ` tornaria
2022-01-13 19:37 ` Chocimier
2022-05-20  2:12 ` github-actions

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31055@inbox.vuxu.org \
    --to=ericonr@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).