-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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/7.0.1: cross compiling ffmpeg fails #26548
Comments
Thanks @jeroqui for reporting. This could be a gap in the Conan client too, not only in the recipe. If this needs fixing in Conan please @jcar87 or @uilianries let me know and we can try to improve the |
Hi @jeroqui - just a hunch, could you post the output of the following commands:
Thanks! |
Sure! Here you go @jcar87 . $ uname -a
Linux pop-os 6.8.0-76060800daily20240311-generic #202403110203~1711393930~22.04~331756a SMP PREEMPT_DYNAMIC Mon M x86_64 x86_64 x86_64 GNU/Linux $ file $(which x86_64-w64-mingw32-ld)
/usr/bin/x86_64-w64-mingw32-ld: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=34ddb65e57066e75453879ed0e1c8a94de1e74d7, for GNU/Linux 3.2.0, stripped What does your gut tell you? |
I pushed my various minor fixes related to cross-compilation I've found necessary to reliably cross-compile the ffmpeg recipe here: #26559 Give it a try, maybe that's enough to get it working. |
Hy @valgur . Thanks a lot for that! I set up a local conan repo to be able to test the recipe on the PR. But I'm getting this error now:
I tried setting the environment variable on both the build and host profile, and also in my terminal, but it's not working. It's probably a stupid question, but how am I supposed to configure that? Anyway. I tried hard-coding the variable in my cloned file (build_cc="cc"). And it got past that step. But it's crashing in the same spot as I reported in the start of the issue. |
Ugh, looks like that value is only set when the
See https://gist.github.com/valgur/5a550530a55b0df98016b89dbb25d861 for a more complete example. |
Description
I'm trying to install ffmpeg (and some other libraries, but ffmpeg alone fails too) with conan to cross compile from linux (ubuntu) to windows.
Conan throws an error on Running configure, inside build(). It says that
x86_64-w64-mingw32-gcc is unable to create an executable file.
.On the config log I discovered it's because of a flag when running tests for x86_64-w64-mingw32-ld.
I've tried to get conan to not add the -m64 flag, but I haven't been able to get it working. Setting env variables like LDFLAGS= doesn't seam to work either on the conan profile, on the conanfile.py or directly on my terminal. Any suggestions?
Package and Environment Details
Conan profile
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
compiler.exception=seh
compiler.threads=posix
os=Windows
[buildenv]
CC=x86_64-w64-mingw32-gcc
CXX=x86_64-w64-mingw32-g++
LD=x86_64-w64-mingw32-ld
CXXFLAGS=-D_WIN32_WINNT=0x0601
RC=x86_64-w64-mingw32-windres
WINDRES=x86_64-w64-mingw32-windres
RANLIB=x86_64-w64-mingw32-ranlib
Steps to reproduce
Running the suggested minimal conanfile.py from conancenter for ffmpeg with the profile I already pasted:
Logs
Running the command conan install . --build=missing -pr=windows
the end of config.log shows:
The text was updated successfully, but these errors were encountered: