CentOS 7 Compiling errors

Magnusxi
Posts: 8
Joined: Fri May 08, 2015 8:46 am

CentOS 7 Compiling errors

Post by Magnusxi » Wed May 20, 2015 11:16 am

I am trying to transfer my DSP server to a centos 7 box, When i try to compile i get warning

sh autogen.sh
configure.ac:129: warning: AC_LANG_SOURCE call detected in body
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: _AC_COMPILE_IFELSE is expanded from..
It continues this error down the terminal..

I also get No package 'lua5.1' found when i run ./configure --enable-debug but i have lua and LuaJIT installed, perhaps i ran the wrong luajit version? any ideas on why i get these errors?

Edit:
Thank you for the reply Alexandre24,

Found the issue thanks to Spre & Kj Here: viewtopic.php?f=11&t=2442&p=13111&hilit=lua5.1#p13111
Spre wrote:hope you dont mind me continuing to update this. easier for anyone else that may have this issue

centos lua is intalled differently. its called just lua not lua 5.1 and in a different directory.

just had to run the following

export LUA_LIBS="-L/usr/local/lib -llua"
and
export LUA_CFLAGS="-I/usr/local/include"

it now detects lua

have the same issue with libmzq so ill update if the export works with that also.

probably would be good to include it in the install wiki
Last edited by Magnusxi on Thu May 21, 2015 10:45 am, edited 1 time in total.

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: CentOS 7 Compiling errors

Post by Alexandre24 » Thu May 21, 2015 2:50 am

For Centos, I don't really remember but try this. liblua5.1-0 and liblua5.1-0-dev. It's equivalent the lua 5.1 and lua 5.1-dev. Say me if it is good or not.

EDIT: The packages that I had write for my memory was git, g++, automake, mysql-client, mysql-server, liblua5.1-0, liblua5.1-0-dev, libzmq3 or zeromq, libzmq3-dev or zeromq-devel, make, luajit5.1, luajit5.1-0-dev.

Google can help you with the equivalent if Centos can not find the package, but its principle should be that. Keep me informed.

Magnusxi
Posts: 8
Joined: Fri May 08, 2015 8:46 am

Re: CentOS 7 Compiling errors

Post by Magnusxi » Thu May 21, 2015 1:03 pm

Ok ran into another issue, I get the fatal error zmq.hpp: No such file or directory.. Any ideas?

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: CentOS 7 Compiling errors

Post by Alexandre24 » Thu May 21, 2015 2:17 pm

Its looks like a problem of libzmq3 and libzmq3 -dev . You have installed ?

I am about to install on CentOS virtual machine. I tell her immediately after .

Magnusxi
Posts: 8
Joined: Fri May 08, 2015 8:46 am

Re: CentOS 7 Compiling errors

Post by Magnusxi » Thu May 21, 2015 4:13 pm

I have libzmq3-3.2... but i dont have and cannot seem to find libzmq3-dev, do you happen to know the install command? yum install libzmq3-dev returns no package..

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: CentOS 7 Compiling errors

Post by Alexandre24 » Thu May 21, 2015 5:40 pm

Magnusxi wrote:I have libzmq3-3.2... but i dont have and cannot seem to find libzmq3-dev, do you happen to know the install command? yum install libzmq3-dev returns no package..
libzmq3-3.2 and zeromq-devel

Install that : libzmq3-3.2
wget http://dl.fedoraproject.org/pub/epel/7/ ... x86_64.rpm

rpm -ivh --nodeps zeromq3-devel-3.2.5-1.el7.x86_64.rpm

LuaJIT-2.0.2

cd /opt
wget http://luajit.org/download/LuaJIT-2.0.2.tar.gz
tar -zxvf LuaJIT-2.0.2.tar.gz

cd LuaJIT-2.0.2
make && make install

or sudo make install if you are not root.

LuaJIT-devel 2.0.3-3

wget http://ftp.tmapy.cz/tmapy-twist/centos/ ... x86_64.rpm
rpm -ivh --nodeps luajit********

After that:
- git
- automake
- mariadb*
- lua
- lua-devel
- gcc-c++
- gawk
- make

Zmq.hpp

git clone http://github.com/zeromq/cppzmq
cd cppzmq
sudo cp zmq.hpp /usr/include/

The compilation is a success at home

Magnusxi
Posts: 8
Joined: Fri May 08, 2015 8:46 am

Re: CentOS 7 Compiling errors

Post by Magnusxi » Fri May 22, 2015 5:13 pm

Wow Thank you! worked perfectly, my new server is up, your awesome Alexandre24

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: CentOS 7 Compiling errors

Post by Alexandre24 » Fri May 22, 2015 9:28 pm

Your welcome :)

Magnusxi
Posts: 8
Joined: Fri May 08, 2015 8:46 am

Re: CentOS 7 Compiling errors

Post by Magnusxi » Fri Jun 05, 2015 2:42 pm

EDIT: Issue Resolved.. I ran the following:

Code: Select all

LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
ldconfig

Upon trying to update i ran into an issue..

Code: Select all

[root@Cent7 darkstar]#./dsconnect
./dsconnect: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory
Ill break down the whole compile in case there is something i am overlooking

** tried to attach a file with the results of make {exluding errors which are below} but didnt seem to want me to... **

When i started the update i backed up my old server and that one still runs fine.. but when recompiling a new server..

Code: Select all

[root@Cent7 darkstar]# sh autogen.sh
configure.ac:129: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:129: the top level
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:141: the top level
configure.ac:153: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:153: the top level
configure.ac:129: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:129: the top level
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:141: the top level
configure.ac:153: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:153: the top level
configure.ac:129: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:129: the top level
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:141: the top level
configure.ac:153: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:153: the top level
configure.ac:129: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:129: the top level
configure.ac:141: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:141: the top level
configure.ac:153: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...
configure.ac:153: the top level
configure.ac:6: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:6: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:5: installing './config.guess'
configure.ac:5: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'
[root@Cent7 darkstar]# 

Code: Select all

[root@Cent7 darkstar]# ./configure --enable-debug
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LUA... yes
checking for ZMQ... yes
checking for mysql_config... /bin/mysql_config
checking whether to enable assertions... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether g++ supports -Wno-unused-parameter... yes
checking whether g++ supports -Wno-pointer-sign... yes
checking whether g++ supports -Wno-switch... yes
checking for setrlimit... yes
checking for sqrt in -lm... yes
checking for clock_gettime in -lrt... yes
Building Linux targets
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/common/config.h
config.status: executing depfiles commands
[root@Cent7 darkstar]# 
Here is what errored to terminal during make.. I attached the rest of the make output as a file

Code: Select all

[root@Cent7 darkstar]# make >> /test/error
src/common/kernel.cpp: In function ‘const char* get_git_revision()’:
src/common/kernel.cpp:170:30: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
         fgets(line, 1024, fp);
                              ^
src/common/zlib.cpp: In function ‘int32 zlib_init()’:
src/common/zlib.cpp:18:56: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
     fread(zlib_compress_table, sizeof(uint32), 512, fp);
                                                        ^
src/common/zlib.cpp:28:57: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
     fread(temp_decompress_table, sizeof(char), size, fp);
                                                         ^
src/map/instance_loader.cpp: In member function ‘CInstance* CInstanceLoader::LoadInstance(CInstance*)’:
src/map/instance_loader.cpp:100:3: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
   "SELECT mobname, mobid, pos_rot, pos_x, pos_y, pos_z, \
   ^
src/map/instance_loader.cpp:239:9: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
   Query =
         ^
src/map/linkshell.cpp: In function ‘void linkshell::LoadLinkshellList()’:
src/map/linkshell.cpp:368:46: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
                     PLinkshell->setMessage("");
                                              ^
src/map/linkshell.cpp: In function ‘uint32 linkshell::RegisterNewLinkshell(const int8*, uint16)’:
src/map/linkshell.cpp:450:42: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
                 PLinkshell->setMessage("");
                                          ^
src/map/navmesh.cpp: In member function ‘bool CNavMesh::load(char*)’:
src/map/navmesh.cpp:116:50: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
   fread(&header, sizeof(NavMeshSetHeader), 1, fp);
                                                  ^
src/map/navmesh.cpp:148:50: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
     fread(&tileHeader, sizeof(tileHeader), 1, fp);
                                                  ^
src/map/navmesh.cpp:155:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
     fread(data, tileHeader.dataSize, 1, fp);
                                            ^
src/map/packets/merit_points_categories.cpp: In constructor ‘CMeritPointsCategoriesPacket::CMeritPointsCategoriesPacket(CCharEntity*)’:
src/map/packets/merit_points_categories.cpp:80:64: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     MeritPointsCategoriesPacket(PChar, 5 * MAX_MERITS_IN_PACKET);
                                                                ^
src/map/packet_system.cpp: In function ‘void SmallPacket0x00A(map_session_data_t*, CCharEntity*, CBasicPacket)’:
src/map/packet_system.cpp:317:104: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     CTaskMgr::getInstance()->AddTask(new CTaskMgr::CTask("afterZoneIn", gettick() + 500, (void*)PChar->id, CTaskMgr::TASK_ONCE, luautils::AfterZoneIn));
                                                                                                        ^
src/map/packet_system.cpp: In function ‘void SmallPacket0x04D(map_session_data_t*, CCharEntity*, CBasicPacket)’:
src/map/packet_system.cpp:1520:22: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
             fmtQuery = "SELECT itemid, itemsubid, slot, quantity, sent, extra, sender, charname FROM delivery_box WHERE charid = %u AND box = 1 AND slot < 8 ORDER BY slot;";
                      ^
src/map/packet_system.cpp:1524:22: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
             fmtQuery = "SELECT itemid, itemsubid, slot, quantity, sent, extra, sender, charname FROM delivery_box WHERE senderid = %u AND box = 2 AND slot < 8 ORDER BY slot;";
                      ^
src/common/kernel.cpp: In function ‘const char* get_git_revision()’:
src/common/kernel.cpp:170:30: warning: ignoring return value of ‘char* fgets(char*, int, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
         fgets(line, 1024, fp);
                              ^
src/common/socket.cpp: In function ‘void socket_init_tcp()’:
src/common/socket.cpp:1031:31: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
  char *SOCKET_CONF_FILENAME = "./conf/packet_darkstar_tcp.conf";
                               ^
src/common/zlib.cpp: In function ‘int32 zlib_init()’:
src/common/zlib.cpp:18:56: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
     fread(zlib_compress_table, sizeof(uint32), 512, fp);
                                                        ^
src/common/zlib.cpp:28:57: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
     fread(temp_decompress_table, sizeof(char), size, fp);
                                                         ^
src/login/message_server.cpp: In function ‘void message_server_parse(MSGSERVTYPE, zmq::message_t*, zmq::message_t*, zmq::message_t*)’:
src/login/message_server.cpp:97:23: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
         int8* query = "SELECT server_addr, server_port FROM accounts_sessions LEFT JOIN chars ON \
                       ^
src/login/message_server.cpp:102:27: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
             int8* query = "SELECT server_addr, server_port FROM accounts_sessions WHERE charid = %d LIMIT 1;";
                           ^
src/login/message_server.cpp:111:23: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
         int8* query = "SELECT server_addr, server_port, MIN(charid) FROM accounts_sessions JOIN accounts_parties USING (charid) \
                       ^
src/login/message_server.cpp:119:23: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
         int8* query = "SELECT server_addr, server_port FROM accounts_sessions \
                       ^
src/login/message_server.cpp:126:23: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
         int8* query = "SELECT zoneip, zoneport FROM zone_settings WHERE misc & 1024 GROUP BY zoneip, zoneport;";
                       ^
src/login/message_server.cpp:133:23: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
         int8* query = "SELECT zoneip, zoneport FROM zone_settings GROUP BY zoneip, zoneport;";
                       ^
src/login/message_server.cpp:142:23: warning: deprecated conversion from string constant to ‘int8* {aka char*}’ [-Wwrite-strings]
         int8* query = "SELECT server_addr, server_port FROM accounts_sessions WHERE charid = %d; ";
                       ^
src/login/login_auth.cpp: In function ‘int32 login_parse(int32)’:
src/login/login_auth.cpp:221:34: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
                 char *fmtQuery = "SELECT max(accounts.id) FROM accounts;";
                                  ^
src/login/login_auth.cpp:249:26: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
                 fmtQuery = "INSERT INTO accounts(id,login,password,timecreate,timelastmodify,status,priv)\
                          ^
src/search/search.cpp: In function ‘void login_config_default()’:
src/search/search.cpp:419:37: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
     login_config.search_server_port = "54002";
                                     ^
[root@Cent7 darkstar]# 

Code: Select all

[root@Cent7 darkstar]#./dsconnect
./dsconnect: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory

Alexandre24
Posts: 175
Joined: Thu Mar 13, 2014 10:15 pm
Location: Hawkesbury, Ontario, CANADA

Re: CentOS 7 Compiling errors

Post by Alexandre24 » Tue Jun 23, 2015 1:36 am

Always the problem? Why you will does not install Linux Mint? It's very cool, easy (it's the same thing that Ubuntu without the scrap lol), stable et work perflectly for DSP!

Post Reply