Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Cross building packages with `libgomp-devel` in makedepends breaks the masterdir
@ 2021-05-21 18:36 ericonr
  2021-12-28  3:54 ` tornaria
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ericonr @ 2021-05-21 18:36 UTC (permalink / raw)
  To: ml

[-- 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-05 10:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 18:36 [ISSUE] Cross building packages with `libgomp-devel` in makedepends breaks the masterdir ericonr
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
2024-02-05 10:43 ` oreo639
2024-02-05 10:43 ` oreo639

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).