Yaribz / SPADS

SpringRTS Perl Autohost for Dedicated Server
GNU General Public License v3.0
17 stars 16 forks source link

Error while generating unitsync interface #12

Closed TurBoss closed 8 years ago

TurBoss commented 8 years ago

today i was trying to move my spads setup from debian to Arch so I started over instead of just copy and paste the files

but I hit this error

$ ./spadsInstaller.pl

This program will install SPADS in the current working directory, overwriting files if needed.
The installer will ask you 14 questions to customize your installation and pre-configure SPADS.
You can stop this installation at any time by hitting Ctrl-c.
Note: if SPADS is already installed on the system, you don't need to reinstall it to run multiple autohosts. Instead, you can share SPADS binaries and use multiple configuration files and/or configuration macros.

1/14 - Which SPADS release do you want to install (stable,testing,unstable,contrib) [testing] ?
NOTICE   - [SpadsInstaller] SPADS components are up to date, proceeding with installation...
2/14 - Please enter the absolute path of the unitsync library (libunitsync.so) [] ? /home/spring/.spring/engine/103.0/libunitsync.so
NOTICE   - [SpadsInstaller] Generating Perl Unitsync interface module
In file included from /usr/include/c++/6.1.1/cmath:42:0,
                 from /usr/include/c++/6.1.1/math.h:36,
                 from PerlUnitSync_wrap.c:734:
/usr/include/c++/6.1.1/bits/cpp_type_traits.h:145:12: error: redefinition of 'struct std::__is_integer<char>'
     struct __is_integer<char>
            ^~~~~~~~~~~~~~~~~~
/usr/include/c++/6.1.1/bits/cpp_type_traits.h:138:12: error: previous definition of 'struct std::__is_integer<char>'
     struct __is_integer<bool>
            ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6.1.1/bits/move.h:57:0,
                 from /usr/include/c++/6.1.1/bits/stl_pair.h:59,
                 from /usr/include/c++/6.1.1/bits/stl_algobase.h:64,
                 from /usr/include/c++/6.1.1/bits/char_traits.h:39,
                 from /usr/include/c++/6.1.1/string:40,
                 from unitsync.h:6,
                 from PerlUnitSync_wrap.c:1550:
/usr/include/c++/6.1.1/type_traits:217:12: error: redefinition of 'struct std::__is_integral_helper<char>'
     struct __is_integral_helper<char>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/6.1.1/type_traits:213:12: error: previous definition of 'struct std::__is_integral_helper<char>'
     struct __is_integral_helper<bool>
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6.1.1/exception:170:0,
                 from /usr/include/c++/6.1.1/new:40,
                 from /usr/include/c++/6.1.1/ext/new_allocator.h:33,
                 from /usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/include/c++/6.1.1/bits/allocator.h:46,
                 from /usr/include/c++/6.1.1/string:41,
                 from unitsync.h:6,
                 from PerlUnitSync_wrap.c:1550:
/usr/include/c++/6.1.1/bits/exception_ptr.h: In member function 'std::__exception_ptr::exception_ptr::operator char() const':
/usr/include/c++/6.1.1/bits/exception_ptr.h:141:16: error: invalid conversion from 'void*' to 'char' [-fpermissive]
       { return _M_exception_object; }
                ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6.1.1/exception:171:0,
                 from /usr/include/c++/6.1.1/new:40,
                 from /usr/include/c++/6.1.1/ext/new_allocator.h:33,
                 from /usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/include/c++/6.1.1/bits/allocator.h:46,
                 from /usr/include/c++/6.1.1/string:41,
                 from unitsync.h:6,
                 from PerlUnitSync_wrap.c:1550:
/usr/include/c++/6.1.1/bits/nested_exception.h: In member function 'void std::nested_exception::rethrow_nested() const':
/usr/include/c++/6.1.1/bits/nested_exception.h:73:11: error: invalid user-defined conversion from 'const std::__exception_ptr::exception_ptr' to 'bool' [-fpermissive]
       if (_M_ptr)
           ^~~~~~
In file included from /usr/include/c++/6.1.1/exception:170:0,
                 from /usr/include/c++/6.1.1/new:40,
                 from /usr/include/c++/6.1.1/ext/new_allocator.h:33,
                 from /usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/include/c++/6.1.1/bits/allocator.h:46,
                 from /usr/include/c++/6.1.1/string:41,
                 from unitsync.h:6,
                 from PerlUnitSync_wrap.c:1550:
/usr/include/c++/6.1.1/bits/exception_ptr.h:140:16: note: candidate is: std::__exception_ptr::exception_ptr::operator char() const <near match>
       explicit operator bool() const
                ^~~~~~~~
/usr/include/c++/6.1.1/bits/exception_ptr.h:140:16: note:   return type 'char' of explicit conversion function cannot be converted to 'bool' with a qualification conversion
In file included from /usr/include/c++/6.1.1/bits/basic_string.h:5628:0,
                 from /usr/include/c++/6.1.1/string:52,
                 from unitsync.h:6,
                 from PerlUnitSync_wrap.c:1550:
/usr/include/c++/6.1.1/bits/functional_hash.h: At global scope:
/usr/include/c++/6.1.1/bits/functional_hash.h:111:3: error: redefinition of 'struct std::hash<char>'
   _Cxx_hashtable_define_trivial_hash(char)
   ^
/usr/include/c++/6.1.1/bits/functional_hash.h:108:3: error: previous definition of 'struct std::hash<char>'
   _Cxx_hashtable_define_trivial_hash(bool)
   ^
CRITICAL - [SpadsInstaller] Error during Unitsync wrapper compilation
Yaribz commented 8 years ago

Can you try this, in line 295 of file spadsInstaller.pl remove the string -Dbool=char, so that the line becomes:

system("g++ -c PerlUnitSync_wrap.c $coreIncsString");
TurBoss commented 8 years ago

worked fine Installation success

Yaribz commented 8 years ago

committed in 6a12404