Linux Server - Make Fail

Post Reply
xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Linux Server - Make Fail

Post by xelloss » Fri May 30, 2014 12:16 pm

Last time I updated my server was on 22 May. Tried to update today, failing during make. Error below:

Code: Select all

src/map/instance_loader.cpp: In member function 'CInstance* CInstanceLoader::LoadInstance()':
src/map/instance_loader.cpp:84:3: warning: deprecated conversion from string constant to 'int8* {aka char*}' [-Wwrite-strings]
src/map/instance_loader.cpp:224:9: warning: deprecated conversion from string constant to 'int8* {aka char*}' [-Wwrite-strings]
make: *** [dsgame-instance_loader.o] Error 1

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: Linux Server - Make Fail

Post by atom0s » Fri May 30, 2014 12:18 pm

The new instance stuff makes use of C++11 features, so be sure that your compiler is set to use C++11.
Since it looks like you use GCC, check this:
http://gcc.gnu.org/projects/cxx0x.html

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: Linux Server - Make Fail

Post by xelloss » Fri May 30, 2014 1:23 pm

That wouldn't cause it to fail in this manner. If you notice the depfiles are running g++ with the -std=gnu++0x attribute set.

I reran this through CLANG so it would actually tell me what was wrong:

Code: Select all

$ make
g++ -std=gnu++0x -DHAVE_CONFIG_H -I. -I./src/common      -DdsUDPSERV      -g -O2 -MT dsgame-instance_loader.o -MD -MP -MF .deps/dsgame-instance_loader.Tpo -c -o dsgame-instance_loader.o `test -f 'src/map/instance_loader.cpp' || echo './'`src/map/instance_loader.cpp
In file included from src/map/instance_loader.cpp:24:
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:535:6: error:
      no matching constructor for initialization of 'duration' (aka
      'std::chrono::duration<long, std::ratio<1, 1000000> >')
          : __d(__t.time_since_epoch())
            ^   ~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/condition_variable:106:42: note:
      in instantiation of function template specialization
      'std::chrono::time_point<std::chrono::system_clock,
      std::chrono::duration<long, std::ratio<1, 1000000> >
      >::time_point<std::chrono::duration<long, std::ratio<1, 1000000000> > >'
      requested here
        const __clock_t::time_point __s_atime = __s_entry + __delta;
                                                ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:234:12: note:
      candidate constructor not viable: no known conversion from
      'duration<[...], ratio<[...], 1000000000>>' to 'const duration<[...],
      ratio<[...], 1000000>>' for 1st argument
        constexpr duration(const duration&) = default;
                  ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:240:23: note:
      candidate template ignored: couldn't infer template argument ''
          constexpr explicit duration(const _Rep2& __rep)
                             ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:247:14: note:
      candidate template ignored: couldn't infer template argument ''
          constexpr duration(const duration<_Rep2, _Period2>& __d)
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:232:12: note:
      candidate constructor not viable: requires 0 arguments, but 1 was provided
        constexpr duration() : __r() { }
                  ^
src/map/instance_loader.cpp:70:51: error: invalid operands to binary expression
      ('int' and 'std::future_status')
  ...task.wait_for(std::chrono::milliseconds(0)) == std::future_status::ready)
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_pair.h:201:5: note:
      candidate template ignored: could not match 'pair<type-parameter-0-0,
      type-parameter-0-1>' against 'bool'
    operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/tuple:575:5: note:
      candidate template ignored: could not match 'tuple<type-parameter-0-0...>'
      against 'bool'
    operator==(const tuple<_TElements...>& __t,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/functional:2227:5: note:
      candidate template ignored: could not match 'function<type-parameter-0-0
      (type-parameter-0-1...)>' against 'bool'
    operator==(const function<_Res(_Args...)>& __f, nullptr_t)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/functional:2233:5: note:
      candidate template ignored: could not match 'function<type-parameter-0-0
      (type-parameter-0-1...)>' against 'std::future_status'
    operator==(nullptr_t, const function<_Res(_Args...)>& __f)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_iterator.h:285:5: note:
      candidate template ignored: could not match
      'reverse_iterator<type-parameter-0-0>' against 'bool'
    operator==(const reverse_iterator<_Iterator>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_iterator.h:335:5: note:
      candidate template ignored: could not match
      'reverse_iterator<type-parameter-0-0>' against 'bool'
    operator==(const reverse_iterator<_IteratorL>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_iterator.h:1025:5: note:
      candidate template ignored: could not match
      'move_iterator<type-parameter-0-0>' against 'bool'
    operator==(const move_iterator<_IteratorL>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_iterator.h:1031:5: note:
      candidate template ignored: could not match
      'move_iterator<type-parameter-0-0>' against 'bool'
    operator==(const move_iterator<_Iterator>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/allocator.h:122:5: note:
      candidate template ignored: could not match
      'allocator<type-parameter-0-0>' against 'bool'
    operator==(const allocator<_T1>&, const allocator<_T2>&)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/allocator.h:127:5: note:
      candidate template ignored: could not match
      'allocator<type-parameter-0-0>' against 'bool'
    operator==(const allocator<_Tp>&, const allocator<_Tp>&)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/postypes.h:218:5: note:
      candidate template ignored: could not match 'fpos<type-parameter-0-0>'
      against 'bool'
    operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/unique_ptr.h:434:5: note:
      candidate template ignored: could not match
      'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'bool'
    operator==(const unique_ptr<_Tp, _Dp>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/unique_ptr.h:440:5: note:
      candidate template ignored: could not match
      'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against 'bool'
    operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/unique_ptr.h:445:5: note:
      candidate template ignored: could not match
      'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against
      'std::future_status'
    operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __y)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/shared_ptr_base.h:1054:5: note:
      candidate template ignored: could not match
      '__shared_ptr<type-parameter-0-0, _Lp>' against 'bool'
    operator==(const __shared_ptr<_Tp1, _Lp>& __a,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/shared_ptr_base.h:1060:5: note:
      candidate template ignored: could not match
      '__shared_ptr<type-parameter-0-0, _Lp>' against 'bool'
    operator==(const __shared_ptr<_Tp, _Lp>& __a, nullptr_t)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/shared_ptr_base.h:1065:5: note:
      candidate template ignored: could not match
      '__shared_ptr<type-parameter-0-0, _Lp>' against 'std::future_status'
    operator==(nullptr_t, const __shared_ptr<_Tp, _Lp>& __b)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/shared_ptr.h:328:5: note:
      candidate template ignored: could not match
      'shared_ptr<type-parameter-0-0>' against 'bool'
    operator==(const shared_ptr<_Tp1>& __a, const shared_ptr<_Tp2>& __b)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/shared_ptr.h:333:5: note:
      candidate template ignored: could not match
      'shared_ptr<type-parameter-0-0>' against 'bool'
    operator==(const shared_ptr<_Tp>& __a, nullptr_t)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/shared_ptr.h:338:5: note:
      candidate template ignored: could not match
      'shared_ptr<type-parameter-0-0>' against 'std::future_status'
    operator==(nullptr_t, const shared_ptr<_Tp>& __b)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/basic_string.h:2427:5: note:
      candidate template ignored: could not match
      'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>'
      against 'bool'
    operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/basic_string.h:2434:5: note:
      candidate template ignored: could not match
      'basic_string<type-parameter-0-0, char_traits<type-parameter-0-0>,
      allocator<type-parameter-0-0> >' against 'bool'
    operator==(const basic_string<_CharT>& __lhs,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/basic_string.h:2448:5: note:
      candidate template ignored: could not match 'const _CharT *' against
      'bool'
    operator==(const _CharT* __lhs,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/basic_string.h:2460:5: note:
      candidate template ignored: could not match
      'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>'
      against 'bool'
    operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_vector.h:1273:5: note:
      candidate template ignored: could not match 'vector<type-parameter-0-0,
      type-parameter-0-1>' against 'bool'
    operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:1730:5: note:
      candidate template ignored: could not match
      'uniform_int_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::uniform_int_distribution<_IntType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:1911:5: note:
      candidate template ignored: could not match
      'uniform_real_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::uniform_real_distribution<_IntType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:2803:5: note:
      candidate template ignored: could not match
      'cauchy_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::cauchy_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:3720:5: note:
      candidate template ignored: could not match
      'geometric_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::geometric_distribution<_IntType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:4264:5: note:
      candidate template ignored: could not match
      'exponential_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::exponential_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:4439:5: note:
      candidate template ignored: could not match
      'weibull_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::weibull_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:4614:5: note:
      candidate template ignored: could not match
      'extreme_value_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::extreme_value_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:4846:5: note:
      candidate template ignored: could not match
      'discrete_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::discrete_distribution<_IntType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:5085:5: note:
      candidate template ignored: could not match
      'piecewise_constant_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::piecewise_constant_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.h:5327:5: note:
      candidate template ignored: could not match
      'piecewise_linear_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::piecewise_linear_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/random.tcc:1686:5: note:
      candidate template ignored: could not match
      'normal_distribution<type-parameter-0-0>' against 'bool'
    operator==(const std::normal_distribution<_RealType>& __d1,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_deque.h:246:5: note:
      candidate template ignored: could not match
      '_Deque_iterator<type-parameter-0-0, type-parameter-0-1,
      type-parameter-0-2>' against 'bool'
    operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_deque.h:253:5: note:
      candidate template ignored: could not match
      '_Deque_iterator<type-parameter-0-0, type-parameter-0-1,
      type-parameter-0-2>' against 'bool'
    operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_deque.h:1917:5: note:
      candidate template ignored: could not match 'deque<type-parameter-0-0,
      type-parameter-0-1>' against 'bool'
    operator==(const deque<_Tp, _Alloc>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_queue.h:103:9: note:
      candidate template ignored: could not match 'queue<type-parameter-0-0,
      type-parameter-0-1>' against 'bool'
        operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&);
        ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_list.h:275:5: note:
      candidate template ignored: could not match
      '_List_iterator<type-parameter-0-0>' against 'bool'
    operator==(const _List_iterator<_Val>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_list.h:1564:5: note:
      candidate template ignored: could not match 'list<type-parameter-0-0,
      type-parameter-0-1>' against 'bool'
    operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_tree.h:309:5: note:
      candidate template ignored: could not match
      '_Rb_tree_iterator<type-parameter-0-0>' against 'bool'
    operator==(const _Rb_tree_iterator<_Val>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_tree.h:856:5: note:
      candidate template ignored: could not match '_Rb_tree<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2, type-parameter-0-3,
      type-parameter-0-4>' against 'bool'
    operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x,
    ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_map.h:861:9: note:
      candidate template ignored: could not match 'map<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against
      'bool'
        operator==(const map<_K1, _T1, _C1, _A1>&,
        ^
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/stl_multimap.h:800:5: note:
      candidate template ignored: could not match 'multimap<type-parameter-0-0,
      type-parameter-0-1, type-parameter-0-2, type-parameter-0-3>' against
      'bool'
    operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x,
    ^
src/map/instance_loader.cpp:84:3: warning: conversion from string literal to
      'int8 *' (aka 'char *') is deprecated [-Wdeprecated-writable-strings]
                "SELECT name, mobid, pos_rot, pos_x, pos_y, pos_z, \
                ^
src/map/instance_loader.cpp:198:29: warning: using the result of an assignment
      as a condition without parentheses [-Wparentheses]
  ...if (PMob->m_AllowRespawn = PMob->m_SpawnType == SPAWNTYPE_NORMAL)
         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/map/instance_loader.cpp:198:29: note: place parentheses around the
      assignment to silence this warning
  ...if (PMob->m_AllowRespawn = PMob->m_SpawnType == SPAWNTYPE_NORMAL)
                              ^
         (                                                           )
src/map/instance_loader.cpp:198:29: note: use '==' to turn this assignment into
      an equality comparison
                        if (PMob->m_AllowRespawn = PMob->m_SpawnType == ...
                                                 ^
                                                 ==
src/map/instance_loader.cpp:224:9: warning: conversion from string literal to
      'int8 *' (aka 'char *') is deprecated [-Wdeprecated-writable-strings]
        "SELECT npcid, name, pos_rot, pos_x, pos_y, pos_z,\
        ^
3 warnings and 2 errors generated.
make: *** [dsgame-instance_loader.o] Error 1

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Linux Server - Make Fail

Post by kjLotus » Fri May 30, 2014 4:45 pm

i had the wrong branch checked out when i was making sure it compiled on linux ><

i'll git er dun

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Linux Server - Make Fail

Post by kjLotus » Fri May 30, 2014 6:32 pm

yeah, g++ 4.6 doesn't fly anymore. 4.8 compiled fine, so you'll have to update that

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: Linux Server - Make Fail

Post by xelloss » Fri May 30, 2014 6:58 pm

Ugh, building GCC from source is a headache and a half. Requiring > 4.6 basically means 12.04 is now dead to the project unless you're using PPAs or willing to stifle the headache. Going to see if I can't just do the whole damn thing in CLANG, instead of GCC.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Linux Server - Make Fail

Post by kjLotus » Fri May 30, 2014 7:18 pm

yeah, i'm using 14.04 now :)

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Linux Server - Make Fail

Post by bluekirby0 » Thu Jun 19, 2014 5:32 am

http://askubuntu.com/questions/271388/h ... e-terminal

But seriously if you are still running 12.04 its probably time to upgrade unless there is a particular driver concern holding you back.

xelloss
Posts: 57
Joined: Sat Mar 09, 2013 1:09 am

Re: Linux Server - Make Fail

Post by xelloss » Fri Jun 20, 2014 1:53 am

bluekirby0 wrote:http://askubuntu.com/questions/271388/h ... e-terminal

But seriously if you are still running 12.04 its probably time to upgrade unless there is a particular driver concern holding you back.
Canonical recommends not upgrading a production server from one LTS to the next until the first OS patch; that's SOP - not to mention the whole point of LTS is long term support. However, I recently migrated my production servers ( which the FFXI server was running from off to the side ) from 12.04 over to OpenVZ's LXC containers running on a CentOS6.5 host ( for better security ). New FFXI server container can and is running 14.04 so no longer an issue; will just use lastest builds for this container instead of relying on LTS since the FFXI server I'm running isn't what anyone would call a production environment. I thought about using Docker.IO's setup instead but I like the idea of having a machine instead of a service; it's easy enough to tear down and build up new containers anyway.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Linux Server - Make Fail

Post by bluekirby0 » Fri Jun 20, 2014 6:44 am

I didn't seriously think anyone would run this thing off of a production server that provides any other significant service...with the code being in a constant state of change its rather risky to put it next to anything vital enough to merit a strong focus on stability. It'd be pretty easy for a memory leak to eat your resources alive or for a script error to deadlock a CPU with relatively minor coding errors. Would recommend keeping DSP far away from anything else you care about uptime with.

Post Reply