conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
958 stars 1.76k forks source link

OpenSSL fails to build for Macos + GCC #7428

Open koloshmet opened 3 years ago

koloshmet commented 3 years ago

Errors

I'm trying to install boost/1.76.0 (same behaviour with other versions) via conan and having errors like this:

In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:110,
                 from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:66,
                 from /usr/local/Cellar/gcc/11.2.0/include/c++/11.2.0/cstdlib:75,
                 from /usr/local/Cellar/gcc/11.2.0/include/c++/11.2.0/bits/stl_algo.h:59,
                 from /usr/local/Cellar/gcc/11.2.0/include/c++/11.2.0/algorithm:62,
                 from libs/serialization/src/extended_type_info.cpp:15:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h:443:34: error: expected initializer before '__OSX_AVAILABLE_STARTING'
  443 | int     getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);

Also when i'm trying to install openssl/1.1.1k it prints

/opt/X11/bin/makedepend -f- -Y --  -I. -Iinclude -fPIC -arch x86_64 -m64 -fPIC -mmacosx-version-min=11.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -arch x86_64 -O3 -Wall -fPIC -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/Users/user/.conan/data/openssl/1.1.1k/_/_/package/9668fb7e34f1fc5aebc9b16c4ab6840a16914157/res\"" -DENGINESDIR="\"/Users/koloshmet/.conan/data/openssl/1.1.1k/_/_/package/9668fb7e34f1fc5aebc9b16c4ab6840a16914157/lib/engines-1.1\"" -D_REENTRANT -DNDEBUG -I/usr/local/opt/llvm/include -- crypto/aes/aes_cfb.c 2>/dev/null \
        > crypto/aes/aes_cfb.d
make[1]: *** [crypto/aes/aes_cfb.o] Error 1

My profile file

[settings]
os=Macos
os_build=Macos
os.version=11.0
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
[options]
[build_requires]
[env]
CXX=/usr/local/bin/g++-11
CC=/usr/local/bin/gcc-11

Gcc + Xcode + Big Sur

I'm using gcc 11.2 with Big Sur for a long time and it always compiles system headers fine, so it doesn't look like the root of problem. Also it works fine with conan and many other libs (like abeseil, fmt, etc)

Main question

What is going wrong?

lasote commented 3 years ago

Not sure what can be happening but doesn't look like a Conan issue. I found this: https://github.com/Homebrew/homebrew-core/issues/44579 might it be related?

koloshmet commented 3 years ago

@lasote Yes, you're right, it solved errors for boost, thank you. But openssl still fails with unknown make errors :c

lasote commented 3 years ago

Let's move this issue to the conan-center-index repository to see if someone from the community can help as it looks it is not a conan client issue but probably the recipe of some packages.

jgsogo commented 3 years ago

Hi, @koloshmet! This is a configuration we are not currently building in our CI, so it is possible that some recipes fail if you try to build them.

We would be pleased if you can investigate those errors a little bit and contribute the required patches to the build-system yourself, all of us will be happy to help you with the pull-request process. This way, you also ensures that this issue will be taken into account.

If not, try to open a dedicated issue for each library you are trying to build, with the logs and the profiles so we can reproduce the scenario. Someone might take the issue and provide the fix, but we cannot guarantee it, besides some really common configurations and big libraries, this repository is mostly community-driven.

I'm changing the title of this issue to refer to openssl, the more specific the better.