NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.6k stars 13.76k forks source link

obs-studio-plugins fail to build on aarch64 with CMake bug #270050

Open hufman opened 10 months ago

hufman commented 10 months ago

Describe the bug

A clear and concise description of what the bug is.

Steps To Reproduce

Steps to reproduce the behavior:

  1. On an aarch64 system: NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-shell -p obs-studio-plugins.wlrobs

Expected behavior

I expect the derivation to build successfully, though I understand a proper plugin install uses a wrapper module.

Screenshots

Each source file in the plugin fails with a similar error:

[1/7] Compiling C object libwlrobs.so.p/proto_xdg-output-unstable-v1-protocol.c.o
FAILED: libwlrobs.so.p/proto_xdg-output-unstable-v1-protocol.c.o
gcc -Ilibwlrobs.so.p -I. -I.. -I../inc -I/nix/store/0376lpmly2yz9gl1ii524zhj7qlc3plc-wayland-1.22.0-dev/include -I/nix/store/48yr6rpqg4h6a5xh53bijfn1542agfzy-obs-studio-29.0.2/include/obs -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -DENABLE_SCPY -D_GNU_SOURCE -DENABLE_DMABUF -fPIC -DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP '$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' '$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' -MD -MQ libwlrobs.so.p/proto_xdg-output-unstable-v1-protocol.c.o -MF libwlrobs.so.p/proto_xdg-output-unstable-v1-protocol.c.o.d -o libwlrobs.so.p/proto_xdg-output-unstable-v1-protocol.c.o -c ../proto/xdg-output-unstable-v1-protocol.c
gcc: warning: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file unused because linking not done
gcc: error: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file not found: No such file or directory
gcc: warning: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file unused because linking not done
gcc: error: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file not found: No such file or directory

Additional context

I understand aarch64-linux is not a supported platform, even by upstream obs-studio. I found this patch in Alpine which applies successfully against nixpkgs-23.11 and works for me via overlay. Can someone more familiar with OBS confirm if this patch is valid and useful? If desired, I could work it into a PR to hopefully increase support for this architecture.

Notify maintainers

@jb55 @MP2E @V @miangraham

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

hufman@nixos:~/.config/home-manager$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-linux"`
 - host os: `Linux 5.10.66, NixOS, 23.05 (Stoat), 23.05.20231116.9fb1225`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.6`
 - channels(hufman): `"home-manager-23.05.tar.gz"`
 - channels(root): `"nixos-23.05, nixos-23.11-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Priorities

Add a :+1: reaction to issues you find important.

hufman commented 8 months ago

Just tested, and it is still present when compiling plugins against OBS-Studio 30.0.2 (nixpkgs rev a64d9bf4)