5.4.0 Linux build

#1
Hi there,
I was trying to build the 5.4.0 on Ubuntu 14 with:

- Download the source code from the GitHub via git - release branch
- sudo python3 download_sdks.py
- sudo apt-get install build-essential
- sudo apt-get install clang-3.8
- Get Cmake 3.9.1
- mkdir build
- cd build
- cmake .. -DCMAKE_C_COMPILER="/usr/bin/clang-3.8" -DCMAKE_CXX_COMPILER="/usr/bin/clang++-3.8" -DCMAKE_BUILD_TYPE=Profile -DCMAKE_TOOLCHAIN_FILE="../Tools/CMake/toolchain/linux/Linux_Clang.cmake"
- make

But I always got the following errors.

Code: Select all

In file included from /home/builduser/cryengine/build/Code/CryEngine/CrySystem/CrySystem_uber_1.cpp:15: In file included from /home/builduser/cryengine/Code/CryEngine/CrySystem/SystemInit.cpp:4: In file included from /home/builduser/cryengine/Code/CryEngine/CrySystem/SystemInit.h:8: In file included from /home/builduser/cryengine/Code/CryEngine/CrySystem/UnixConsole.h:48: /home/builduser/cryengine/Code/SDKs/ncurses/include/ncursesw/ncurses.h:1:1: error: unknown type name 'curses' curses.h ^ /home/builduser/cryengine/Code/SDKs/ncurses/include/ncursesw/ncurses.h:1:7: error: cannot use dot operator on a type curses.h ^ In file included from /home/builduser/cryengine/build/Code/CryEngine/CrySystem/CrySystem_uber_1.cpp:15: In file included from /home/builduser/cryengine/Code/CryEngine/CrySystem/SystemInit.cpp:4: In file included from /home/builduser/cryengine/Code/CryEngine/CrySystem/SystemInit.h:8: /home/builduser/cryengine/Code/CryEngine/CrySystem/UnixConsole.h:249:2: error: unknown type name 'CUNIXConsoleInputThread' CUNIXConsoleInputThread* m_pInputThread; ^ ....
Do you know what I missed on the steps? Is there anyone to compile it on Linux successfully?

It would be great if I can compile the dedicated server.

Thanks

Re: 5.4.0 Linux build

#2
Ah, this one's caused by me I'm afraid. It looks like the SDK package for Linux was accidentally created on a Windows machine, which doesn't respect symlinks.

Run the following commands from the root of your CRYENGINE repository once you've downloaded and unpacked the SDKs to recreate them as intended. I've just tested this on my Ubuntu machine and it compiles successfully.

Code: Select all

ln -sfn curses.h Code/SDKs/ncurses/include/ncurses.h ln -sfn libformw.so.6 Code/SDKs/ncurses/lib/libformw.so ln -sfn libformw.so.6.0 Code/SDKs/ncurses/lib/libformw.so.6 ln -sfn libmenuw.so.6 Code/SDKs/ncurses/lib/libmenuw.so ln -sfn libmenuw.so.6.0 Code/SDKs/ncurses/lib/libmenuw.so.6 ln -sfn libncursesw.so.6 Code/SDKs/ncurses/lib/libncursesw.so ln -sfn libncursesw.so.6.0 Code/SDKs/ncurses/lib/libncursesw.so.6 ln -sfn libpanelw.so.6 Code/SDKs/ncurses/lib/libpanelw.so ln -sfn libpanelw.so.6.0 Code/SDKs/ncurses/lib/libpanelw.so.6

Re: 5.4.0 Linux build

#3
Thanks for your reply cry-pasty,

Yes, it works with the symbolic link but I have to do a few things like the first command needs to be changed to:

ln -sfn curses.h Code/SDKs/ncurses/include/ncursesw/ncurses.h

and the Code/SDKs/SDL2/lib/linux_x64 symbolic links are also required to be fixed.

A part from that it looks very good. It would be great if you put the instruction on the technical document.
As I know CRYENGINE's primary build system is now CMake but I can only find the cry_waf document on the site.

Also would you please zip the SDK folder from your LInux machine? then replace the SDK on the github. That would be great for other guys.

Cheers

Re: 5.4.0 Linux build

#4
Well i'm stuck at:

[ 48%] Linking CXX shared library ../../../../bin/linux_x64_clang/libCryInput.so
/usr/bin/ld:../../../../Code/SDKs/SDL2/lib/linux_x64/libSDL2.so: file format not recognized; treating as linker script
/usr/bin/ld:../../../../Code/SDKs/SDL2/lib/linux_x64/libSDL2.so:1: syntax error
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Code/CryEngine/CryInput/CMakeFiles/CryInput.dir/build.make:173: recipe for target '../bin/linux_x64_clang/libCryInput.so' failed
make[2]: *** [../bin/linux_x64_clang/libCryInput.so] Error 1
CMakeFiles/Makefile2:933: recipe for target 'Code/CryEngine/CryInput/CMakeFiles/CryInput.dir/all' failed
make[1]: *** [Code/CryEngine/CryInput/CMakeFiles/CryInput.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Re: 5.4.0 Linux build

#5
Ubuntu 16.04.3
git clone https://github.com/CRYTEK/CRYENGINE.git
sudo python3 download_sdks.py
sudo apt-get install build-essentialsudo
sudo apt-get install clang-3.8
Get Cmake 3.9.3

1. Uninstall the default version provided by Ubuntu's package manager:
sudo apt-get purge cmake
2. Go to the official CMake webpage, then download and extract the latest version:
mkdir ~/temp
cd ~/temp
wget https://cmake.org/files/v3.9/cmake-3.9.3.tar.gz
tar -xzvf cmake-3.9.3.tar.gz
cd cmake-3.9.3/
3. Install the extracted source by running:
./bootstrap
make -j4
sudo make install
4. Test your new cmake version.
cmake --version
5. Results of cmake --version:
cmake version 3.9.X
CMake suite maintained and supported by Kitware (kitware.com/cmake).

ln -sfn curses.h Code/SDKs/ncurses/include/ncursesw/ncurses.h
ln -sfn libformw.so.6 Code/SDKs/ncurses/lib/libformw.so
ln -sfn libformw.so.6.0 Code/SDKs/ncurses/lib/libformw.so.6
ln -sfn libmenuw.so.6 Code/SDKs/ncurses/lib/libmenuw.so
ln -sfn libmenuw.so.6.0 Code/SDKs/ncurses/lib/libmenuw.so.6
ln -sfn libncursesw.so.6 Code/SDKs/ncurses/lib/libncursesw.so
ln -sfn libncursesw.so.6.0 Code/SDKs/ncurses/lib/libncursesw.so.6
ln -sfn libpanelw.so.6 Code/SDKs/ncurses/lib/libpanelw.so
ln -sfn libpanelw.so.6.0 Code/SDKs/ncurses/lib/libpanelw.so.6

Code/SDKs/SDL2/lib/linux_x64 symbolic links are also required to be fixed. Cry-patsy has made this error before.
Solution replace sdl2 files with 5.3.zip. Need to find better solution..
https://github.com/CRYTEK/CRYENGINE/iss ... -279462467

mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER="/usr/bin/clang-3.8" -DCMAKE_CXX_COMPILER="/usr/bin/clang++-3.8" -DCMAKE_BUILD_TYPE=Profile -DCMAKE_TOOLCHAIN_FILE="../Tools/CMake/toolchain/linux/Linux_Clang.cmake"
make

Who is online

Users browsing this forum: No registered users and 2 guests

cron