I do this inside a Dockerfile, and it runs properly:
RUN cd /tmp
&& git clone https://github.com/aws/aws-sdk-cpp.git
&& cd aws-sdk-cpp
&& mkdir build
&& cd build
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="ecr"
&& make
&& make install
It builds without the -DBUILD_ONLY option as well. However, this is on Ubuntu 18.04 LTS, not 20.04. I don't imagine there's a difference, however.
You haven't said what options you're feeding cmake.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…