conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
921 stars 1.66k forks source link

[bug] Pulseaudio and clang 15 #24464

Closed AyoubCoding21 closed 5 days ago

AyoubCoding21 commented 6 days ago

Describe the bug

When I installed SDL2 using the following conanfile.txt : conanfile.txt I get this error when installing pulseaudio (which i guess is a dependency of SDL2) :

-------- Installing package pulseaudio/14.2 (38 of 40) -------- pulseaudio/14.2: Building from source pulseaudio/14.2: Package pulseaudio/14.2:1260433354c123a61ea46be3c96de62cec0cdad8 pulseaudio/14.2: Copying sources to build folder pulseaudio/14.2: Building your package in /home/ayoub/.conan2/p/b/pulsecfe2f6cc77d88/b pulseaudio/14.2: Calling generate() pulseaudio/14.2: Generators folder: /home/ayoub/.conan2/p/b/pulsecfe2f6cc77d88/b/build-debug/conan pulseaudio/14.2: Generating aggregated env files pulseaudio/14.2: Generated aggregated env files: ['conanbuild.sh'] pulseaudio/14.2: Calling build() pulseaudio/14.2: RUN: "/home/ayoub/.conan2/p/b/pulsecfe2f6cc77d88/b/src/configure" --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' --enable-shared=no --enable-static=yes --enable-glib2=no --with-fftw=no '--with-udev-rules-dir=${prefix}/bin/udev/rules.d' --with-systemduserunitdir=/home/ayoub/.conan2/p/b/pulsecfe2f6cc77d88/b/build-debug/ignore --enable-alsa=yes --enable-x11=yes --enable-openssl=yes --enable-dbus=no '--libexecdir=${prefix}/bin' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether UID '1000' is supported by ustar format... yes checking whether GID '1000' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking whether to enable maintainer-specific portions of Makefiles... yes checking for stow... no checking whether make supports nested variables... (cached) yes checking whether ln -s works... yes checking for gcc... no checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking whether cc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of cc... gcc3 checking for g++... no checking for c++... c++ checking whether we are using the GNU C++ compiler... yes checking whether c++ accepts -g... yes checking dependency style of c++... gcc3 checking how to run the C preprocessor... cc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking whether cc needs -traditional... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define EXTENSIONS... yes checking whether c++ supports C++11 features by default... yes checking for gm4... /home/ayoub/.conan2/p/b/m416deb8b977426/p/bin/m4 checking pkg-config is at least version 0.9.0... yes checking for a sed that does not truncate output... /usr/bin/sed checking whether NLS is requested... yes checking for msgfmt... /home/ayoub/.conan2/p/b/getteed47e6938e715/p/bin/msgfmt checking for gmsgfmt... /home/ayoub/.conan2/p/b/getteed47e6938e715/p/bin/msgfmt checking for xgettext... /home/ayoub/.conan2/p/b/getteed47e6938e715/p/bin/xgettext checking for msgmerge... /home/ayoub/.conan2/p/b/getteed47e6938e715/p/bin/msgmerge checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking for ld used by cc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking host operating system... linux checking whether C compiler accepts -std=gnu11... no configure: error: *** Compiler does not support -std=gnu11

pulseaudio/14.2: ERROR: Package '1260433354c123a61ea46be3c96de62cec0cdad8' build failed pulseaudio/14.2: WARN: Build folder /home/ayoub/.conan2/p/b/pulsecfe2f6cc77d88/b/build-debug ERROR: pulseaudio/14.2: Error in build() method, line 126 autotools.configure() ConanException: Error 1 while executing

My compiler supports more than gnu11, it supports gun17

Here are my input profiles

======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Debug compiler=clang compiler.cppstd=gnu17 compiler.libcxx=libstdc++11 compiler.version=16 os=Linux

Profile build: [settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=gnu17 compiler.libcxx=libstdc++11 compiler.version=16 os=Linux

How to reproduce it

No response

franramirez688 commented 6 days ago

Hi @AyoubCoding21

Thanks for reporting this.

At first, I'd try to enter your compilers path within your input profile to ensure that they are being used instead of your default system ones:

[settings]
arch=x86_64
build_type=Debug
compiler=clang
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=16
os=Linux

[conf]
tools.build:compiler_executables={"c": "/path/to/clang-16", "cpp": "/path/to/clang++-16"}

Let me know if it worked. If not, we'll need to see if it's something related to the recipe itself to transfer this issue to conan-center-index repository.

AyoubCoding21 commented 6 days ago

where do i modify the profile

AyoubCoding21 commented 6 days ago

bc there are 2 profiles : a build and a host, which one should i modify

AyoubCoding21 commented 6 days ago

yeah it doesnt work still

franramirez688 commented 5 days ago

Sorry for the doubts. You are passing the same profiles to both, and I guess it's the default profile one. If you don't want to touch it, you can pass it through the CLI:

conan install . -c 'tools.build:compiler_executables={"c": "/path/to/clang-16", "cpp": "/path/to/clang++-16"}'

Anyway, if it's still failing, please, I need some details like:

AyoubCoding21 commented 5 days ago

Conan version : 2.5.0-dev Conan command : conan install . --output-folder="conan/deb" -sbuild_type=Debug --build=missing -pr ss

(ss is the profile you mentionned + path to the clang compiler)

Log trace :

-------- Installing package pulseaudio/14.2 (46 of 47) --------
pulseaudio/14.2: Building from source
pulseaudio/14.2: Package pulseaudio/14.2:9a6bdac61e0f151c66898e33ae2be67255d7f6f3
pulseaudio/14.2: Copying sources to build folder
pulseaudio/14.2: Building your package in /home/ayoub/.conan2/p/b/pulsef44be64380c23/b
pulseaudio/14.2: Calling generate()
pulseaudio/14.2: Generators folder: /home/ayoub/.conan2/p/b/pulsef44be64380c23/b/build-debug/conan
pulseaudio/14.2: Generating aggregated env files
pulseaudio/14.2: Generated aggregated env files: ['conanbuild.sh']
pulseaudio/14.2: Calling build()
pulseaudio/14.2: RUN: "/home/ayoub/.conan2/p/b/pulsef44be64380c23/b/src/configure" --disable-shared --enable-static --prefix=/ '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' --enable-shared=no --enable-static=yes --enable-glib2=no --with-fftw=no '--with-udev-rules-dir=${prefix}/bin/udev/rules.d' --with-systemduserunitdir=/home/ayoub/.conan2/p/b/pulsef44be64380c23/b/build-debug/ignore --enable-alsa=yes --enable-x11=yes --enable-openssl=yes --enable-dbus=no '--libexecdir=${prefix}/bin' 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for stow... no
checking whether make supports nested variables... (cached) yes
checking whether ln -s works... yes
checking for gcc... /usr/bin/clang-15
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/clang-15 accepts -g... yes
checking for /usr/bin/clang-15 option to accept ISO C89... none needed
checking whether /usr/bin/clang-15 understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /usr/bin/clang-15... gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/clang++-15 accepts -g... yes
checking dependency style of /usr/bin/clang++-15... gcc3
checking how to run the C preprocessor... /usr/bin/clang-15 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether /usr/bin/clang-15 needs -traditional... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether /usr/bin/clang++-15 supports C++11 features by default... yes
checking for gm4... /home/ayoub/.conan2/p/b/m416deb8b977426/p/bin/m4
checking pkg-config is at least version 0.9.0... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /home/ayoub/.conan2/p/b/gette7c36a41b1c1b8/p/bin/msgfmt
checking for gmsgfmt... /home/ayoub/.conan2/p/b/gette7c36a41b1c1b8/p/bin/msgfmt
checking for xgettext... /home/ayoub/.conan2/p/b/gette7c36a41b1c1b8/p/bin/xgettext
checking for msgmerge... /home/ayoub/.conan2/p/b/gette7c36a41b1c1b8/p/bin/msgmerge
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for ld used by /usr/bin/clang-15... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking host operating system... linux
checking whether C compiler accepts -std=gnu11... no
configure: error: *** Compiler does not support -std=gnu11

pulseaudio/14.2: ERROR: 
Package '9a6bdac61e0f151c66898e33ae2be67255d7f6f3' build failed
pulseaudio/14.2: WARN: Build folder /home/ayoub/.conan2/p/b/pulsef44be64380c23/b/build-debug
ERROR: pulseaudio/14.2: Error in build() method, line 126
    autotools.configure()
    ConanException: Error 1 while executing

conanfile.txt

conanfile.txt

AyoubCoding21 commented 5 days ago

ps in the conanfile, even if i use the new version of sdl2, it still fails with the same error

franramirez688 commented 5 days ago

Hi @AyoubCoding21

I got it finally. It's a known issue in pulseaudio: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268250

Let me transfer this issue to conan-center-index as it could be patched:

diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile
index 43031962dffd..4ff0c31f7b09 100644
--- a/[audio/pulseaudio/Makefile](https://cgit.freebsd.org/ports/tree/audio/pulseaudio/Makefile?id=78b04d8cc64fcd0f4c0f3f71f6b4c6490b7129e6)
+++ b/[audio/pulseaudio/Makefile](https://cgit.freebsd.org/ports/tree/audio/pulseaudio/Makefile?id=a968b5fd5ef3b5a20c5d507697e354cfa5d07743)
@@ -112,6 +112,7 @@ post-patch:
        -e 's|--directory|-d|g' \
        ${WRKSRC}/src/utils/pa-info
    @${REINPLACE_CMD} -e 's|-Wmissing-include-dirs||g' \
+       -e 's|main ()|main (void)|g' \
        ${WRKSRC}/configure

 pre-install-TEST-on: do-test

Thanks for reporting! 😁

AyoubCoding21 commented 5 days ago

So it's fixed ?

franramirez688 commented 5 days ago

@AyoubCoding21 I just opened a PR to workaround this: https://github.com/conan-io/conan-center-index/pull/24468

AyoubCoding21 commented 4 days ago

So, I can now conan install with no issues