Ubuntu MATE 17.10安装Gameplay游戏引擎执行make命令报错求助
Hey there, let's work through this Gameplay engine build failure on Ubuntu MATE 17.10 together. I've helped debug plenty of similar make errors with game engines, so here are the most actionable fixes to try:
Gameplay relies on several core development libraries that aren't always pre-installed on Ubuntu MATE. Run this command to grab all the common required packages:
sudo apt-get update sudo apt-get install build-essential cmake libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxcursor-dev libxi-dev libxrandr-dev libxinerama-dev libxxf86vm-dev
A lot of make errors boil down to missing these foundational libraries, so this is a good first step.
Sometimes the initial CMake setup can leave behind broken cache files or miss dependencies. Let's start fresh:
- Navigate to your Gameplay source directory (replace
gameplaywith your actual folder name if needed):
cd gameplay rm -rf build mkdir build cd build cmake ..
Pay close attention to the CMake output—if you see red warnings or errors (like "Could NOT find XXXX library"), that's your clue. Install the missing library and re-run CMake before trying make again.
Ubuntu 17.10 ships with GCC 7.x by default, and some older versions of Gameplay might have compatibility issues with newer compilers. Try switching to GCC 6 if the default isn't working:
First install GCC 6:
sudo apt-get install gcc-6 g++-6
Then tell CMake to use this compiler when configuring:
cmake .. -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6
Now run make again and see if the error clears up.
If the above steps don't fix it, let's get more specific about what's failing. Run make with verbosity enabled to see the exact command that's erroring out:
make VERBOSE=1
Look for lines with error: in the output—this will tell you exactly what's broken (e.g., a missing header, undefined function, or linker issue). Once you have that specific error, you can target the fix directly (like installing a missing library or applying a small code patch).
Rarely, build failures happen because the build directory or source files have incorrect permissions (e.g., if you used sudo to create folders by accident). Check the permissions:
ls -ld ../build ls -l ../
If you see root listed as the owner, fix it with:
sudo chown -R $USER:$USER ../build sudo chown -R $USER:$USER ../
Then re-run make.
内容的提问来源于stack exchange,提问作者Samdare

