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/5.0: report Unknown OS 'gnueabi' while cross compile #24032

Closed
CryptonymAMS opened this issue May 20, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@CryptonymAMS
Copy link

Description

I was attempting to cross-compile some code on ubuntu using a cmd as
conan create . xxxx -pr:b default -pr:h rv1126 --build missing

the default profile is

[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]
[build_requires]
[env]

while the rv1126 profile is

[settings]
os=Linux
arch=armv7
compiler=gcc
compiler.version=8.3
compiler.libcxx=libstdc++11
build_type=Release

[build_requires]
rv1126/8.3.0@screenshare_public/stable

The combination of rv1126 profile will lead tools.get_gnu_triplet("Linux","armv7","gcc") to return gnueabi,but --target-os= option doesn't support it,then report Unknown OS 'gnueabi and stop compile.

The related code at conanfile.py(ffmpeg/5.0) is

       if tools.cross_building(self):
            if self._target_os == "emscripten":
                args.append("--target-os=none")
            else:
                args.append("--target-os={}".format(self._target_os))
   def _target_os(self):
        if self._is_msvc:
            return "win32"
        else:
            _, _, target_os = tools.get_gnu_triplet(
                "Macos" if tools.is_apple_os(
                    self.settings.os) else str(self.settings.os),
                str(self.settings.arch),
                str(self.settings.compiler) if self.settings.os == "Windows" else None,
            ).split("-")
            if target_os == "gnueabihf":
                target_os = "gnu" # could also be "linux"
            return target_os

Package and Environment Details

  • Package Name/Version: ffmpeg/5.0
  • Operating System+version: Linux Ubuntu 20.04
  • Compiler+version: GCC 8
  • Docker image: conanio/gcc8
  • Conan version: conan 1.58.0
  • Python version: Python 3.8.10

Conan profile

[settings]
os=Linux
arch=armv7
compiler=gcc
compiler.version=8.3
compiler.libcxx=libstdc++11
build_type=Release

[build_requires]
rv1126/8.3.0@screenshare_public/stable

Steps to reproduce

use cmd to cross-compile code which requiring ffmpeg/5.0
conan create . xxxx -pr:b default -pr:h rv1126 --build missing

The host profile is:

[settings]
os=Linux
arch=armv7
compiler=gcc
compiler.version=8.3
compiler.libcxx=libstdc++11
build_type=Release

Just like a simple demo following,it will return gnueabi which option "--target-os=" doesn't support:

target_os = tools.get_gnu_triplet("Linux","armv7","gcc")
print(target_os)

Logs

Click to expand log

ffmpeg/5.0: Applying build-requirement: rv1126/8.3.0@screenshare_public/stable
ffmpeg/5.0: Applying build-requirement: pkgconf/1.7.4
ffmpeg/5.0: WARN: Build folder is dirty, removing it: /home/hao/.conan/data/ffmpeg/5.0///build/e075b4f4491320467d8995247d10f1fe84c9d7ee
ffmpeg/5.0: Copying sources to build folder
ffmpeg/5.0: Building your package in /home/hao/.conan/data/ffmpeg/5.0///build/e075b4f4491320467d8995247d10f1fe84c9d7ee
ffmpeg/5.0: Aggregating env generators
ffmpeg/5.0: Calling build()
ffmpeg/5.0: Calling:

source_subfolder/configure '--pkg-config-flags=--static' '--disable-doc' '--enable-cross-compile' '--enable-asm' '--disable-shared' '--enable-static' '--enable-pic' '--disable-avdevice' '--enable-avcodec' '--disable-avformat' '--enable-swresample' '--disable-swscale' '--disable-postproc' '--disable-avfilter' '--disable-bzlib' '--disable-zlib' '--disable-lzma' '--disable-iconv' '--disable-libopenjpeg' '--disable-libopenh264' '--disable-libvorbis' '--disable-libopus' '--disable-libzmq' '--disable-sdl2' '--disable-libx264' '--disable-libx265' '--disable-libvpx' '--disable-libmp3lame' '--disable-libfdk-aac' '--disable-libwebp' '--disable-openssl' '--disable-alsa' '--disable-libpulse' '--disable-vaapi' '--disable-vdpau' '--disable-libxcb' '--disable-libxcb-shm' '--disable-libxcb-shape' '--disable-libxcb-xfixes' '--disable-appkit' '--disable-avfoundation' '--disable-coreimage' '--disable-audiotoolbox' '--disable-videotoolbox' '--disable-securetransport' '--disable-cuda' '--disable-cuvid' '--disable-nonfree' '--disable-gpl' '--disable-everything' '--disable-encoders' '--disable-decoders' '--disable-hwaccels' '--disable-muxers' '--disable-demuxers' '--disable-parsers' '--disable-bsfs' '--disable-protocols' '--disable-devices' '--disable-indevs' '--disable-outdevs' '--disable-filters' '--enable-decoder=aac' '--enable-decoder=alac' '--disable-muxer=True' '--disable-vulkan' '--arch=arm' '--disable-programs' '--as=arm-linux-gnueabihf-as' '--cc=arm-linux-gnueabihf-gcc' '--cxx=arm-linux-gnueabihf-g++' '--target-os=gnueabi' '--extra-cflags=' '--extra-ldflags=' '--prefix=/home/hao/.conan/data/ffmpeg/5.0///package/e075b4f4491320467d8995247d10f1fe84c9d7ee' '--bindir=${prefix}/bin' '--libdir=${prefix}/lib'
Unknown OS 'gnueabi'.

@CryptonymAMS CryptonymAMS added the bug Something isn't working label May 20, 2024
@CryptonymAMS
Copy link
Author

sorry my fault ,I pull old version code because of the local server cache.The lastest work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant