• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling TFS 0.4_DEV Debian 9 compile

vena

New Member
Joined
Jun 21, 2017
Messages
65
Reaction score
2
Hi, i have a big problem with compile my source tfs 0.4_dev 3777
this->
Bash:
root@vps-xxxx:/home/otserv/source2# sh build.sh
TheForgottenServer build script -
Using ccache
CCache binaries located in /usr/lib/ccache

Start building on 1 cores, using 2 processes

make  all-am
make[1]: Entering directory '/home/otserv/source2'
  CXX      baseevents.o
  CXX      actions.o
In file included from baseevents.cpp:21:0:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
 int32_t round(float v);
                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21:0,
                 from /usr/include/boost/functional/hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/functional/hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/functional/hash/hash.hpp:21,
                 from /usr/include/boost/functional/hash.hpp:6,
                 from /usr/include/boost/regex/v4/basic_regex.hpp:23,
                 from /usr/include/boost/regex/v4/regex.hpp:67,
                 from /usr/include/boost/regex.hpp:31,
                 from otpch.h:37,
                 from baseevents.cpp:17:
/usr/include/c++/6/cmath:1790:3: note: previous declaration ‘constexpr float std::round(float)                                                                                 ’
   round(float __x)
   ^~~~~
Makefile:556: recipe for target 'baseevents.o' failed
make[1]: *** [baseevents.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from actions.cpp:21:0:
tools.h:124:22: error: ‘int32_t round(float)’ conflicts with a previous declaration
 int32_t round(float v);
                      ^
In file included from /usr/include/boost/config/no_tr1/cmath.hpp:21:0,
                 from /usr/include/boost/functional/hash/detail/float_functions.hpp:14,
                 from /usr/include/boost/functional/hash/detail/hash_float.hpp:14,
                 from /usr/include/boost/functional/hash/hash.hpp:21,
                 from /usr/include/boost/functional/hash.hpp:6,
                 from /usr/include/boost/regex/v4/basic_regex.hpp:23,
                 from /usr/include/boost/regex/v4/regex.hpp:67,
                 from /usr/include/boost/regex.hpp:31,
                 from otpch.h:37,
                 from actions.cpp:17:
/usr/include/c++/6/cmath:1790:3: note: previous declaration ‘constexpr float std::round(float)                                                                                 ’
   round(float __x)
   ^~~~~
Makefile:556: recipe for target 'actions.o' failed
make[1]: *** [actions.o] Error 1
make[1]: Leaving directory '/home/otserv/source2'
Makefile:408: recipe for target 'all' failed
make: *** [all] Error 2
root@vps-exxxxx:/home/otserv/source2#
 
download

edit
Makefile
Code:
SRC = actions.cpp admin.cpp allocator.cpp baseevents.cpp beds.cpp chat.cpp\
      combat.cpp condition.cpp configmanager.cpp connection.cpp container.cpp\
      creature.cpp creatureevent.cpp cylinder.cpp database.cpp\
      databasemanager.cpp databasemysql.cpp databasesqlite.cpp depot.cpp\
      dispatcher.cpp exception.cpp fileloader.cpp game.cpp gameservers.cpp\
      globalevent.cpp group.cpp house.cpp housetile.cpp ioban.cpp ioguild.cpp\
      iologindata.cpp iomap.cpp iomapserialize.cpp itemattributes.cpp item.cpp\
      items.cpp luascript.cpp mailbox.cpp manager.cpp map.cpp monster.cpp\
      monsters.cpp movement.cpp networkmessage.cpp npc.cpp otserv.cpp\
      outfit.cpp outputmessage.cpp party.cpp player.cpp position.cpp\
      protocol.cpp protocolgame.cpp protocolhttp.cpp protocollogin.cpp\
      protocolold.cpp quests.cpp raids.cpp rsa.cpp scheduler.cpp\
      scriptmanager.cpp server.cpp spawn.cpp spells.cpp status.cpp\
      talkaction.cpp teleport.cpp textlogger.cpp thing.cpp tile.cpp tools.cpp\
      trashholder.cpp vocation.cpp waitlist.cpp weapons.cpp

OBJ = ${SRC:.cpp=.o}

CC = g++
INCS = -I/usr/include/libxml2 -I/usr/include/lua5.1 -I.  
CPPFLAGS = -DHAVE_CONFIG_H -D__USE_MYSQL__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT
CXXFLAGS = -std=c++03 -Os -fomit-frame-pointer -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-array-bounds -pipe ${INCS} ${CPPFLAGS}
LDFLAGS = -s -llua5.1 -lmariadbclient -lcrypto -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lz -lgmp -lxml2 -pthread
all: options tfs

options:
    @echo tfs build options:
    @echo "CXXFLAGS = ${CXXFLAGS}"
    @echo "LDFLAGS  = ${LDFLAGS}"
    @echo "CC       = ${CC}"

.cpp.o:
    @echo '${CC} $<'
    @${CC} -c ${CXXFLAGS} $<

tfs: ${OBJ}
    @echo CC -o $@
    @${CC} -o $@ ${OBJ} ${LDFLAGS}

clean:
    @echo cleaning
    @rm -f tfs ${OBJ}

.PHONY: all clean options


run

cd 3777/src
make -j`nproc`
mv tfs ../../
 
Back
Top