[solved] Cannot find MCServer executable - Linux x64
#1
Hello!

I'm not particularly new to building things with make, but I seem to be missing something here.

I first tried downloading the Linux x64 tar file and extracted it.

Code:
$ wget http://ci.bearbin.net/job/MCServer%20Linux-x86-64/lastSuccessfulBuild/artifact/MCServer.tar
$ tar xvf MCServer.tar

But when I try looking for the executable in ./MCServer/ it isn't there:
Code:
~/MCServer$ ls
crafting.txt  furnace.txt  hg  hg.supp  items.ini  monsters.ini  Plugins  README.txt  vg  vg.supp  webadmin

Ok, then I tried compiling it myself:
Code:
$ git clone https://github.com/mc-server/MCServer.git
Cloning into 'MCServer'...
remote: Reusing existing pack: 27960, done.
remote: Counting objects: 202, done.
remote: Compressing objects: 100% (179/179), done.
remote: Total 28162 (delta 112), reused 101 (delta 22)
Receiving objects: 100% (28162/28162), 52.92 MiB | 5.77 MiB/s, done.
Resolving deltas: 100% (20969/20969), done.
$ cd MCServer/
~/MCServer$ ls
Android           CMakeLists.txt  CONTRIBUTING.md  docs      GETTING-STARTED.md  lib      MakeLuaAPI.cmd  Nightbuild2008.cmd  src        tests  VC2008
cloc-exclude.txt  COMPILING.md    CONTRIBUTORS     Doxyfile  Install             LICENSE  MCServer        README.md           stats.cmd  Tools  VC2013
~/MCServer$ cmake . -DCMAKE_BUILD_TYPE=RELEASE
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ctag/MCServer
ctag@BBX-xwing:~/MCServer$ ls
Android           CMakeCache.txt  cmake_install.cmake  COMPILING.md     CONTRIBUTORS  Doxyfile            Install  LICENSE   MakeLuaAPI.cmd  Nightbuild2008.cmd  src        tests  VC2008
cloc-exclude.txt  CMakeFiles      CMakeLists.txt       CONTRIBUTING.md  docs          GETTING-STARTED.md  lib      Makefile  MCServer        README.md           stats.cmd  Tools  VC2013

I couldn't copy all of the make output over SSH, but it completed without any apparent errors.
Code:
ctag@BBX-xwing:~/MCServer$ make

...

[ 90%] Building CXX object src/CMakeFiles/MCServer.dir/MobFamilyCollecter.cpp.o
[ 91%] Building CXX object src/CMakeFiles/MCServer.dir/Enchantments.cpp.o
[ 91%] Building CXX object src/CMakeFiles/MCServer.dir/BlockArea.cpp.o
[ 91%] Building CXX object src/CMakeFiles/MCServer.dir/ByteBuffer.cpp.o
[ 92%] Building CXX object src/CMakeFiles/MCServer.dir/Authenticator.cpp.o
[ 92%] Building CXX object src/CMakeFiles/MCServer.dir/Root.cpp.o
[ 92%] Building CXX object src/CMakeFiles/MCServer.dir/MobProximityCounter.cpp.o
[ 93%] Building CXX object src/CMakeFiles/MCServer.dir/main.cpp.o
[ 93%] Building CXX object src/CMakeFiles/MCServer.dir/Matrix4f.cpp.o
[ 93%] Building CXX object src/CMakeFiles/MCServer.dir/ChatColor.cpp.o
[ 93%] Building CXX object src/CMakeFiles/MCServer.dir/Noise.cpp.o
[ 94%] Building CXX object src/CMakeFiles/MCServer.dir/MonsterConfig.cpp.o
[ 94%] Building CXX object src/CMakeFiles/MCServer.dir/ItemGrid.cpp.o
[ 94%] Building CXX object src/CMakeFiles/MCServer.dir/MobCensus.cpp.o
[ 95%] Building CXX object src/CMakeFiles/MCServer.dir/Vector3f.cpp.o
[ 95%] Building CXX object src/CMakeFiles/MCServer.dir/MCLogger.cpp.o
[ 95%] Building CXX object src/CMakeFiles/MCServer.dir/Globals.cpp.o
[ 96%] Building CXX object src/CMakeFiles/MCServer.dir/ProbabDistrib.cpp.o
[ 96%] Building CXX object src/CMakeFiles/MCServer.dir/GroupManager.cpp.o
[ 96%] Building CXX object src/CMakeFiles/MCServer.dir/CraftingRecipes.cpp.o
[ 97%] Building CXX object src/CMakeFiles/MCServer.dir/Group.cpp.o
[ 97%] Building CXX object src/CMakeFiles/MCServer.dir/MobSpawner.cpp.o
[ 97%] Building CXX object src/CMakeFiles/MCServer.dir/CommandOutput.cpp.o
[ 97%] Building CXX object src/CMakeFiles/MCServer.dir/Server.cpp.o
[ 98%] Building CXX object src/CMakeFiles/MCServer.dir/ClientHandle.cpp.o
[ 98%] Building CXX object src/CMakeFiles/MCServer.dir/ChunkMap.cpp.o
[ 98%] Building CXX object src/CMakeFiles/MCServer.dir/BoundingBox.cpp.o
[ 99%] Building CXX object src/CMakeFiles/MCServer.dir/Piston.cpp.o
[ 99%] Building CXX object src/CMakeFiles/MCServer.dir/Log.cpp.o
[ 99%] Building CXX object src/CMakeFiles/MCServer.dir/WebAdmin.cpp.o
[100%] Building CXX object src/CMakeFiles/MCServer.dir/FastRandom.cpp.o
Linking CXX executable MCServer/MCServer
[100%] Built target MCServer
ctag@BBX-xwing:~/MCServer$ ls
Android           CMakeCache.txt  cmake_install.cmake  COMPILING.md     CONTRIBUTORS  Doxyfile            Install  LICENSE   MakeLuaAPI.cmd  Nightbuild2008.cmd  src        tests  VC2008
cloc-exclude.txt  CMakeFiles      CMakeLists.txt       CONTRIBUTING.md  docs          GETTING-STARTED.md  lib      Makefile  MCServer        README.md           stats.cmd  Tools  VC2013
~/MCServer$ cd MCServer/
~/MCServer/MCServer$ ls
crafting.txt  furnace.txt  hg  hg.supp  items.ini  monsters.ini  Plugins  README.txt  vg  vg.supp  webadmin

The MCServer file still isn't there?! Even after make claims to have linked it. I'm pretty confused, the directions seemed quite straightfoward. Have I missed some step to running the server?

Thanks,
-CTAG
Reply
Thanks given by:
#2
Stupid question, but you did use cmake first, didn't you? There wouldn't be a makefile without it, probably, but I just had to ask. Can't be much more help otherwise, perhaps someone from the *nix community can shed some light? Bearbin? SamJBarney?
Reply
Thanks given by:
#3
Hi xoft,

Yes, I ran cmake beforehand with the RELEASE flag.

Code:
~/MCServer$ cmake . -DCMAKE_BUILD_TYPE=RELEASE
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ctag/MCServer
ctag@BBX-xwing:~/MCServer$ ls
Android           CMakeCache.txt  cmake_install.cmake  COMPILING.md     CONTRIBUTORS  Doxyfile            Install  LICENSE   MakeLuaAPI.cmd  Nightbuild2008.cmd  src        tests  VC2008
cloc-exclude.txt  CMakeFiles      CMakeLists.txt       CONTRIBUTING.md  docs          GETTING-STARTED.md  lib      Makefile  MCServer        README.md           stats.cmd  Tools  VC2013

Thanks,
-CTAG
Reply
Thanks given by:
#4
Out of curiosity, what happens when you grab the current version from the Github repo and try to build it? Also what kind of linux are you running?
Reply
Thanks given by:
#5
Hi SamJBarney,

Unless I'm mistaken, that's what I'm doing. I [git clone] the current source from https://github.com/mc-server/MCServer and build it with cmake and make.

Both ways, building or grabbing the .tar archive, result in a MCServer directory with no MCServer program (or settings.ini for that matter).

Thanks,
-CTAG
Reply
Thanks given by:
#6
CTAG,

Ah. Missed that. Sorry.
Hmmm.... That's a bit weird. I'm running a build right now, with the same parameters that you did just to see if I can reproduce it. And the results are in! I just ran a build on my machine, and I am getting no executable in the MCServer directory. For some reason cmake is putting it in the src directory.

Check to see if src/MCServer/MCServer exists for you.

Respectfully,
Sam

I'll post a fixme to Github so that this gets fixed soon.
Reply
Thanks given by:
#7
SamJBarney,

That was it! I copied the MCServer out of src and into the correct folder, the server now runs. This is a pretty odd scenario, especially since make claims to be linking "MCServer/MCServer" xP

Thank you,
-CTAG
Reply
Thanks given by:
#8
CTAG,

No problem. I think its just the fact that CMAKE is using a relative path for when it is supposed to be in the root directory, but it is still in the src directory.

Respectfully,
Sam
Reply
Thanks given by:
#9
OK, that makes sense. Thanks again for the help.

-CTAG
Reply
Thanks given by:
#10
Hey there, just saying I had the exact same issue with the Raspberry Pi after building it from the Git repositery. As described, it was placed on the src directory. Smile
Reply
Thanks given by:




Users browsing this thread: 5 Guest(s)