GrowtopiaNoobs / GrowtopiaServer2

New Growtopia Private Server
GNU Affero General Public License v3.0
37 stars 21 forks source link

Issue with building. #7

Closed lukeacat closed 4 years ago

lukeacat commented 4 years ago

┌[kuteshi☮kuteshi]-(~/GrowtopiaServer2)-[git://master` ✔]- └> cmake CMakeLists.txt -- The CXX compiler identification is GNU 9.2.1 -- 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 -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:16 (add_subdirectory): The source directory

/home/kuteshi/GrowtopiaServer2/libs/enet

does not contain a CMakeLists.txt file.

-- Configuring incomplete, errors occurred! See also "/home/kuteshi/GrowtopiaServer2/CMakeFiles/CMakeOutput.log".

lukeacat commented 4 years ago

Running Manjaro Linux 19 (newest)! CMake version: 3.16.5

lukeacat commented 4 years ago

Fixed by installing enet in /enet.

lukeacat commented 4 years ago

After running cmake, on make:

make[1]: Entering directory '/home/kuteshi/GrowtopiaServer2'
make[2]: Entering directory '/home/kuteshi/GrowtopiaServer2'
Scanning dependencies of target enet
make[2]: Leaving directory '/home/kuteshi/GrowtopiaServer2'
make[2]: Entering directory '/home/kuteshi/GrowtopiaServer2'
[  5%] Building C object libs/enet/CMakeFiles/enet.dir/callbacks.c.o
[ 10%] Building C object libs/enet/CMakeFiles/enet.dir/compress.c.o
[ 15%] Building C object libs/enet/CMakeFiles/enet.dir/host.c.o
[ 20%] Building C object libs/enet/CMakeFiles/enet.dir/list.c.o
[ 25%] Building C object libs/enet/CMakeFiles/enet.dir/packet.c.o
[ 30%] Building C object libs/enet/CMakeFiles/enet.dir/peer.c.o
[ 35%] Building C object libs/enet/CMakeFiles/enet.dir/protocol.c.o
[ 40%] Building C object libs/enet/CMakeFiles/enet.dir/unix.c.o
[ 45%] Building C object libs/enet/CMakeFiles/enet.dir/win32.c.o
[ 50%] Linking C static library libenet.a
make[2]: Leaving directory '/home/kuteshi/GrowtopiaServer2'
[ 50%] Built target enet
make[2]: Entering directory '/home/kuteshi/GrowtopiaServer2'
make[2]: Leaving directory '/home/kuteshi/GrowtopiaServer2'
make[2]: Entering directory '/home/kuteshi/GrowtopiaServer2'
[ 55%] Building CXX object CMakeFiles/GrowtopiaServer.dir/src/ENetWrapper/ENetServer.cpp.o
/home/kuteshi/GrowtopiaServer2/src/ENetWrapper/ENetServer.cpp: In member function ‘void ENetServer::setServerData(uint8_t*)’:
/home/kuteshi/GrowtopiaServer2/src/ENetWrapper/ENetServer.cpp:151:10: error: ‘ENetHost’ {aka ‘struct _ENetHost’} has no member named ‘data’
  151 |  server->data = (void*) data;
      |          ^~~~
/home/kuteshi/GrowtopiaServer2/src/ENetWrapper/ENetServer.cpp: In member function ‘uint8_t* ENetServer::getServerData()’:
/home/kuteshi/GrowtopiaServer2/src/ENetWrapper/ENetServer.cpp:154:27: error: ‘ENetHost’ {aka ‘struct _ENetHost’} has no member named ‘data’
  154 |  return (uint8_t*)server->data;
      |                           ^~~~
make[2]: *** [CMakeFiles/GrowtopiaServer.dir/build.make:63: CMakeFiles/GrowtopiaServer.dir/src/ENetWrapper/ENetServer.cpp.o] Error 1
make[2]: Leaving directory '/home/kuteshi/GrowtopiaServer2'
make[1]: *** [CMakeFiles/Makefile2:96: CMakeFiles/GrowtopiaServer.dir/all] Error 2
make[1]: Leaving directory '/home/kuteshi/GrowtopiaServer2'
make: *** [Makefile:84: all] Error 2

I've downloaded enet and put it in the /enet/ folder.

EDIT by GrowtopiaNoobs: fixing code formating

lukeacat commented 4 years ago

Installing enet helps nothing.

NotDark commented 4 years ago

try use enet from this fork https://github.com/GrowtopiaNoobs/enet image

GrowtopiaNoobs commented 4 years ago

@kuteshiki As @NotDark said, using my fork of enet https://github.com/GrowtopiaNoobs/enet should solve this problem.

iProgramMC commented 4 years ago

@GrowtopiaNoobs what does your fork of ENet add?

GrowtopiaNoobs commented 4 years ago

You can check commit history. There is added just one variable, which can keep custom data for server.

GrowtopiaNoobs commented 4 years ago

Closing this issue as there hasn't been any new activity, also you can now check build.sh or download working version from releases.