A problem about build gstreamer using meson

I use the following command to set up the environment

meson build -Dprefix=/usr/gst-dev 
ninja -C build 
meson install  

but when I execut"**ninja -C build **"

This is the problem that occurred

FAILED: subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so 
cc  -o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsagent.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlscertificate.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsconnection.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsdec.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsenc.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpbin.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpdec.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpdemux.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpenc.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/plugin.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libgstdtls.so -Wl,-Bsymbolic-functions '-Wl,-rpath,$ORIGIN/../../../gstreamer/gst' -Wl,-rpath-link,/home/longmen/gst/gst-build/build/subprojects/gstreamer/gst -Wl,--start-group subprojects/gstreamer/gst/libgstreamer-1.0.so.0.1806.0 /usr/lib/libglib-2.0.so /usr/lib/libgobject-2.0.so -Wl,--export-dynamic -pthread /usr/lib/libgmodule-2.0.so /usr/lib/libcrypto.so /usr/lib/libssl.so -Wl,--end-group
/usr/lib/gcc/aarch64-xilinx-linux/9.2.0/../../../../aarch64-xilinx-linux/bin/ld: subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsagent.c.o: in function `ssl_thread_id_function':
/home/longmen/gst/gst-build/build/../subprojects/gst-plugins-bad/ext/dtls/gstdtlsagent.c:104: undefined reference to `CRYPTO_THREADID_set_pointer'
/usr/lib/gcc/aarch64-xilinx-linux/9.2.0/../../../../aarch64-xilinx-linux/bin/ld: subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsagent.c.o: in function `_gst_dtls_init_openssl':
/home/longmen/gst/gst-build/build/../subprojects/gst-plugins-bad/ext/dtls/gstdtlsagent.c:125: undefined reference to `FAILED: subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so 
cc  -o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsagent.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlscertificate.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsconnection.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsdec.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsenc.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpbin.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpdec.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpdemux.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlssrtpenc.c.o subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/plugin.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libgstdtls.so -Wl,-Bsymbolic-functions '-Wl,-rpath,$ORIGIN/../../../gstreamer/gst' -Wl,-rpath-link,/home/longmen/gst/gst-build/build/subprojects/gstreamer/gst -Wl,--start-group subprojects/gstreamer/gst/libgstreamer-1.0.so.0.1806.0 /usr/lib/libglib-2.0.so /usr/lib/libgobject-2.0.so -Wl,--export-dynamic -pthread /usr/lib/libgmodule-2.0.so /usr/lib/libcrypto.so /usr/lib/libssl.so -Wl,--end-group
/usr/lib/gcc/aarch64-xilinx-linux/9.2.0/../../../../aarch64-xilinx-linux/bin/ld: subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsagent.c.o: in function `ssl_thread_id_function':
/home/longmen/gst/gst-build/build/../subprojects/gst-plugins-bad/ext/dtls/gstdtlsagent.c:104: undefined reference to `CRYPTO_THREADID_set_pointer'
/usr/lib/gcc/aarch64-xilinx-linux/9.2.0/../../../../aarch64-xilinx-linux/bin/ld: subprojects/gst-plugins-bad/ext/dtls/libgstdtls.so.p/gstdtlsagent.c.o: in function `_gst_dtls_init_openssl':
/home/longmen/gst/gst-build/build/../subprojects/gst-plugins-bad/ext/dtls/gstdtlsagent.c:125: undefined reference to `SSL_library_init'
'

And I have the openssl

OpenSSL 1.0.2u  20 Dec 2019

Now I don’t know how to solve it?

You build gstreamer for aarch64?

Yes, Can it be used on aarch64?

You have to build gstreamer for aarch64. I guess the regular build will not work for aarch64. Are you using gstreamer for Android? If yes, you can download the prebuilt one which supports aarch64.

I can confirm that regular build works for aarch64 with Ubuntu 22.04 (gcc-11).
Note that I used OpenSSL 3.0.2.