-
Notifications
You must be signed in to change notification settings - Fork 970
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
[question] ffmpeg/6.1.1 dependancies and PKG_CONFIG #16963
Comments
Hi @TrevorCash Thanks for your question. Could you please clarify a bit more |
Hi @memsharded , Here is the error I get when enabling libx265. I initially had nothing disabled and continued to see a pkg-config error like this. So I disabled from the top of the list to the bottom untill I could get a error -free build:
|
Ok, thanks for the feedback. It would be nice to see your full profile info, also, any other special configuration that you might be using (is it a regular terminal?) Because in my current Windows, msvc 2022, there are binary packages in ConanCenter, so I don't need to build from source. So basically |
I use a gitbash terminal. The other dependancies built locally without issue. I first call conan profile detect to get the default profile: The command I run is actually this from within a bash script: conan install .. --output-folder=. --build=missing -s build_type=$BUILD_TYPE using a clean terminal I get the error when specifying build_type=Debug. build_type=Release runs without errors like you say - so I guess this is a Debug specific issue.
|
Thanks very much for the feedback, it helps, interesting that it happens only in Debug (but this could make more sense, ConanCenter build less Debug configurations than Release ones, so this case might not have been covered maybe?)
Can you please try running the same command from a regular |
running conan install --requires=ffmpeg/6.1.1 --build=missing -s build_type=Debug In standard cmd terminal completed a full build! I think the msys enviroment was detected in this case. |
Did you define |
@SpaceIm Thanks, I specified all three config options in my global.conf file. Now I get the following on both git bash terminal and cmd terminal after removing and cleaning the ffmpeg package, and then re-installing:
Is there a way to turn off conanbuild.bat as a generated file? |
the problem is that for building with So this From outside a git-bash terminal, Conan knows to activate this .bat first, then call the |
I have been able to build ffmpeg inside git bash. diff --git a/conan/tools/gnu/autotoolstoolchain.py b/conan/tools/gnu/autotoolstoolchain.py
index e5fed44cb..03fd42588 100644
--- a/conan/tools/gnu/autotoolstoolchain.py
+++ b/conan/tools/gnu/autotoolstoolchain.py
@@ -236,7 +236,7 @@ class AutotoolsToolchain:
env.append("CXXFLAGS", self.cxxflags)
env.append("CFLAGS", self.cflags)
env.append("LDFLAGS", self.ldflags)
- env.prepend_path("PKG_CONFIG_PATH", self._conanfile.generators_folder)
+ env.define_path("PKG_CONFIG_PATH", self._conanfile.generators_folder)
# Issue related: https://github.com/conan-io/conan/issues/15486
if self._is_cross_building and self._conanfile.conf_build:
compilers_build_mapping = (
diff --git a/conans/client/subsystems.py b/conans/client/subsystems.py
index ac7ca25c7..fa853069f 100644
--- a/conans/client/subsystems.py
+++ b/conans/client/subsystems.py
@@ -72,6 +72,7 @@ def _windows_bash_wrapper(conanfile, command, env, envfiles_folder):
if not shell_path:
raise ConanException("The config 'tools.microsoft.bash:path' is "
"needed to run commands in a Windows subsystem")
+ shell_path = shell_path.replace("\\", "/")
env = env or []
if subsystem == MSYS2:
# Configure MSYS2 to inherith the PATH
@@ -100,10 +101,12 @@ def _windows_bash_wrapper(conanfile, command, env, envfiles_folder):
# first and there could be commands that we want to skip
wrapped_user_cmd = environment_wrap_command(env, envfiles_folder, command,
accepted_extensions=("sh", ))
- wrapped_user_cmd = _escape_windows_cmd(wrapped_user_cmd)
+ wrapped_user_cmd = wrapped_user_cmd.replace("\\", "/")
+ #wrapped_user_cmd = _escape_windows_cmd(wrapped_user_cmd)
+ wrapped_user_cmd = wrapped_user_cmd.replace('"', r'\"')
# according to https://www.msys2.org/wiki/Launchers/, it is necessary to use --login shell
# running without it is discouraged
- final_command = '{} --login -c {}'.format(wrapped_shell, wrapped_user_cmd)
+ final_command = '{} --login -c "{}"'.format(wrapped_shell, wrapped_user_cmd)
return final_command It is clear that things are interpreted differently while running inside a git bash:
At least we have something to start working on, but it seems it will be challenging to make it work smoothly from both gitbash and cmd |
Let's start with some low hanging fruit: #16997 |
Describe the bug
Hello All,
I am using the conan-center version of the ffmpeg lib specifically ffmpeg/6.1.1
my project uses this code to consume it:
On windows I have had to disable the above libs because of PKG_CONFIG related errors. Is this currently expected? Is there a way to link with the missing packages by linking to the libs through version provided by msys?
https://github.com/conan-io/conan-center-index/tree/master/recipes/ffmpeg
Thanks for any tips, suggestions, help
-Trevor
How to reproduce it
conan install . --build=missing
The text was updated successfully, but these errors were encountered: