You are not logged in.

#1 2022-12-07 23:00:56

Aleksss
Member
Registered: 2022-12-06
Posts: 7

[SOLVED] 'ERROR: A failure occurred in build().'

So i'm trying to install gamemode trough AUR, and it is showing me this error message.

error: implicit declaration of function ‘pidfd_open’; did you mean ‘fdopen’? [-Werror=implicit-function-declaration]
   70 |                 int fd = pidfd_open(pid, 0);
      |                          ^~~~~~~~~~
      |                          fdopen
../gamemode-1.6/common/common-pidfds.c:70:26: warning: nested extern declaration of ‘pidfd_open’ [-Wnested-externs]
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

Thanks in advance for any responses.

Last edited by Aleksss (2022-12-08 00:00:42)

Offline

#2 2022-12-07 23:31:29

loqs
Member
Registered: 2014-03-06
Posts: 17,119

Re: [SOLVED] 'ERROR: A failure occurred in build().'

Offline

#3 2022-12-07 23:39:43

Aleksss
Member
Registered: 2022-12-06
Posts: 7

Re: [SOLVED] 'ERROR: A failure occurred in build().'

Here is the full output

==> Making package: gamemode 1.6-8 (Thu Dec  8 00:38:14 2022)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found gamemode-1.6.tar.xz
==> Validating source files with sha256sums...
    gamemode-1.6.tar.xz ... Passed
==> Extracting sources...
  -> Extracting gamemode-1.6.tar.xz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
Directory already configured.

Just run your build command (e.g. ninja) and Meson will regenerate as necessary.
If ninja fails, run "ninja reconfigure" or "meson setup --reconfigure"
to force Meson to regenerate.

If build failures persist, run "meson setup --wipe" to rebuild from scratch
using the same options as passed when configuring the build.
To change option values, run "meson configure" instead.
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /home/deafult/gamemode/src/build64
ninja: Entering directory `/home/deafult/gamemode/src/build64'
[1/8] Compiling C object common/libdaemon-common.a.p/common-pidfds.c.o
FAILED: common/libdaemon-common.a.p/common-pidfds.c.o 
cc -Icommon/libdaemon-common.a.p -Icommon -I../gamemode-1.6/common -I. -I../gamemode-1.6 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -O0 -g -fstack-protector -Wstrict-prototypes -Wundef -fno-common -Werror-implicit-function-declaration -Wformat-security -Werror=format-security -Wconversion -Wunreachable-code -Waggregate-return -Wunused -Warray-bounds -Wcast-align -Wclobbered -Wempty-body -Wformat=2 -Wformat-nonliteral -Wformat-signedness -Wignored-qualifiers -Wimplicit-function-declaration -Winit-self -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-parameter-type -Wnested-externs -Wno-discarded-qualifiers -Wno-missing-field-initializers -Wno-suggest-attribute=format -Wno-unused-parameter -Wold-style-definition -Woverride-init -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing=3 -Wstrict-prototypes -Wstringop-overflow -Wstringop-truncation -Wtype-limits -Wundef -Wuninitialized -Wunused-but-set-variable -Wwrite-strings -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIC -MD -MQ common/libdaemon-common.a.p/common-pidfds.c.o -MF common/libdaemon-common.a.p/common-pidfds.c.o.d -o common/libdaemon-common.a.p/common-pidfds.c.o -c ../gamemode-1.6/common/common-pidfds.c
../gamemode-1.6/common/common-pidfds.c: In function ‘open_pidfds’:
../gamemode-1.6/common/common-pidfds.c:70:26: error: implicit declaration of function ‘pidfd_open’; did you mean ‘fdopen’? [-Werror=implicit-function-declaration]
   70 |                 int fd = pidfd_open(pid, 0);
      |                          ^~~~~~~~~~
      |                          fdopen
../gamemode-1.6/common/common-pidfds.c:70:26: warning: nested extern declaration of ‘pidfd_open’ [-Wnested-externs]
cc1: some warnings being treated as errors
[2/8] Compiling C object common/liblib-common.a.p/common-pidfds.c.o
FAILED: common/liblib-common.a.p/common-pidfds.c.o 
cc -Icommon/liblib-common.a.p -Icommon -I../gamemode-1.6/common -I. -I../gamemode-1.6 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -O0 -g -fstack-protector -Wstrict-prototypes -Wundef -fno-common -Werror-implicit-function-declaration -Wformat-security -Werror=format-security -Wconversion -Wunreachable-code -Waggregate-return -Wunused -Warray-bounds -Wcast-align -Wclobbered -Wempty-body -Wformat=2 -Wformat-nonliteral -Wformat-signedness -Wignored-qualifiers -Wimplicit-function-declaration -Winit-self -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-parameter-type -Wnested-externs -Wno-discarded-qualifiers -Wno-missing-field-initializers -Wno-suggest-attribute=format -Wno-unused-parameter -Wold-style-definition -Woverride-init -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing=3 -Wstrict-prototypes -Wstringop-overflow -Wstringop-truncation -Wtype-limits -Wundef -Wuninitialized -Wunused-but-set-variable -Wwrite-strings -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIC -MD -MQ common/liblib-common.a.p/common-pidfds.c.o -MF common/liblib-common.a.p/common-pidfds.c.o.d -o common/liblib-common.a.p/common-pidfds.c.o -c ../gamemode-1.6/common/common-pidfds.c
../gamemode-1.6/common/common-pidfds.c: In function ‘open_pidfds’:
../gamemode-1.6/common/common-pidfds.c:70:26: error: implicit declaration of function ‘pidfd_open’; did you mean ‘fdopen’? [-Werror=implicit-function-declaration]
   70 |                 int fd = pidfd_open(pid, 0);
      |                          ^~~~~~~~~~
      |                          fdopen
../gamemode-1.6/common/common-pidfds.c:70:26: warning: nested extern declaration of ‘pidfd_open’ [-Wnested-externs]
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

and I am installing from "https://aur.archlinux.org/gamemode.git"

Offline

#4 2022-12-07 23:43:57

loqs
Member
Registered: 2014-03-06
Posts: 17,119

Re: [SOLVED] 'ERROR: A failure occurred in build().'

https://aur.archlinux.org/gamemode.git was removed from AUR as the package is in community.  When a package is removed from AUR the git repo is not removed,  so you are using an outdated PKGBUILD.
Is there a reason you want to build the package from source rather than using the built package in community?  Which does also build from source.

Last edited by loqs (2022-12-07 23:44:23)

Offline

#5 2022-12-07 23:52:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,343
Website

Re: [SOLVED] 'ERROR: A failure occurred in build().'

The function is defined in a conditional block based on the preprocessor macro HAVE_FN_PIDFD_OPEN.  This macro is defined in build-config.h which is created by the first meson command in the PKGBUILD.  I confirmed that deleting that MACRO from build-config.h allows this to build, but I have zero experience with meson.  I don't know what it's basing it's detection of HAVE_FN_PIDFD_OPEN on, but it seems to be getting false positive.

EDIT: nevermind - see above, use the package from [community]

Last edited by Trilby (2022-12-07 23:53:01)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2022-12-07 23:59:33

Aleksss
Member
Registered: 2022-12-06
Posts: 7

Re: [SOLVED] 'ERROR: A failure occurred in build().'

Oh ok, sorry for the trouble then. I'm still kinda in the stage where I sreach stuff like "How to do ... in Arch Linux" on google, and I was trying to optimize my build for gaming, and stumbled upon this Steam guide https://steamcommunity.com/sharedfiles/ … 1787799592. I did it with the new one, and it worked fine.
Thanks for the Help.

Offline

Board footer

Powered by FluxBB