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

Steffen Nurpmeso steffen at sdaoden.eu
Wed Oct 17 21:07:37 UTC 2018


Good evening.

Matt Caswell wrote in <18466c3a-430a-f1cb-8277-1f742e1b44ae at openssl.org>:
 |On 17/10/2018 14:09, Steffen Nurpmeso wrote:
 |> Matt Caswell wrote in <bf5f388d-1964-24c8-753b-0251a7412642 at openssl.org>:
 |>|On 17/10/2018 13:43, Steffen Nurpmeso wrote:
 |>|> Matt Caswell wrote in <cf8b85a3-af41-ba9c-92c4-f744666c7c76 at openssl.org\
 |>|> >:
 |>|>|On 17/10/2018 13:12, Steffen Nurpmeso wrote:
 |>|>|> I have built final 1.1.1 yesterday on AlpineLinux musl after
 |>|>|> running a prelease from end of May before.  My makefile rule for
 |>|>|> this box is (excerpt)
 |>|>|> 
 |>|>|>         ./config --prefix=$(MYPREFIX) zlib-dynamic no-hw shared \
 |>|>|>                 no-deprecated no-async no-tests \
 |>|>|>                 -DOPENSSL_NO_ASYNC \
 |>|>|>                 -Wl,-rpath,'$(LIBRPATH)' &&\
 |>|>|>         make &&\
 |>|>|>         $(SUDO) make install_sw && $(SUDO) make install_ssldirs; \
 |>|>|> 
 |>|>|> The -DOPENSSL_NO_ASYNC i had to add yesterday, no-async alone was
 |>|>|> not enough.  (I have forgotten whether this was necessary in May,
 |>|>|> but most likely not.)
 |>|>|
 |>|>|This shouldn't be necessary. What errors do you get if you don't \
 |>|>|include
 |>|>|that?
 |>|> 
 |>|>   #?0[steffen at essex code.arena]$ MAKE=make make openssl-blade MYPREFIX=\
 |>|>   $H\
 |>|>   OME/$USR/opt/.ossl-1.1.1
 |>|>   cd openssl.git &&\
 |>|>   if [ -f NULL ]; then git checkout `cat NULL`; fi &&\
 |>|>   ./config --prefix=/home/steffen/usr-essex-alpine-linux-x86_64/opt/.os\
 |>|>   sl\
 |>|>   -1.1.1 zlib-dynamic no-hw shared \
 |>|>           no-deprecated no-async no-tests \
 |>|>           -Wl,-rpath,'' &&\
 |>|>   make &&\
 |>|>    make install_sw &&  make install_ssldirs; \
 |>  ..
 |>|>   -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'
 |>|>   Previous HEAD position was 1708e3e85b Prepare for 1.1.1 release
 |>|>   Switched to branch 'arena-manager-null'
 |>|
 |>|And that problem goes away by specifying "-DOPENSSL_NO_ASYNC" to
 |>|config????? That issue seems to have absolutely nothing to do with that
 |>|define. None of the .c or .h files indicated in the error above
 |>|reference it, nor do they have anything to do with the async functionali\
 |>|ty.
 |> 
 |> Yes, that is what i did!  I looked into the AlpineLinux abuild
 |> package system, and how they get it done, and after adding this
 |> define the building succeeded.
 |> 
 |>|This problem seems to be environmental. The code in question looks like
 |>|this:
 |>|
 |>|# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
 |>|     && !defined(__STDC_NO_ATOMICS__)
 |>|#  include <stdatomic.h>
 |>|#  define HAVE_C11_ATOMICS
 |>|# endif
 |>|
 |>|stdatomic.h is part of C11. A C11 compliant compiler should provide it
 |>|unless it also define __STDC_NO_ATOMICS__. Your compiler appears to be
 |>|claiming to be C11 compliant and has not defined __STC_NO_ATOMICS__ -
 |>|and yet the header file cannot be found.
 |> 
 |> Yes, no such on musl i think.  But i do not know.
 |
 |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.  If i add -DOPENSSL_NO_ASYNC on top of the no-async that
i have chosen, it builds fine.
Maybe the subject was to offensive or misleading, for which
i hereby apologize.

--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