[openssl-users] no-async needs -DOPENSSL_NO_ASYNC nonetheless?

Steffen Nurpmeso steffen at sdaoden.eu
Thu Oct 18 12:53:10 UTC 2018


Matt Caswell wrote in <e3c0e393-4aea-edd2-ee88-476090bbe0c2 at openssl.org>:
 |On 17/10/2018 22:07, Steffen Nurpmeso wrote:
 |>|
 |>|This is definitely an environmental issue. I just installed an Alpine
 |>|Linux VM. I got the above error consistently when using clang as the
 |>|compiler (whether or not I added "-DOPENSSL_NO_ASYNC"). I got a
 |>|successful build if I used gcc instead of clang.
 |>|
 |>|With clang I was able to build successfully after this:
 |>|
 |>|$ apk add clang-dev
 |> 
 |> Well.  I have reported that no-async alone does not disable
 |> inclusion of (finally) stdatomic.h even though the build does not
 |> need it.
 |
 |The async feature and the inclusion of stdatomic.h are entirely
 |independent of each other. I would not expect no-async to disable the
 |inclusion of stdatomic.h.
 |
 |The build does not *need* stdatomic.h, but you will get better
 |performance if you do. The build is supposed to detect whether the
 |compiler has support for it automatically and only include it if it
 |does. It seems to me that the default Alpine clang package is slightly
 |broken in this respect, in that it has the defines to indicate
 |stdatomic.h support, but actually you need to install another package to
 |get it.
 |
 |>  If i add -DOPENSSL_NO_ASYNC on top of the no-async that
 |> i have chosen, it builds fine.
 |
 |This bit I do not understand at all. It makes no sense to me - and I did
 |not see it in my testing on Alpine. Are you sure you're not building
 |with gcc in that build? It's the only thing I can think of. If that's
 |not the case then I have no clue.

  clang  -I. -Icrypto/include -Iinclude -fPIC -pthread -m64 -Wa,--noexecstack -Qunused-arguments -Wall -O3 -DOPENSSL_USE_NODELETE -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 -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR="\"/home/steffen/usr-essex-alpine-linux-x86_64/opt/.ossl-1.1.1/ssl\"" -DENGINESDIR="\"/home/steffen/usr-essex-alpine-linux-x86_64/opt/.ossl-1.1.1/lib/engines-1.1\"" -DZLIB -DZLIB_SHARED -DNDEBUG -DOPENSSL_API_COMPAT=0x10100000L -DOPENSSL_NO_ASYNC -MMD -MF crypto/asn1/a_sign.d.tmp -MT crypto/asn1/a_sign.o -c -o crypto/asn1/a_sign.o crypto/asn1/a_sign.c       
  In file included from crypto/asn1/a_sign.c:22:
  In file included from crypto/include/internal/evp_int.h:11:
  include/internal/refcount.h:21:12: fatal error: 'stdatomic.h' file not found
  #  include <stdatomic.h>
             ^~~~~~~~~~~~~
  1 error generated.
  make[2]: *** [Makefile:955: crypto/asn1/a_sign.o] Error 1
  make[2]: Leaving directory '/home/steffen/code.arena/openssl.git'
  make[1]: *** [Makefile:171: all] Error 2
  make[1]: Leaving directory '/home/steffen/code.arena/openssl.git'

Thanks for your contiguous support.

 |> Maybe the subject was to offensive or misleading, for which
 |> i hereby apologize.
 |
 |I'm not sure what you are apologising for? No offence has been taken
 |(did I say something to suggest that it had...if so then *I* apologise!).

I am refreshing my apoligize, but transpose it to a different
topic.  Thank you.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


More information about the openssl-users mailing list