Cuberite Forum
[SOLVED] Compilation failure on centOS 7 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: [SOLVED] Compilation failure on centOS 7 (/thread-3016.html)

Pages: 1 2


[SOLVED] Compilation failure on centOS 7 - daisukiXCI - 09-10-2017

Hello,

I try to build cuberite on centos 7 but it failed on the cmake step with this error:

Code:
 --- Running cmake...
CMake Error: Error in cmake code at
/var/games/minecraft/cuberite/CMakeLists.txt:1:
Parse error.  Expected a command name, got unquoted argument with text "".
-- Configuring incomplete, errors occurred!


I don't know what to do. Please help me, you are my only hope Wink

Thanks in advance.


RE: Compilation failure on centOS 7 - lkolbly - 09-11-2017

Hi, welcome to the forums!

I assume you're using the compile.sh script, have you tried manually running cmake? From the cuberite folder, run:

Code:
mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
make

(from https://github.com/cuberite/cuberite/blob/master/COMPILING.md#linux-freebsd-etc)


RE: Compilation failure on centOS 7 - daisukiXCI - 09-11-2017

Both solutions provide same result


RE: Compilation failure on centOS 7 - lkolbly - 09-11-2017

Hm, weird. On my system, CMakeLists has a weird unicode character as the first character, it could be that's what's throwing it off (but it works fine on my Ubuntu system) - maybe try deleting the first line (with nano or something) to get rid of the character.


RE: Compilation failure on centOS 7 - daisukiXCI - 09-11-2017

I remove all the comment section and the error still is here


RE: Compilation failure on centOS 7 - daisukiXCI - 09-11-2017

i found the problem the file aren't unix format so I dos2unix them and it's working thanks for your help


RE: [SOLVED] Compilation failure on centOS 7 - xoft - 09-11-2017

That sounds like a mis-configured git client, normally it should checkout all files using the correct line-end format.


RE: [SOLVED] Compilation failure on centOS 7 - daisukiXCI - 09-18-2017

(09-11-2017, 05:39 PM)xoft Wrote: That sounds like a mis-configured git client, normally it should checkout all files using the correct line-end format.

First, sorry for the long wait.

Secondly, the server was new and the git with centos 7 default configuration.


RE: [SOLVED] Compilation failure on centOS 7 - peterbell10 - 09-19-2017

Apparently dos2unix will also remove any UTF-8 BOM.  Maybe that's what cmake is choking on.


RE: [SOLVED] Compilation failure on centOS 7 - daisukiXCI - 09-19-2017

(09-19-2017, 01:01 AM)peterbell10 Wrote: Apparently dos2unix will also remove any UTF-8 BOM.  Maybe that's what cmake is choking on.

i don't succeed to configure git to use linux end line format

Edit: Your BOM guess was right it's the real problem. Do you know how to remove it when i git pull ?