Stop linking lcrypto and lssl

The Rust code now uses vendored mode [1] to statically link openssl,
so we no longer need dynamic linking for these libraries.

This also resolves an issue where extra flags were needed to build
locally on macOS.

[1]: https://docs.rs/openssl/0.10.36/openssl/#vendored
This commit is contained in:
Zac Bergquist 2021-10-27 09:04:39 -06:00 committed by Zac Bergquist
parent b431cf1242
commit cdf053eba7
2 changed files with 2 additions and 6 deletions

View file

@ -19,14 +19,11 @@ ENV LANGUAGE="en_US.UTF-8" \
# Install packages.
# We install curl first to allow setting up the Google SDK as part of the same layer.
# Note: we install gcc-multilib and enable the i386 architecture so we can cross compile
# for i386.
RUN apt-get update -y --fix-missing && \
apt-get -q -y upgrade && \
apt-get install -y --no-install-recommends apt-utils ca-certificates curl gnupg && \
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
dpkg --add-architecture i386 && \
apt-get -y update && \
apt-get install -q -y --no-install-recommends \
apt-utils \
@ -43,7 +40,6 @@ RUN apt-get update -y --fix-missing && \
libelf-dev \
libpam-dev \
libsqlite3-0 \
libssl-dev:i386 \
llvm-10 \
locales \
make \

View file

@ -56,10 +56,10 @@ package rdpclient
#cgo linux,amd64 LDFLAGS: -L${SRCDIR}/target/x86_64-unknown-linux-gnu/release
#cgo linux,arm LDFLAGS: -L${SRCDIR}/target/arm-unknown-linux-gnueabihf/release
#cgo linux,arm64 LDFLAGS: -L${SRCDIR}/target/aarch64-unknown-linux-gnu/release
#cgo linux LDFLAGS: -l:librdp_client.a -lpthread -lcrypto -ldl -lssl -lm
#cgo linux LDFLAGS: -l:librdp_client.a -lpthread -ldl -lm
#cgo darwin,amd64 LDFLAGS: -L${SRCDIR}/target/x86_64-apple-darwin/release
#cgo darwin,arm64 LDFLAGS: -L${SRCDIR}/target/aarch64-apple-darwin/release
#cgo darwin LDFLAGS: -framework CoreFoundation -framework Security -lrdp_client -lpthread -lcrypto -ldl -lssl -lm
#cgo darwin LDFLAGS: -framework CoreFoundation -framework Security -lrdp_client -lpthread -ldl -lm
#include <librdprs.h>
*/
import "C"