Search code examples
windowsboostmingw-w64

How to list failed targets after building boost?


I am building boost on my windows using mingw-4.8.1 and have a few targets which failed. My Problem is that, I do not know which specific targets failed and which were skipped.

Is there a way to list the failed/skipped targets after the build is completed?

Here the console output:

...failed updating 20 targets...
...skipped 28 targets...
...updated 5789 targets...

Commands used after downloading a unzipping boost:

bootstrap

once b2.exe is built. I execute the following command in cmd

b2 -j4 --build-dir=build toolset=gcc --build-type=complete --stagedir=C:\SW\Boost -sNO_BZIP2=1

System: Windows 7 ( intel i5 vPro)
Compiler: gcc (mingw 4.8.1)
Boost: boost 1.61.0


Solution

  • So, a little bit of more research resulted in the following.

    One can get the build configuration and other build output using b2 [options]
    b2 --help reveals the options that can be used. I used the following approaches to diagnose exactly which targets were failing or getting skipped.

    Approach 1
    As suggested by @JanHenke in comments, I ran the same command

    b2 -j4 --build-dir=build toolset=gcc --build-type=complete --stagedir=C:\SW\Boost -sNO_BZIP2=1
    

    (as mentioned in question) again.
    Result: All tragets that are already built are skipped and only failed ones are shown.
    Problem: If there are many targets which failed then this just floods the console and it is difficult to find out what is going on.

    Approach 2
    Run the command (see 1) and select all from the command prompt using right mouse click, and then click gain to copy and paste it in a text editor so that is searchable.
    Result: Usable insights can be drawn by searching for failed or error keywords
    Problem: Still not the optimal way as not all the info is vailable on the current cmd window.

    Approach 3 Not Done as for me 2. worked, but should surely work
    Create a batchfile where in, the command is written and all that is printed on the cmd window, gets logged in a text file using the > or >> operators.

    Result: Will be the best way (known to me till now) to know which exact targets are getting failed and a proper diagnostic action can be taken.

    PS: I found that the there is a bug when trying to build serialization library with MinGW. Below the error I am facing and a link to boost forum which talks about the same error.

    gcc.compile.c++ build\boost\bin.v2\libs\serialization\build\gcc-mingw-4.8.1\debug\xml_woarchive.o
    In file included from ./boost/archive/detail/utf8_codecvt_facet.hpp:23:0,
                     from ./boost/archive/impl/xml_woarchive_impl.ipp:34,
                     from libs\serialization\src\xml_woarchive.cpp:28:
    ./boost/detail/utf8_codecvt_facet.hpp:116:30: error:  
     function 'boost::archive::detail::utf8_codecvt_facet::utf8_codecvt_facet(std::size_t)'
    definition is marked dllimport  
    

    More info Reference1 and Reference2.
    Sadly have not found a solution for it yet. Also, it is not the scope of this question.