[build2] error when trying to compile build2

Phillip Shelton phillip.shelton at cardno.com.au
Fri Feb 4 03:24:20 UTC 2022


HI, thanks for the quick answer.

For my first problem, it does not help that I don't want to use the default c:\build2\ location so it did not exist.  As I said, pointing the idir variable in the bat file to the location that I did want to use "fixed" that location.

As to the second issue, thanks for the link to the latest staged code.  I will try that tonight.

Phillip Shelton
Senior Transport Modeller
Cardno

Phone +61 7 3877 6991  
Address Level 11, 515 St Paul's Terrace, Fortitude Valley, 4006 Queensland Australia
Postal Locked Bag 4006, Fortitude Valley 4006
Email phillip.shelton at cardno.com.au  Web www.cardno.com

> So I first just tried the following:
> >>C:\compilers\build2_build\build2-toolchain-0.14.0>.\build-mingw.bat 
> >>c:\compilers\mingw64\bin\g++
> And got the following:
> error: C:\build2\bin\ does not exist

That's probably because you haven't unpacked build2-baseutils. For manual bootstrap instructions please start here:

https://urldefense.com/v3/__https://build2.org/build2-toolchain/doc/build2-toolchain-install.xhtml*bootstrap-windows__;Iw!!PwxmruxY!P85QEf9adLo8uiw2epjuw8SetyYKA9TK7g8C63aTu0fr4KlEbtZx_uHpSVRrc_Mokk8BvaE$ 

And then for MinGW continue with:

https://urldefense.com/v3/__https://build2.org/build2-toolchain/doc/build2-toolchain-install.xhtml*bootstrap-windows-mingw__;Iw!!PwxmruxY!P85QEf9adLo8uiw2epjuw8SetyYKA9TK7g8C63aTu0fr4KlEbtZx_uHpSVRrc_MowEn27Qs$ 


> Now I get the this error
> ..\libbutl\libbutl\process.cxx: In constructor 'butl::process::process(const butl::process_path&, const char**, butl::process::pipe, butl::process::pipe, butl::process::pipe, const char*, const char* const*)':
> ..\libbutl\libbutl\process.cxx:1386:7: error: 'unique_ptr' was not declared in this scope
> 1386 |       unique_ptr<char, void (*)(char*)> pevars (
>       |       ^~~~~~~~~~
> ..\libbutl\libbutl\process.cxx:104:1: note: 'std::unique_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
>  103 | #include <libbutl/process-details.hxx>
>   +++ |+#include <memory>
>   104 |

Yes, there was a missing header inclusion which has been fixed for the next release. If you would like, you can try the latest staged toolchain which includes this fix:

https://urldefense.com/v3/__https://build2.org/community.xhtml*stage__;Iw!!PwxmruxY!P85QEf9adLo8uiw2epjuw8SetyYKA9TK7g8C63aTu0fr4KlEbtZx_uHpSVRrc_MoDQG1FAg$ 

Alternatively, if you want to stick with build2 0.14.0, you can use the (older version of) GCC compiler from the build2-mingw package (you can still use your MinGW GCC for your own development, just the build system will be build with an older version).



More information about the users mailing list