[LINUX] Error on compile

A special collection of guides, for those taking their first steps with POL or eScript
Post Reply
skllz
New User
Posts: 4
Joined: Wed Dec 30, 2015 5:28 am

[LINUX] Error on compile

Post by skllz »

Hi,
i try run ./build_linux.sh, but i receive this error:

Code: Select all

Building CXX object pol-core/pol/CMakeFiles/pol.dir/tildecmd.cpp.o
/home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp: In member function ‘bool Pol::Core::BSQLConnection::query(std::string, Pol::Core::QueryParams)’:
/home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp:327:100: error: no matching function for call to ‘regex_replace(std::string&, std::regex&, char*&, const match_flag_type&)’
         replaced = std::regex_replace(replaced, re, escptr, std::regex_constants::format_first_only);
                                                                                                    ^
/home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp:327:100: note: candidates are:
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp:33:
/usr/include/c++/4.8/bits/regex.h:2162:5: note: template<class _Out_iter, class _Bi_iter, class _Rx_traits, class _Ch_type> _Out_iter std::regex_replace(_Out_iter, _Bi_iter, _Bi_iter, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last,
     ^
/usr/include/c++/4.8/bits/regex.h:2162:5: note:   template argument deduction/substitution failed:
/home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp:327:100: note:   deduced conflicting types for parameter ‘_Bi_iter’ (‘std::basic_regex<char>’ and ‘char*’)
         replaced = std::regex_replace(replaced, re, escptr, std::regex_constants::format_first_only);
                                                                                                    ^
In file included from /usr/include/c++/4.8/regex:62:0,
                 from /home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp:33:
/usr/include/c++/4.8/bits/regex.h:2182:5: note: template<class _Rx_traits, class _Ch_type> std::basic_string<_Ch_type> std::regex_replace(const std::basic_string<_Ch_type>&, const std::basic_regex<_Ch_type, _Rx_traits>&, const std::basic_string<_Ch_type>&, std::regex_constants::match_flag_type)
     regex_replace(const basic_string<_Ch_type>& __s,
     ^
/usr/include/c++/4.8/bits/regex.h:2182:5: note:   template argument deduction/substitution failed:
/home/lucas/Documentos/polserver/pol-core/pol/sqlscrobj.cpp:327:100: note:   mismatched types ‘const std::basic_string<_Ch_type>’ and ‘char*’
         replaced = std::regex_replace(replaced, re, escptr, std::regex_constants::format_first_only);
                                                                                                    ^
make[2]: ** [pol-core/pol/CMakeFiles/pol.dir/sqlscrobj.cpp.o] Erro 1
make[2]: ** Esperando que outros processos terminem.
make[1]: ** [pol-core/pol/CMakeFiles/pol.dir/all] Erro 2
make: ** [all] Erro 2

Any ideas?

Thanks
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: [LINUX] Error on compile

Post by Nando »

Hi, it seems that GCC 4.8 has a broken implementation of regex. While we work this out, you will need at least GCC 4.9 or a recent version of CLANG to compile the core.
skllz
New User
Posts: 4
Joined: Wed Dec 30, 2015 5:28 am

Re: [LINUX] Error on compile

Post by skllz »

Thanks, works fine!
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: [LINUX] Error on compile

Post by Nando »

Let us know if there's any other problem. :)
skllz
New User
Posts: 4
Joined: Wed Dec 30, 2015 5:28 am

Re: [LINUX] Error on compile

Post by skllz »

I have, :D

How do start server? I search here and found this: Start POL manually, name the script 'polstart'

But, not found this script. :shame:
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: [LINUX] Error on compile

Post by boberski »

Code: Select all

./pol
skllz
New User
Posts: 4
Joined: Wed Dec 30, 2015 5:28 am

Re: [LINUX] Error on compile

Post by skllz »

Sorry for be stupid hahaha
I try, but not found pol.cfg. I found pol.cfg in ~/Documentos/polserver/pol-core/support/

Code: Select all

lucas@Storm000137: ~/Documentos/polserver/pol-core/bin (master)$ ./pol
POL99.0.0 Break Everything Even Rudder - LINUX (64bit)
compiled on Dec 30 2015 11:38:41
Copyright (C) 1993-2015 Eric N. Swanson

Sizes: 
   UObject:    120
   Item:       184
   UContainer: 224
   Character:  920
   Client:     3168
   NPC:        992

Using 2 out of 4 worldsave threads
Reading Configuration.
Unable to open configuration file pol.cfg
Server Shutdown: reading pol.cfg
Initiating POL Cleanup....
bobjectimp instances: 0
Execution aborted due to: Unable to open configuration file pol.cfg

Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: [LINUX] Error on compile

Post by Nando »

What you get after compilation is only the software necessary to run a shard, but not its config. To run a shard, you need configs which define which ports are acceptable, which clients can login, which accounts exist, which items are in the world, scripts which define items behaviors, just to cite a few things.

Because it'd be a lot of work to recreate all of this by yourself, it is common to have a "Distro" or disribution package. The distro contains a basic set of scripts and configs to get a shard running. This is likely the most helpful distro: current distro
Be aware that there may be some bugs when running this distro on Linux, but Yukiko and Aderal are trying to fix that.

My advice is to search the boards, there are some great guides on how to start a shard. You will also need to convert the MUL files from the client to a format that POL understands (using uoconvert).
Post Reply