Boost Ошибка при попытке создать boost для mingw в Windows 10 - PullRequest
0 голосов
/ 10 марта 2020

Я пытаюсь построить boost для Mingw. Я скачал .zip файл, распаковал его. У меня уже установлен Mingw, и его путь добавлен. Мои g++ gcc работают нормально. Тогда я не попал в папку tools в извлеченной папке boost и внутри нее, в папку build. Там я открыл powershell и запустил команду bootstrap.bat mingw. Но мое здание терпит неудачу, и я получаю следующую ошибку:

builtins.cpp: In function 'FILE* windows_popen_wrapper(const char*, const char*)':
builtins.cpp:2483:18: error: '_popen' was not declared in this scope
         result = _popen( command, "r" );
                  ^~~~~~
builtins.cpp:2483:18: note: suggested alternative: '_lopen'
         result = _popen( command, "r" );
                  ^~~~~~
                  _lopen
builtins.cpp: In function 'LIST* builtin_shell(FRAME*, int)':
builtins.cpp:2418:20: error: '_pclose' was not declared in this scope
     #define pclose _pclose
                    ^~~~~~~
builtins.cpp:2549:19: note: in expansion of macro 'pclose'
     exit_status = pclose( p );
                   ^~~~~~
builtins.cpp:2418:20: note: suggested alternative: '_lclose'
     #define pclose _pclose
                    ^~~~~~~
builtins.cpp:2549:19: note: in expansion of macro 'pclose'
     exit_status = pclose( p );
                   ^~~~~~
debugger.cpp: In function 'char* debug_string_read(FILE*)':
debugger.cpp:110:14: error: 'strdup' was not declared in this scope
     result = strdup( buf->value );
              ^~~~~~
debugger.cpp:110:14: note: suggested alternative: 'strcmp'
     result = strdup( buf->value );
              ^~~~~~
              strcmp
debugger.cpp: In function 'void debug_init_handles(const char*, const char*)':
debugger.cpp:1073:21: error: '_fdopen' was not declared in this scope
     command_input = _fdopen( read_fd, "r" );
                     ^~~~~~~
debugger.cpp:1073:21: note: suggested alternative: '_wsopen'
     command_input = _fdopen( read_fd, "r" );
                     ^~~~~~~
                     _wsopen
debugger.cpp: In function 'void init_parent_handles(HANDLE, HANDLE)':
debugger.cpp:1091:21: error: '_fdopen' was not declared in this scope
     command_child = _fdopen( _open_osfhandle( (intptr_t)in, _O_RDONLY ), "r" );
                     ^~~~~~~
debugger.cpp:1091:21: note: suggested alternative: '_wsopen'
     command_child = _fdopen( _open_osfhandle( (intptr_t)in, _O_RDONLY ), "r" );
                     ^~~~~~~
                     _wsopen
execnt.cpp: In function 'int is_parent_child(DWORD, DWORD)':
execnt.cpp:1085:23: error: 'stricmp' was not declared in this scope
                 if ( !stricmp( pinfo.szExeFile, "csrss.exe" ) &&
                       ^~~~~~~
execnt.cpp:1085:23: note: suggested alternative: 'strncmp'
                 if ( !stricmp( pinfo.szExeFile, "csrss.exe" ) &&
                       ^~~~~~~
                       strncmp
execnt.cpp:1088:23: error: 'stricmp' was not declared in this scope
                 if ( !stricmp( pinfo.szExeFile, "smss.exe" ) &&
                       ^~~~~~~
execnt.cpp:1088:23: note: suggested alternative: 'strncmp'
                 if ( !stricmp( pinfo.szExeFile, "smss.exe" ) &&
                       ^~~~~~~
                       strncmp
jam.cpp: In function 'int main(int, char**, char**)':
jam.cpp:200:22: error: 'environ' was not declared in this scope
 # define use_environ environ
                      ^~~~~~~
jam.cpp:561:37: note: in expansion of macro 'use_environ'
         var_defines( root_module(), use_environ, 1 );
                                     ^~~~~~~~~~~
jam.cpp:200:22: note: suggested alternative: 'union'
 # define use_environ environ
                      ^~~~~~~
jam.cpp:561:37: note: in expansion of macro 'use_environ'
         var_defines( root_module(), use_environ, 1 );
                                     ^~~~~~~~~~~
jam.cpp: In function 'char* executable_path(const char*)':
jam.cpp:729:54: error: 'strdup' was not declared in this scope
     return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf );
                                                      ^~~~~~
jam.cpp:729:54: note: suggested alternative: 'strcmp'
     return ( !ret || ret == sizeof( buf ) ) ? NULL : strdup( buf );
                                                      ^~~~~~
                                                      strcmp
sysinfo.cpp: In function 'unsigned int {anonymous}::std_thread_hardware_concurrency()':
sysinfo.cpp:93:21: error: 'std::thread' has not been declared
         return std::thread::hardware_concurrency();
                     ^~~~~~
File Not Found

Failed to bootstrap the build engine
Please consult bootstrap.log for further diagnostics.

Это то, что говорит .log файл:

###
### Using 'gcc' toolset.
###

C:\Program Files\boost\boost_1_72_0\tools\build\src\engine>g++ -x c++ -std=c++11 -s -O3 -o b2.exe   -DNDEBUG  builtins.cpp class.cpp command.cpp compile.cpp constants.cpp cwd.cpp debug.cpp debugger.cpp execcmd.cpp execnt.cpp filent.cpp filesys.cpp frames.cpp function.cpp glob.cpp hash.cpp hcache.cpp hdrmacro.cpp headers.cpp jam.cpp jambase.cpp jamgram.cpp lists.cpp make.cpp make1.cpp md5.cpp mem.cpp modules.cpp native.cpp object.cpp option.cpp output.cpp parse.cpp pathnt.cpp pathsys.cpp regexp.cpp rules.cpp scan.cpp search.cpp strings.cpp subst.cpp sysinfo.cpp timestamp.cpp variable.cpp w32_getreg.cpp modules/order.cpp modules/path.cpp modules/property-set.cpp modules/regex.cpp modules/sequence.cpp modules/set.cpp  

C:\Program Files\boost\boost_1_72_0\tools\build\src\engine>dir *.exe 
 Volume in drive C has no label.
 Volume Serial Number is E64D-9A93

 Directory of C:\Program Files\boost\boost_1_72_0\tools\build\src\engine


C:\Program Files\boost\boost_1_72_0\tools\build\src\engine>copy /b .\b2.exe .\bjam.exe 
The system cannot find the file specified.

Как мне решить эту проблему?

...