gentooLTO icon indicating copy to clipboard operation
gentooLTO copied to clipboard

media-video/pipewire-0.3.39 fails with -fno-semantic-interposition

Open pfwb opened this issue 4 years ago • 9 comments

Latest pipewire (0.3.39, still in ~arch) fails to build with -fno-semantic-interposition with:

FAILED: pipewire-v4l2/src/libpw-v4l2.so

Just adding a local override with *FLAGS-="-fno-semantic-interposition" works. I'm attaching the build.log just in case.

pfwb avatar Oct 24 '21 14:10 pfwb

I can confirm, I ran into this issue earlier today and I wasn't sure how to fix it, so this tip was much appreciated. The suggested override perfectly resolved the issue for me.

acjones8 avatar Oct 24 '21 15:10 acjones8

I can confirm this on my system too.

obi1 avatar Oct 26 '21 15:10 obi1

I bet it fails only for +v4l users. So >=media-video/pipewire-0.3.39 "has v4l ${IUSE//+} && use v4l && FlagSubAllFlags -fno-semantic-interposition" should keep semantic interposition enabled for users w/ -v4l use flag.

Also ref: #798

pchome avatar Oct 30 '21 00:10 pchome

I bet it fails only for +v4l users.

Actually, no. It still fails without the v4l USE flag (checked before submitting this issue). Apparently, there's a discussion about v4l2 for pipewire.

See https://bugs.gentoo.org/820116.

pfwb avatar Oct 30 '21 01:10 pfwb

I can confirm that it fails with USE=-v4l as well and it's working with -fno-semantic-interposition.

szaszm avatar Nov 09 '21 20:11 szaszm

I can confirm that it fails with USE=-v4l as well and it's working with -fno-semantic-interposition.

Were you able to compile with '-fno-semantic-interposition' or do you mean the flag filter is working?

jiblime avatar Nov 10 '21 02:11 jiblime

I bet it fails only for +v4l users.

Ok, bet lost, because there are more v4l* options (features) in the pipewire meson_options.txt file, and one attached to USE=v4l is not the one which disables pipewire-v4l2 (see https://bugs.gentoo.org/820116 for details).

Alternative solution (didn't checked if it actually work, but compiles w/ -fno-semantic-interposition):

--- a/pipewire-v4l2/src/v4l2-func.c
+++ b/pipewire-v4l2/src/v4l2-func.c
@@ -32,7 +32,7 @@
 
 #include "pipewire-v4l2.h"
 
-#define SPA_EXPORT __attribute__((visibility("default")))
+#define SPA_EXPORT __attribute__((visibility("protected")))
 
 #define extract_va_arg(type, arg, last)        \
 {                                      \

pchome avatar Nov 10 '21 03:11 pchome

Just adding a local override with

Can you tell me how exactly you did it? For me GentooLTO was working fine for the last 12 months, so I forget most of the details. Before, I had edited some files to get packages working, but then the next GentooLTO/git update failed, as files where modified. I think then I tried to delete the modified files, but indeed removed only some links instead. Somehow I managed to reinstall it, patched some files again, and it was working again. But that was a long time ago, early 2020 I guess.

StefanSalewski avatar Nov 10 '21 08:11 StefanSalewski

@StefanSalewski Add a new file to /etc/portage/package.cflags with contents similar to no-semantic-interposition.conf (from this repo), but for media-video/pipewire

e.g. /etc/portage/package.cflags/pipewire_workaround.conf:

media-video/pipewire *FLAGS-="${SEMINTERPOS}"  # https://github.com/InBetweenNames/gentooLTO/issues/796

szaszm avatar Nov 10 '21 09:11 szaszm