-
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
[zlib] zlib/1.2.11: Build failed with apple clang 12 #2986
Comments
Which revision of zlib recipe? Seems that this issue should have been fixed by #2403
|
@nikhiljain217 |
I'm running into the exact same problem ... |
@KaoCC @nikhiljain217 --- a/recipes/zlib/1.2.11/conanfile.py
+++ b/recipes/zlib/1.2.11/conanfile.py
@@ -88,6 +88,8 @@
for patch in self.conan_data["patches"][self.version]:
tools.patch(**patch)
+ os.unlink(os.path.join(self._source_subfolder, "zconf.h"))
+
with tools.chdir(self._source_subfolder):
# https://github.com/madler/zlib/issues/268
tools.replace_in_file('gzguts.h',
@@ -96,7 +98,7 @@
is_apple_clang12 = self.settings.compiler == "apple-clang" and tools.Version(self.settings.compiler.version) >= "12.0"
if not is_apple_clang12:
- for filename in ['zconf.h', 'zconf.h.cmakein', 'zconf.h.in']:
+ for filename in ['zconf.h.cmakein', 'zconf.h.in']:
tools.replace_in_file(filename,
'#ifdef HAVE_UNISTD_H '
'/* may be set to #if 1 by ./configure */',
--- a/recipes/zlib/1.2.8/conanfile.py
+++ b/recipes/zlib/1.2.8/conanfile.py
@@ -46,6 +46,7 @@
os.chmod(configure_file, st.st_mode | stat.S_IEXEC)
def build(self):
+ os.unlink(os.path.join(self._source_subfolder, "zconf.h"))
if self.settings.os != "Windows":
with tools.chdir(self._source_subfolder):
env_build = AutoToolsBuildEnvironment(self)
|
I have created a conanfile to install the dependency. I am adding this "zlib/1.2.11@conan/stable" to the |
All packages in the Conan Center Index don't have a If packages are both in Conan Center Index AND in conan-community or Bincrafters, only the recipe in Conan Center Index is still maintained, so you should migrate to those recipes. Short version: Use |
@KaoCC |
@madebr I will try again now. The thing is that I was not building zlib directly, but restinio/0.6.10 which transitively depends on zlib in one of its dependencies. |
@madebr Hi, I changed in the |
@KaoCC @nikhiljain217 |
Package and Environment Details (include every applicable attribute)
Conan profile (output of
conan profile show default
orconan profile show <profile>
if custom profile is in use)Configuration for profile default:
[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=12.0
compiler.libcxx=libc++
build_type=Release
[options]
[build_requires]
[env]
Steps to reproduce (Include if Applicable)
Try to build zlib 1.2.11 version with apple clang 12 (Xcode 12)
Logs (Include/Attach if Applicable)
Same issue as reported here: madler/zlib#509
madler/zlib#509
The text was updated successfully, but these errors were encountered: