Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] ffmpeg/4.4: Duplicate definition of variable 'includedir' in uuid.pc #11847

Closed
phamelin opened this issue Jul 21, 2022 · 5 comments · Fixed by #11813 or #11872
Closed

[package] ffmpeg/4.4: Duplicate definition of variable 'includedir' in uuid.pc #11847

phamelin opened this issue Jul 21, 2022 · 5 comments · Fixed by #11813 or #11872
Labels
bug Something isn't working Feedback please! Waiting for user response

Comments

@phamelin
Copy link

Package and Environment Details

  • Package Name/Version: ffmpeg/4.4
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: GCC 9
  • Conan version: conan 1.50.0
  • Python version: Python 3.8.10

Conan profile

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=9
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce

conanfile.txt:

[requires]
ffmpeg/4.4
libiconv/1.17

Force build from source:
conan install . --build=*

Logs

Click to expand log
ERROR: xorg/system: Error in package_info() method, line 100
        self._fill_cppinfo_from_pkgconfig(name)
while calling '_fill_cppinfo_from_pkgconfig', line 26
        libs = [lib[2:] for lib in pkg_config.libs_only_l]
        ConanException: pkg-config command ['pkg-config', '--libs-only-l', 'sm', '--print-errors'] failed with error: Command 'pkg-config --libs-only-l sm --print-errors' returned non-zero exit status 1.
Duplicate definition of variable 'includedir' in '/home/user/.conan/data/ffmpeg/4.4/_/_/build/7e1cb94107a337bac360e494179c05fdc2364919/uuid.pc'

Content of uuid.pc
$ cat /home/user/.conan/data/ffmpeg/4.4/_/_/build/7e1cb94107a337bac360e494179c05fdc2364919/uuid.pc
prefix=/home/user/.conan/data/xorg/system/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
includedir=/usr/include/uuid
exec_prefix=/usr
includedir=/usr/include
libdir=/usr/lib/x86_64-linux-gnu

Name: xorg-uuid
Description: Conan package: xorg-uuid
Version: 2.34.0
Libs: -luuid
Cflags: -I"${includedir}"

@phamelin phamelin added the bug Something isn't working label Jul 21, 2022
@ericLemanissier
Copy link
Contributor

Should be fixed by #11813

@ericLemanissier
Copy link
Contributor

The fix is merged. Can you please retry, and close this issue if everything is OK?

@uilianries uilianries added the Feedback please! Waiting for user response label Jul 22, 2022
@uilianries uilianries linked a pull request Jul 22, 2022 that will close this issue
4 tasks
@uilianries
Copy link
Member

ping @phamelin

@fnadeau
Copy link
Contributor

fnadeau commented Jul 22, 2022

I'm still new at using conan, but I have the same issue, even with #11813

Ubuntu 20.04 Build error output
ffmpeg/4.4: Aggregating env generators
ffmpeg/4.4: Calling build()
ffmpeg/4.4: Calling:
 > source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--enable-vulkan' '--arch=x86_64' '--extra-cflags=' '--extra-ldflags=' '--prefix=/root/.conan/data/ffmpeg/4.4/_/_/package/7e1cb94107a337bac360e494179c05fdc2364919' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' 
ERROR: libpulse not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
ffmpeg/4.4: 
ffmpeg/4.4: ERROR: Package '7e1cb94107a337bac360e494179c05fdc2364919' build failed
ffmpeg/4.4: WARN: Build folder /root/.conan/data/ffmpeg/4.4/_/_/build/7e1cb94107a337bac360e494179c05fdc2364919
ERROR: ffmpeg/4.4: Error in build() method, line 594
        autotools = self._configure_autotools()
while calling '_configure_autotools', line 570
        self._autotools.configure(
        ConanException: Error 1 while executing source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--enable-vulkan' '--arch=x86_64' '--extra-cflags=' '--extra-ldflags=' '--prefix=/root/.conan/data/ffmpeg/4.4/_/_/package/7e1cb94107a337bac360e494179c05fdc2364919' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib'

uuid.pc content

root@c2d71d1116d0:~/conanfile#  cat /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
prefix=/root/.conan/data/xorg/system/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
includedir=/usr/include/uuid
exec_prefix=/usr
includedir=/usr/include
libdir=/usr/lib/x86_64-linux-gnu

Name: xorg-uuid
Description: Conan package: xorg-uuid
Version: 2.34.0
Libs: -luuid 
Cflags: -I"${includedir}"

uuid.pc validation

root@c2d71d1116d0:~/conanfile# pkg-config --validate /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
Duplicate definition of variable 'includedir' in '/root/.conan/data/ffmpeg/4.4/_/_/build/7e1cb94107a337bac360e494179c05fdc2364919/uuid.pc'

Conan version

root@c2d71d1116d0:~/conanfile# conan --version
Conan version 1.50.0

Python version

root@c2d71d1116d0:~/conanfile# python3 --version
Python 3.8.10

System information

root@c2d71d1116d0:~/conanfile# uname -a
Linux c2d71d1116d0 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 x86_64 x86_64 x86_64 GNU/Linux

Step to reproduce inside ubuntu:20.04 container. Note that cat of uuid.pc had an accidental leading space, so it does not appear in history.

root@c2d71d1116d0:~/conanfile# history 
    1  apt update && DEBIAN_FRONTEND=noninteractive apt-get -y install python3-pip build-essential pkg-config cmake ninja-build libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libva-dev libvdpau-dev
    2  mkdir ~/conanfile/ && cd ~/conanfile/
    3  echo -e "[requires]\nffmpeg/4.4\nlibiconv/1.17\n" > conanfile.txt
    4  pip install conan
    5  conan install . --build=*
    6  pkg-config --validate /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
    7  conan --version
    8  python3 --version
    9  uname -a
   10  history 

patch #11813 is present

root@c2d71d1116d0:~/conanfile# grep pcfiledir /root/.conan/data/xorg/system/_/_/export/conanfile.py
            "\n".join("%s=%s" % (key, value) for key,value in variables.items() if key not in ["pcfiledir","prefix"]))

ffbuild/config.log has more info

root@c2d71d1116d0:~/conanfile# tail -n 3 /root/.conan/data/ffmpeg/4.4/_/_/build/*/ffbuild/config.log
pkg-config --exists --print-errors libpulse
Duplicate definition of variable 'includedir' in '/root/.conan/data/ffmpeg/4.4/_/_/build/7e1cb94107a337bac360e494179c05fdc2364919/uuid.pc'
ERROR: libpulse not found using pkg-config
Ubuntu 22.04 Build error output
ffmpeg/4.4: Aggregating env generators
ffmpeg/4.4: Calling build()
ffmpeg/4.4: Calling:
 > source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--enable-vulkan' '--arch=x86_64' '--extra-cflags=' '--extra-ldflags=' '--prefix=/root/.conan/data/ffmpeg/4.4/_/_/package/a395617d6d79b73eec71dcf988bb1f6cc80a72fc' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' 
ERROR: libpulse not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
ffmpeg/4.4: 
ffmpeg/4.4: ERROR: Package 'a395617d6d79b73eec71dcf988bb1f6cc80a72fc' build failed
ffmpeg/4.4: WARN: Build folder /root/.conan/data/ffmpeg/4.4/_/_/build/a395617d6d79b73eec71dcf988bb1f6cc80a72fc
ERROR: ffmpeg/4.4: Error in build() method, line 594
        autotools = self._configure_autotools()
while calling '_configure_autotools', line 570
        self._autotools.configure(
        ConanException: Error 1 while executing source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--disable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--enable-avdevice' '--enable-avcodec' '--enable-avformat' '--enable-swresample' '--enable-swscale' '--enable-postproc' '--enable-avfilter' '--enable-bzlib' '--enable-zlib' '--enable-lzma' '--enable-iconv' '--enable-libopenjpeg' '--enable-libopenh264' '--enable-libvorbis' '--enable-libopus' '--disable-libzmq' '--disable-sdl2' '--enable-libx264' '--enable-libx265' '--enable-libvpx' '--enable-libmp3lame' '--enable-libfdk-aac' '--enable-libwebp' '--enable-openssl' '--enable-alsa' '--enable-libpulse' '--enable-vaapi' '--enable-vdpau' '--enable-libxcb' '--enable-libxcb-shm' '--enable-libxcb-shape' '--enable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--enable-nonfree' '--enable-gpl' '--enable-vulkan' '--arch=x86_64' '--extra-cflags=' '--extra-ldflags=' '--prefix=/root/.conan/data/ffmpeg/4.4/_/_/package/a395617d6d79b73eec71dcf988bb1f6cc80a72fc' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib' 

uuid.pc content

root@babbd3286309:~/conanfile# cat /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
prefix=/root/.conan/data/xorg/system/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9
includedir=/usr/include/uuid
exec_prefix=/usr
includedir=/usr/include
libdir=/usr/lib/x86_64-linux-gnu

Name: xorg-uuid
Description: Conan package: xorg-uuid
Version: 2.37.2
Libs: -luuid 
Cflags: -I"${includedir}"

uuid.pc validation

root@babbd3286309:~/conanfile# pkg-config --validate /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
Duplicate definition of variable 'includedir' in '/root/.conan/data/ffmpeg/4.4/_/_/build/a395617d6d79b73eec71dcf988bb1f6cc80a72fc/uuid.pc'

Conan version

root@babbd3286309:~/conanfile# conan --version
Conan version 1.50.0

Python version

root@babbd3286309:~/conanfile# python3 --version
Python 3.10.4

System information

root@babbd3286309:~/conanfile# gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@babbd3286309:~/conanfile# uname -a
Linux babbd3286309 5.18.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 15 Jul 2022 15:33:02 +0000 x86_64 x86_64 x86_64 GNU/Linux

Step to reproduce inside ubuntu:22.04 container

root@babbd3286309:~/conanfile# history 
    1  apt update && DEBIAN_FRONTEND=noninteractive apt-get -y install python3-pip build-essential pkg-config cmake ninja-build libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libva-dev libvdpau-dev
    2  mkdir ~/conanfile/ && cd ~/conanfile/
    3  echo -e "[requires]\nffmpeg/4.4\nlibiconv/1.17\n" > conanfile.txt
    4  pip install conan
    5  conan install . --build=*
    6  cat /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
    7  pkg-config --validate /root/.conan/data/ffmpeg/4.4/_/_/build/*/uuid.pc
    8  conan --version
    9  python3 --version
   10  gcc --version
   11  uname -a
   12  history

patch #11813 is present

root@babbd3286309:~/conanfile# grep pcfiledir /root/.conan/data/xorg/system/_/_/export/conanfile.py
            "\n".join("%s=%s" % (key, value) for key,value in variables.items() if key not in ["pcfiledir","prefix"]))

ffbuild/config.log has more info

root@babbd3286309:~/conanfile# tail -n 3 /root/.conan/data/ffmpeg/4.4/_/_/build/*/ffbuild/config.log
pkg-config --exists --print-errors libpulse
Duplicate definition of variable 'includedir' in '/root/.conan/data/ffmpeg/4.4/_/_/build/a395617d6d79b73eec71dcf988bb1f6cc80a72fc/uuid.pc'
ERROR: libpulse not found using pkg-config

@ericLemanissier
Copy link
Contributor

thanks. I'm working on it in #11872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Feedback please! Waiting for user response
Projects
None yet
4 participants