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

graphene: fix missing glibc symbols on newer systems #20269

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions recipes/graphene/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.apple import fix_apple_shared_install_name
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import copy, get, rm, rmdir
from conan.tools.files import copy, get, rm, rmdir, replace_in_file
from conan.tools.gnu import PkgConfigDeps
from conan.tools.layout import basic_layout
from conan.tools.meson import Meson, MesonToolchain
Expand Down Expand Up @@ -51,7 +51,7 @@ def layout(self):

def requirements(self):
if self.options.with_glib:
self.requires("glib/2.77.0")
self.requires("glib/2.78.0")

def validate(self):
if self.settings.compiler == "gcc":
Expand All @@ -70,9 +70,9 @@ def validate(self):
)

def build_requirements(self):
self.tool_requires("meson/1.2.1")
self.tool_requires("meson/1.2.2")
if not self.conf.get("tools.gnu:pkg_config", default=False):
self.tool_requires("pkgconf/1.9.5")
self.tool_requires("pkgconf/2.0.3")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand All @@ -97,7 +97,15 @@ def generate(self):
meson.project_options["introspection"] = "disabled"
meson.generate()

def _patch_sources(self):
# The finite-math-only optimization has no effect and can cause linking errors
# when linked against glibc >= 2.31
replace_in_file(self, os.path.join(self.source_folder, "meson.build"),
"'-ffast-math'",
"'-ffast-math', '-fno-finite-math-only'")

def build(self):
self._patch_sources()
meson = Meson(self)
meson.configure()
meson.build()
Expand Down