slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.28k stars 1.29k forks source link

perl Build.PL error while try build xs #5126

Open danialhedaiat opened 2 years ago

danialhedaiat commented 2 years ago

Describe the bug

Hi i try use slic3r doc to personalize(modify), compile and run slic3r , so I install boost 1.67 at first , then install strawberry x64 and download slic3r source and in terminal run perl Build.PL but after while i got this error message

g++ -c -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -xc++ -Isrc/libslic3r -IC:\dev\boost_1_67 -DHAS_BOOL -DNOGDI -DSLIC3RXS -DBOOST_ASIO_DISABLE_KQUEUE -Dexprtk_disable_rtl_io_file -Dexprtk_disable_return_statement -Dexprtk_disable_rtl_vecops -Dexprtk_disable_string_capabilities -Dexprtk_disable_enhanced_features -std=gnu++11 -DNOMINMAX -DNDEBUG -O -Wno-undefined-var-template -Isrc -Ibuildtmp -s -O2 -I"C:\STRAWB~1\perl\lib\CORE" -I"C:\STRAWB~1\c\include" -o "src\libslic3r\GCodeSender.o" "src\libslic3r\GCodeSender.cpp"
src\libslic3r\GCodeSender.cpp: In member function 'void Slic3r::GCodeSender::set_DTR(bool)':
src\libslic3r\GCodeSender.cpp:532:11: error: 'Slic3r::asio::serial_port_service' has not been declared
     asio::serial_port_service::native_handle_type handle = this->serial.native_handle();
           ^~~~~~~~~~~~~~~~~~~
src\libslic3r\GCodeSender.cpp:534:28: error: 'handle' was not declared in this scope
         EscapeCommFunction(handle, SETDTR);
                            ^~~~~~
src\libslic3r\GCodeSender.cpp:534:28: note: suggested alternative:
In file included from C:\dev\boost_1_67/boost/thread/win32/thread_data.hpp:11,
                 from C:\dev\boost_1_67/boost/thread/thread_only.hpp:15,
                 from C:\dev\boost_1_67/boost/thread/thread.hpp:12,
                 from C:\dev\boost_1_67/boost/thread.hpp:13,
                 from src\libslic3r\libslic3r.h:17,
                 from src\libslic3r\GCodeSender.hpp:4,
                 from src\libslic3r\GCodeSender.cpp:1:
C:\dev\boost_1_67/boost/thread/win32/thread_primitives.hpp:48:46: note:   'boost::detail::win32::handle'
             typedef ::boost::winapi::HANDLE_ handle;
                                              ^~~~~~
src\libslic3r\GCodeSender.cpp:536:28: error: 'handle' was not declared in this scope
         EscapeCommFunction(handle, CLRDTR);
                            ^~~~~~
src\libslic3r\GCodeSender.cpp:536:28: note: suggested alternative:
In file included from C:\dev\boost_1_67/boost/thread/win32/thread_data.hpp:11,
                 from C:\dev\boost_1_67/boost/thread/thread_only.hpp:15,
                 from C:\dev\boost_1_67/boost/thread/thread.hpp:12,
                 from C:\dev\boost_1_67/boost/thread.hpp:13,
                 from src\libslic3r\libslic3r.h:17,
                 from src\libslic3r\GCodeSender.hpp:4,
                 from src\libslic3r\GCodeSender.cpp:1:
C:\dev\boost_1_67/boost/thread/win32/thread_primitives.hpp:48:46: note:   'boost::detail::win32::handle'
             typedef ::boost::winapi::HANDLE_ handle;
                                              ^~~~~~
At global scope:
cc1plus.exe: warning: unrecognized command line option '-Wno-undefined-var-template'
error building xs.dll file from 'src\libslic3r\GCodeSender.cpp' at C:/Strawberry/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 128.
FAIL
! Installing ./xs failed. See C:\Users\dania\.cpanm\work\1643808728.13504\build.log for details. Retry with --force to force install it.
The XS/C++ code failed to compile, aborting

i will appreciate for any suggestion

i try it with boost 1.73 and got different error

g++ -c -DWIN32 -DWIN64 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -xc++ -Isrc/libslic3r -IC:\dev\boost_1_73_0 -IC:\boost_1_67 -IC:\boost_1_78_0 -DHAS_BOOL -DNOGDI -DSLIC3RXS -DBOOST_ASIO_DISABLE_KQUEUE -Dexprtk_disable_rtl_io_file -Dexprtk_disable_return_statement -Dexprtk_disable_rtl_vecops -Dexprtk_disable_string_capabilities -Dexprtk_disable_enhanced_features -std=gnu++11 -DNOMINMAX -DNDEBUG -O -Wno-undefined-var-template -Isrc -Ibuildtmp -s -O2 -I"C:\STRAWB~1\perl\lib\CORE" -I"C:\STRAWB~1\c\include" -o "src\boost\nowide\iostream.o" "src\boost\nowide\iostream.cpp"
src\boost\nowide\iostream.cpp: In member function 'int boost::nowide::details::console_output_buffer::write(const char*, int)':
src\boost\nowide\iostream.cpp:64:35: error: 'boost::locale' has not been declared
             namespace uf = boost::locale::utf;
                                   ^~~~~~
src\boost\nowide\iostream.cpp:64:43: error: 'utf' is not a namespace-name
             namespace uf = boost::locale::utf;
                                           ^~~
src\boost\nowide\iostream.cpp:64:46: error: expected namespace-name before ';' token
             namespace uf = boost::locale::utf;
                                              ^
src\boost\nowide\iostream.cpp:76:13: error: 'uf' has not been declared
             uf::code_point c;
             ^~
src\boost\nowide\iostream.cpp:78:29: error: 'c' was not declared in this scope
             while(p < e && (c = uf::utf_traits<char>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                             ^
src\boost\nowide\iostream.cpp:78:33: error: 'uf' has not been declared
             while(p < e && (c = uf::utf_traits<char>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                                 ^~
src\boost\nowide\iostream.cpp:78:48: error: expected primary-expression before 'char'
             while(p < e && (c = uf::utf_traits<char>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                                                ^~~~
src\boost\nowide\iostream.cpp:78:48: error: expected ')' before 'char'
             while(p < e && (c = uf::utf_traits<char>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                            ~                   ^~~~
                                                )
src\boost\nowide\iostream.cpp:81:14: error: expected ')' before 'if'
             }
              ^
              )
             if(c==uf::illegal)
             ~~
src\boost\nowide\iostream.cpp:78:18: note: to match this '('
             while(p < e && (c = uf::utf_traits<char>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                  ^
src\boost\nowide\iostream.cpp:82:19: error: 'uf' has not been declared
             if(c==uf::illegal)
                   ^~
src\boost\nowide\iostream.cpp: In member function 'size_t boost::nowide::details::console_input_buffer::read()':
src\boost\nowide\iostream.cpp:162:35: error: 'boost::locale' has not been declared
             namespace uf = boost::locale::utf;
                                   ^~~~~~
src\boost\nowide\iostream.cpp:162:43: error: 'utf' is not a namespace-name
             namespace uf = boost::locale::utf;
                                           ^~~
src\boost\nowide\iostream.cpp:162:46: error: expected namespace-name before ';' token
             namespace uf = boost::locale::utf;
                                              ^
src\boost\nowide\iostream.cpp:178:13: error: 'uf' has not been declared
             uf::code_point c;
             ^~
src\boost\nowide\iostream.cpp:180:29: error: 'c' was not declared in this scope
             while(p < e && (c = uf::utf_traits<wchar_t>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                             ^
src\boost\nowide\iostream.cpp:180:33: error: 'uf' has not been declared
             while(p < e && (c = uf::utf_traits<wchar_t>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                                 ^~
src\boost\nowide\iostream.cpp:180:48: error: expected primary-expression before 'wchar_t'
             while(p < e && (c = uf::utf_traits<wchar_t>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                                                ^~~~~~~
src\boost\nowide\iostream.cpp:180:48: error: expected ')' before 'wchar_t'
             while(p < e && (c = uf::utf_traits<wchar_t>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                            ~                   ^~~~~~~
                                                )
src\boost\nowide\iostream.cpp:183:14: error: expected ')' before 'if'
             }
              ^
              )
src\boost\nowide\iostream.cpp:185:13:
             if(c==uf::illegal)
             ~~
src\boost\nowide\iostream.cpp:180:18: note: to match this '('
             while(p < e && (c = uf::utf_traits<wchar_t>::decode(p,e))!=uf::illegal && c!=uf::incomplete) {
                  ^
src\boost\nowide\iostream.cpp:185:19: error: 'uf' has not been declared
             if(c==uf::illegal)
                   ^~
src\boost\nowide\iostream.cpp:189:16: error: 'c' was not declared in this scope
             if(c==uf::incomplete) {
                ^
src\boost\nowide\iostream.cpp:189:19: error: 'uf' has not been declared
             if(c==uf::incomplete) {
                   ^~
src\boost\nowide\iostream.cpp: At global scope:
src\boost\nowide\iostream.cpp:206:5: error: 'winconsole_ostream' does not name a type; did you mean 'WinConsoleLogonSid'?
     winconsole_ostream::winconsole_ostream(int fd) : std::ostream(0)
     ^~~~~~~~~~~~~~~~~~
     WinConsoleLogonSid
src\boost\nowide\iostream.cpp:221:5: error: 'winconsole_ostream' does not name a type; did you mean 'WinConsoleLogonSid'?
     winconsole_ostream::~winconsole_ostream()
     ^~~~~~~~~~~~~~~~~~
     WinConsoleLogonSid
src\boost\nowide\iostream.cpp:225:5: error: 'winconsole_istream' does not name a type; did you mean 'SetConsoleTitleW'?
     winconsole_istream::winconsole_istream() : std::istream(0)
     ^~~~~~~~~~~~~~~~~~
     SetConsoleTitleW
src\boost\nowide\iostream.cpp:232:5: error: 'winconsole_istream' does not name a type; did you mean 'SetConsoleTitleW'?
     winconsole_istream::~winconsole_istream()
     ^~~~~~~~~~~~~~~~~~
     SetConsoleTitleW
src\boost\nowide\iostream.cpp:238:28: error: 'winconsole_istream' in namespace 'boost::nowide::details' does not name a type
 BOOST_NOWIDE_DECL details::winconsole_istream cin;
                            ^~~~~~~~~~~~~~~~~~
src\boost\nowide\iostream.cpp:239:28: error: 'winconsole_ostream' in namespace 'boost::nowide::details' does not name a type
 BOOST_NOWIDE_DECL details::winconsole_ostream cout(1);
                            ^~~~~~~~~~~~~~~~~~
src\boost\nowide\iostream.cpp:240:28: error: 'winconsole_ostream' in namespace 'boost::nowide::details' does not name a type
 BOOST_NOWIDE_DECL details::winconsole_ostream cerr(2);
                            ^~~~~~~~~~~~~~~~~~
src\boost\nowide\iostream.cpp:241:28: error: 'winconsole_ostream' in namespace 'boost::nowide::details' does not name a type
 BOOST_NOWIDE_DECL details::winconsole_ostream clog(2);
                            ^~~~~~~~~~~~~~~~~~
cc1plus.exe: warning: unrecognized command line option '-Wno-undefined-var-template'
error building xs.dll file from 'src\boost\nowide\iostream.cpp' at C:/Strawberry/perl/lib/ExtUtils/CBuilder/Platform/Windows.pm line 128.
FAIL
! Installing ./xs failed. See C:\Users\dania\.cpanm\work\1643815133.14636\build.log for details. Retry with --force to force install it.
The XS/C++ code failed to compile, aborting