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

fix: add missing or clang #26500

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

root-kidik
Copy link

@root-kidik root-kidik commented Jan 31, 2025

bug

conan profile

[settings]
os=Windows
arch=x86_64
compiler=clang
compiler.version=18
compiler.libcxx=libc++
build_type=Debug
compiler.cppstd=20

[conf]
tools.cmake.cmaketoolchain:generator=Ninja

conanfile.txt

[requires]
qt/6.7.3

[generators]
CMakeDeps
CMakeToolchain

[layout]
cmake_layout

error

ERROR: libffi/3.4.4: Error in generate() method, line 130
        ar_wrapper = unix_path(self, self.dependencies.build["automake"].conf_info.get("user.automake:lib-wrapper"))
        KeyError: "'automake' not found in the dependency set"

@CLAassistant
Copy link

CLAassistant commented Jan 31, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ root-kidik
❌ rtkid-nik
You have signed the CLA already but the status is still pending? Let us recheck it.

@root-kidik
Copy link
Author

@amoeba @cynix

@root-kidik
Copy link
Author

@memsharded

@@ -62,7 +62,7 @@ def build_requirements(self):
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", default=False, check_type=str):
self.tool_requires("msys2/cci.latest")
if is_msvc(self):
if is_msvc(self) or self.settings.compiler == "clang":
Copy link
Contributor

@cynix cynix Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this recipe always uses autotools regardless of OS/compiler, I think we should just get rid of this condition and always require automake.

There are similar examples in other recipes, such as

self.tool_requires("automake/1.16.5")

Copy link
Contributor

@cynix cynix Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, if that's undesirable and you want to only require this in order to satisfy the reference below, then this condition should be consistent with line 94:

https://github.com/root-kidik/conan-center-index/blob/4687515fa9ab64d2bd669bedef7e8882c984aa05/recipes/libffi/all/conanfile.py#L94

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cynix I took your advice and added that an automake is always required

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the confusion here - but guarding automake for msvc only is intentional - we do expect those tools to be available on other systems (and this should be restored to what it was before)

Copy link
Contributor

@cynix cynix Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case it feels like this should be a requirement on Windows rather than MSVC?

FWIW, I’ve had to fork at least 1 recipe (cyrus-sasl) for our internal use, to add the automake/1.16.5 requirement, because the highest version of automake available in our environment (CentOS 7) was insufficient for that package.

It seems CCI provides recipes for many modern build tools. Isn’t it better for packages to always declare their tool requirements? If the user wishes to use the tools from their environment rather than a package, they then have the choice of defining those via platform_tool_requires. That seems more useful than assuming some tool will be available, because there’s no easy way for me to do the opposite - I can’t inject a requirement without modifying the recipe.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cynix I need to change something in my PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@root-kidik root-kidik requested review from cynix and jcar87 February 5, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants