title: How to resolve error this bitbake build error: undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1_1_0'
body: <p>I am trying to integrate <a href="https://github.com/microsoft/do-client" rel="nofollow noreferrer">do-client</a> into my yocto image targeting raspberrypi4.</p>
  <p>My recipe file:</p>
  <pre><code>LICENSE = &quot;CLOSED&quot;
  
  DO_SRC_URI ?= &quot;gitsm://github.com/microsoft/do-client;branch=main&quot;
  SRC_URI = &quot;${DO_SRC_URI}&quot;
  SRCREV = &quot;cd2eaadc0755c93bb31234a19a4577aced9845e5&quot;
  
  python () {
      src_uri = d.getVar('DO_SRC_URI')
      if src_uri.startswith('git'):
          d.setVar('PV', '1.0+git' + d.getVar('SRCPV'))
          d.setVar('S', d.getVar('WORKDIR') + &quot;/git&quot;)
      elif src_uri.startswith('file'):
          d.setVar('S',  d.getVar('WORKDIR') + &quot;/do-client&quot;)
  }
  
  DEPENDS = &quot;boost cpprest libproxy msft-gsl&quot;
  
  inherit cmake
  
  BUILD_TYPE ?= &quot;Debug&quot;
  EXTRA_OECMAKE += &quot;-DCMAKE_BUILD_TYPE=${BUILD_TYPE}&quot;
  # Don't build DO tests.
  EXTRA_OECMAKE += &quot;-DDO_BUILD_TESTS=OFF&quot;
  # Specify build is for deliveryoptimization-agent
  EXTRA_OECMAKE += &quot;-DDO_INCLUDE_AGENT=ON&quot;
  
  
  # cpprest installs its config.cmake file in a non-standard location.
  # Tell cmake where to find it.
  EXTRA_OECMAKE += &quot;-Dcpprestsdk_DIR=${WORKDIR}/recipe-sysroot/usr/lib/cmake&quot;
  BBCLASSEXTEND = &quot;native nativesdk&quot;
  </code></pre>
  <p>The error message:</p>
  <pre><code>/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++  -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0=/usr/src/debug/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0                      -fdebug-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0=/usr/src/debug/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0                      -fdebug-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot=                      -fdebug-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot-native=  -fvisibility-inlines-hidden  -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot -Wall -fPIE -pie -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wformat -Werror=format-security -fmerge-all-constants -Wno-noexcept-type -g -DDEBUG  -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot  -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0=/usr/src/debug/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0                      -fdebug-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0=/usr/src/debug/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0                      -fdebug-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot=                      -fdebug-prefix-map=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot-native=  -fvisibility-inlines-hidden  -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security  --sysroot=/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -pie -z relro -z now client-lite/CMakeFiles/deliveryoptimization-agent.dir/src/exe/docs.cpp.o  -o client-lite/deliveryoptimization-agent  client-lite/common/lib-doversion/libdoversion.a  client-lite/libdocs_common.a  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libcpprest.so.2.10  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_random.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_system.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_thread.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_filesystem.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_chrono.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_atomic.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_date_time.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_regex.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_log.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libproxy.so  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_thread.so.1.72.0  -lpthread  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_filesystem.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_chrono.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_atomic.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_date_time.so.1.72.0  /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libboost_regex.so.1.72.0 &amp;&amp; :
  | /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: client-lite/CMakeFiles/deliveryoptimization-agent.dir/src/exe/docs.cpp.o: undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1_1_0'
  | /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: /build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/recipe-sysroot/usr/lib/libcrypto.so.1.1: error adding symbols: DSO missing from command line
  | collect2: error: ld returned 1 exit status
  | ninja: build stopped: subcommand failed.
  | WARNING: exit code 1 from a shell command.
  | ERROR: Execution of '/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/deliveryoptimization-agent/1.0+gitAUTOINC+cd2eaadc07-r0/temp/run.do_compile.9472' failed with exit code 1
  ERROR: Task (/work/meta-azure-device-update/recipes-azure-device-update/deliveryoptimization-agent/deliveryoptimization-agent_git.bb:do_compile) failed with exit code '1'
  </code></pre>
  <p>My best guess from previous research is that i need to pass -lcrypto as an argument to the compiler but i'm not sure how to do that.</p>
  <p>Any help is appreciated.</p>