Package Details: lib32-faudio 24.06-1

Git Clone URL: https://aur.archlinux.org/lib32-faudio.git (read-only, click to copy)
Package Base: lib32-faudio
Description: XAudio2 reimplementation
Upstream URL: https://github.com/FNA-XNA/FAudio/
Licenses: custom:zlib
Submitter: arojas
Maintainer: jorgicio
Last Packager: jorgicio
Votes: 14
Popularity: 1.18
First Submitted: 2024-02-03 09:46 (UTC)
Last Updated: 2024-06-02 20:52 (UTC)

Latest Comments

wallabra commented on 2024-08-26 15:30 (UTC)

You shouldn't require specifying GCC as the compiler, lest compiler flag errors arise (such as when Clang users specify -stdlib=libc++, which obviously isn't supported by GCC).

Here's a diff that fixes that:

diff --git a/PKGBUILD b/PKGBUILD
index e60ae3f..35c3ca4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,6 @@
 # Maintainer: Felix Yan <felixonmars@archlinux.org>
 # Contributor: Andrew Eikum
+# Contributor: Gustavo Ramos Rehermann <rehermann6046@gmail.com)

 pkgname=lib32-faudio
 pkgver=24.06
@@ -18,14 +19,16 @@ prepare() {
 }

 build() {
-  export CC="gcc -m32 -mstackrealign"
-  export CXX="g++ -m32 -mstackrealign"
+  CFLAGS+=" -m32 -mstackrealign"
+  export CC CFLAGS
   export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

   cd build
   cmake ../FAudio-$pkgver -G Ninja \
+    -DCMAKE_C_COMPILER="$CC" \
+    -DCMAKE_CXX_COMPILER="$CXX" \
     -DCMAKE_INSTALL_PREFIX=/usr \
-    -DCMAKE_BUILD_TYPE=Release \
+    -DCMAKE_BUILD_TYPE=None \
     -DCMAKE_INSTALL_LIBDIR=lib32
   # TODO:  -DFFMPEG=ON
   ninja

FabioLolix commented on 2024-05-07 15:35 (UTC)

why it is using '/home/erik/.local/bin/ninja' instead of /usr/bin/ninja` ?

toynbeeidea commented on 2024-05-07 14:47 (UTC)

CMake Error at CMakeLists.txt:28 (project):
  Running

   '/home/erik/.local/bin/ninja' '--version'

  failed with:

   Traceback (most recent call last):
    File "/home/erik/.local/bin/ninja", line 5, in <module>
      from ninja import ninja

  ModuleNotFoundError: No module named 'ninja'

ninja-1.11.1-3 is installed - if it needs some other form of "ninja," I don't know what it is.

para commented on 2024-02-15 20:11 (UTC) (edited on 2024-02-15 20:13 (UTC) by para)

When upgrading from 24.01 to 24.02 the build process with cmake can fail if you have cuda installed. It tries to use the cuda gcc and fails.

-- Check for working C compiler: /opt/cuda/bin/gcc
-- Check for working C compiler: /opt/cuda/bin/gcc - broken

CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/opt/cuda/bin/gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/<usr>/.cache/paru/clone/lib32-faudio/src/build/CMakeFiles/CMakeScratch/TryCompile-F9EnNZ'

    Run Build Command(s): /usr/bin/ninja -v cmTC_c7857
    [1/2] /opt/cuda/bin/gcc  -m32 -mstackrealign   -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/home/<usr>/.cache/paru/clone/lib32-faudio/src=/usr/src/debug/lib32-faudio -flto=auto -o CMakeFiles/cmTC_c7857.dir/testCCompiler.c.o -c /home/<usr>/.cache/paru/clone/lib32-faudio/src/build/CMakeFiles/CMakeScratch/TryCompile-F9EnNZ/testCCompiler.c
    [2/2] : && /opt/cuda/bin/gcc  -m32 -mstackrealign -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/home/<usr>/.cache/paru/clone/lib32-faudio/src=/usr/src/debug/lib32-faudio -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto   -rdynamic CMakeFiles/cmTC_c7857.dir/testCCompiler.c.o -o cmTC_c7857   && :
    FAILED: cmTC_c7857
    : && /opt/cuda/bin/gcc  -m32 -mstackrealign -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/home/<usr>/.cache/paru/clone/lib32-faudio/src=/usr/src/debug/lib32-faudio -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto   -rdynamic CMakeFiles/cmTC_c7857.dir/testCCompiler.c.o -o cmTC_c7857   && :
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/12.3.0/libgcc.a when searching for -lgcc
    /usr/bin/ld: cannot find -lgcc: No such file or directory
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/12.3.0/libgcc_s.so.1 when searching for libgcc_s.so.1
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/12.3.0/libgcc_s.so.1 when searching for libgcc_s.so.1
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/12.3.0/libgcc.a when searching for -lgcc
    /usr/bin/ld: cannot find -lgcc: No such file or directory
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

My work around was uninstalling cuda, updating, and reinstalling cuda.