Skip to content

Commit 6d4049d

Browse files
authored
Curl update (aws#382)
1 parent 62ea40e commit 6d4049d

6 files changed

Lines changed: 10 additions & 26 deletions

File tree

aws-lambda-java-runtime-interface-client/src/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.glibc

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
1-
# we use centos 7 to build against glibc 2.17
2-
FROM public.ecr.aws/docker/library/centos:7
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2
32

43
ARG CURL_VERSION
54

6-
# Add Corretto repository
7-
RUN rpm --import https://yum.corretto.aws/corretto.key && \
8-
curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo
9-
10-
# aws-lambda-cpp requires cmake3, it's available in EPEL
11-
RUN yum install -y epel-release
125
RUN yum install -y \
136
cmake3 \
7+
tar \
8+
gzip \
149
make \
1510
gcc \
1611
gcc-c++ \
17-
libstdc++-static \
18-
glibc-devel \
19-
gmp-devel \
20-
libmpc-devel \
21-
libtool \
22-
mpfr-devel \
23-
wget \
24-
java-1.8.0-amazon-corretto-devel
12+
java-11-amazon-corretto
2513

2614
# Install curl dependency
2715
COPY ./deps/curl-$CURL_VERSION.tar.gz /src/deps/
28-
RUN tar xzf /src/deps/curl-$CURL_VERSION.tar.gz -C /src/deps && mv /src/deps/curl-$CURL_VERSION /src/deps/curl
29-
WORKDIR /src/deps/curl
16+
RUN tar xzf /src/deps/curl-$CURL_VERSION.tar.gz -C /src/deps
17+
WORKDIR /src/deps/curl-$CURL_VERSION
3018
RUN ./configure \
3119
--prefix $(pwd)/../artifacts \
3220
--disable-shared \
@@ -38,7 +26,6 @@ RUN ./configure \
3826

3927
# Install aws-lambda-cpp dependency
4028
ADD ./deps/aws-lambda-cpp-* /src/deps/aws-lambda-cpp
41-
RUN sed -i.bak 's/VERSION 3.9/VERSION 3.6/' /src/deps/aws-lambda-cpp/CMakeLists.txt
4229
RUN mkdir -p /src/deps/aws-lambda-cpp/build
4330
WORKDIR /src/deps/aws-lambda-cpp/build
4431
RUN cmake3 .. \
@@ -53,7 +40,7 @@ RUN cmake3 .. \
5340
# Build native client
5441
ADD *.cpp *.h /src/
5542
WORKDIR /src
56-
ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-amazon-corretto
43+
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto
5744
RUN /usr/bin/c++ -c \
5845
-std=gnu++11 \
5946
-fPIC \

aws-lambda-java-runtime-interface-client/src/main/jni/Dockerfile.musl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ RUN apk update && \
1010
g++ \
1111
gcc \
1212
make \
13-
libexecinfo-dev \
1413
perl
1514

1615
# Install curl dependency
1716
COPY ./deps/curl-$CURL_VERSION.tar.gz /src/deps/
18-
RUN tar xzf /src/deps/curl-$CURL_VERSION.tar.gz -C /src/deps && mv /src/deps/curl-$CURL_VERSION /src/deps/curl
19-
WORKDIR /src/deps/curl
17+
RUN tar xzf /src/deps/curl-$CURL_VERSION.tar.gz -C /src/deps
18+
WORKDIR /src/deps/curl-$CURL_VERSION
2019
RUN ./configure \
2120
--prefix $(pwd)/../artifacts \
2221
--disable-shared \
@@ -53,7 +52,6 @@ RUN /usr/bin/c++ -c \
5352
/usr/bin/c++ -shared \
5453
-std=gnu++11 \
5554
-o aws-lambda-runtime-interface-client.so com_amazonaws_services_lambda_runtime_api_client_runtimeapi_NativeClient.o \
56-
-L ./deps/artifacts/lib64/ \
5755
-L ./deps/artifacts/lib/ \
5856
-laws-lambda-runtime \
5957
-lcurl \

aws-lambda-java-runtime-interface-client/src/main/jni/build-jni-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -euo pipefail
66
SRC_DIR=$(dirname "$0")
77
DST_DIR=${1}
88
MULTI_ARCH=${2}
9-
CURL_VERSION=7.84.0
9+
CURL_VERSION=7.86.0
1010

1111
# Not using associative arrays to maintain bash 3 compatibility with building on MacOS
1212
# MacOS ships with bash 3 and associative arrays require bash 4+
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)