By using AWS re:Post, you agree to the Terms of Use

Linux c++ Plugin doesn't run on Amazon Linux


Hi there,

I am having issues with running an Unreal Engine 4 game with GameLift integrated on an amazon linux server.

It appears that the .SO file doesn't have what it needs to run.

I built the SO file as instructed in the readme on an Ubuntu server.

/local/game/CharAnim/Binaries/Linux/CharAnimServer: /usr/lib64/ version `GLIBCXX_3.4.20' not found (required by /local/game/CharAnim/Binaries/Linux/../../Pl ugins/GameLiftServerSDK/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/
/local/game/CharAnim/Binaries/Linux/CharAnimServer: /usr/lib64/ version `CXXABI_1.3.8' not found (required by /local/game/CharAnim/Binaries/Linux/../../Plug ins/GameLiftServerSDK/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/
/local/game/CharAnim/Binaries/Linux/CharAnimServer: /usr/lib64/ version `CXXABI_1.3.9' not found (required by /local/game/CharAnim/Binaries/Linux/../../Plug ins/GameLiftServerSDK/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/
/local/game/CharAnim/Binaries/Linux/CharAnimServer: /usr/lib64/ version `GLIBCXX_3.4.22' not found (required by /local/game/CharAnim/Binaries/Linux/../../Pl ugins/GameLiftServerSDK/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/
/local/game/CharAnim/Binaries/Linux/CharAnimServer: /usr/lib64/ version `GLIBCXX_3.4.21' not found (required by /local/game/CharAnim/Binaries/Linux/../../Pl ugins/GameLiftServerSDK/ThirdParty/GameLiftServerSDK/Linux/x86_64-unknown-linux-gnu/

Can this be looked into please?

asked 5 years ago35 views
11 Answers


This looks like a GCC version mismatch between the one used to compile on Ubuntu and the version installed on AMAZON_LINUX.

Found this article that might help.

What are the versions you currently use? (gcc --version)

Hope this helps.


answered 5 years ago

I am currently trying to build the SDK on a Amazon Linux ec2 instance, what a terrible experience.

Firstly, the SDK doesn't support the default cmake version installed on Amazon Linux.

Secondly, curl by default doesn't have SSL enabled so when it downloads dependencies for the SDK it fails.

Any assistance would be great.

gcc --version
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
gcc -v
Using built-in specs.
Target: x86_64-amazon-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl= --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-x86_64-amazon-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-x86_64-amazon-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-amazon-linux
Thread model: posix
gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC)


answered 5 years ago

Building the game is done on Windows. I build for the game's Linux Server on Windows. I used an Ubuntu VPS to build the SDK, as I was unable to do this on Windows, and that's where the first compatibility issues came. I also tried (and failed) to build the SDK on a Amazon Linux EC2 instance (which I assume is the best way to do this to get compatibility?).

answered 5 years ago


Any luck on this?

I'd like to better understand your workflow.

My understanding is that you build the SDK on Ubuntu and also build your Unreal game on Ubuntu. Then, you create a standalone build of your game and upload it to GameLift, is that right?


answered 5 years ago

Any advise? How would you suggest I build the .so files to run on amazon linux if amazon linux can't even build it?

answered 5 years ago


answered 5 years ago


I'll try and reproduce the issue over here and get back to you as soon as I find a workaround.


answered 5 years ago


I just finished a round of tests.

Here's what I did to get around the "GLIBCXX" errors you are experiencing.

First, I spun up an Ubuntu VM. I'm using Ubuntu 14.04.

On that machine, I have the default versions for:

  • cmake version 3.2.2
  • gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
  • GNU Make 3.81 I built the sdk using:
cd GameLift-SDK-Release-3.1.5/GameLift-Cpp-ServerSDK-3.1.5/
mkdir out
cd out
cmake .. -DBUILD_FOR_UNREAL=1 make

I took and copied it over to my Windows box.

After that, I built a Linux flavored Unreal Server from Windows following the steps described here:

I am on Unreal 4.13, so I used the v7 of their toolset.

Once I had my standalone build, I uploaded it to a vanilla Amazon_Linux box.

From there, I ran 'ldd' on the executable (GameLiftFPSServer in my case).

Here's the outputs:

	ldd GameLiftFPSServer => (0x00007fff135c0000) => /lib64/ (0x00007fd1ddb23000) => /lib64/ (0x00007fd1dd91f000) => /tmp/UnrealFromWin/LinuxNoEditor/GameLiftFPS/Binaries/Linux/./ (0x00007fd1dd3a1000) => /lib64/ (0x00007fd1dd198000) => /lib64/ (0x00007fd1dce96000) => /lib64/ (0x00007fd1dcad4000)
/lib64/ (0x00005639fb377000) => /lib64/ (0x00007fd1dc8bd000) => /usr/lib64/ (0x00007fd1dc5b8000)

So, as you can see, both installed libstdc++ and libc libraries are found and loaded properly.

Hopefully this helps you. Let me know if that all made sense.



answered 5 years ago

Oddly enough I just experienced this myself when building the GameLiftServerSDK for Unreal Engine. Although the library files may build successfully, you can still experience similar issues to what OP encountered after uploading a game server build with the generated to GameLift and creating a fleet with that build. Keep in mind that you won't specifically see errors like those in OP's original post until you ssh into a Amazon Linux EC2 instance in your fleet (in the FAILED state) and try to run the server executable from there.

To fix this, if you are cross compiling the GameLiftServerSDK library files for Linux from Windows using the Ubuntu Windows Subsystem For Linux, make sure to get Ubuntu 18.04 LTS, not regular Ubuntu (which defaults to version 20.04) or Ubuntu 20.04 LTS, from the Microsoft Store. If you use a newer version of Ubuntu (20.04 for e.g.), the versions of cmake, gcc, and make are too new for the Amazon Linux EC2 instances. The newest versions of these same tools for Ubuntu 18.04, according to the Advanced Package Tool (APT), are as follows:

  • cmake version 3.10.2
  • gcc (Ubuntu 7.5.0-3ubuntu~18.04)
  • GNU Make 4.1

Building the GameLift Server SDK, specifically version 4.0.0, with these utilities on the Ubuntu 18.04 environment worked for me.

answered 2 years ago

Thanks Chrisgong, that solve my problem !

answered 2 years ago

Hi, I know this is a very old post, but I figured out those parts already if it can help others bumping into this.. Most of what I say here was also mentioned by others.

You can build on an EC2 like you did, or in my case, I ran a local docker container using this image: FROM amazonlinux:latest And built it in there.

Then, i had to use libwebsockets, curl, and jsoncpp. I had to install them like this:

# Lib websockets are not part of the default repo, so setup another one
yum install -y wget
wget -P /tmp
yum install -y /tmp/epel-release-latest-7.noarch.rpm

# install build tools
yum groupinstall -y "Development Tools"

# Default cmake doesn't work with amazon SDK! Use cmake3
yum install -y cmake3

# Install libcurl and openssl separately
yum install -y libcurl-devel
yum install -y openssl-devel

# jsoncpp
yum install -y jsoncpp-devel

# libwebsockets
yum install -y libwebsockets
yum install -y libwebsockets-devel

# nodejs is required for amazon SDK to install...
yum install -y nodejs

# Build gamelift SDK first and install it
mkdir -p GameLift-Cpp-ServerSDK-3.4.1/build
cd GameLift-Cpp-ServerSDK-3.4.1/build
cmake3 -DCMAKE_BUILD_TYPE=Release VERBOSE=1 ..
make -j16
cd ../..

# build app
mkdir -p build
cd build
RUN make -j16

# Make sure amazon CLI is installed
# (Otherwise I couldn't call into it, somehow... even on an amazon linux 2 iamge)
pip3 install --upgrade awscli

# Setup awscli credentials
aws configure set default.region us-west-2
aws configure set aws_access_key_id ...put your access key id...
aws configure set aws_secret_access_key ...put your secret key...
aws ecr get-login

# Upload custom server to gamelift
aws gamelift upload-build --name MyExecutable --build-version 1.0.0 --build-root build --operating-system AMAZON_LINUX_2 --region us-west-2
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions