Boost build problems on Windows
In the vein of putting useful but obscure snippets here for Google to find, I’ve recently been having problems getting the excellent Boost C++ libraries to build under Windows. In short, bjam (the boost “make” style tool) crashes upon invocation, regardless of how you configure your environment.
After some digging, it transpires that this is a problem with the way Boost is using Microsoft’s C runtime (or a problem with the C runtime, take your pick). As part of the glob expansions, all files in your working directories are enumerated, which is (in general) fine. However, if you have a file outside of a “reasonable” date range, the MSCRT will assert, manifesting as a nice fiery explosion in the release build.
If you’re having this problem (and some mailing list archaeology indicates others were), check your working directories (current directory, c:\Windows etc) for files with daft dates; that is, earlier than 01/01/1970. It appears Blackbeard was stashing his looted files in my machine, as I had one lying around from the 1700’s in my Windows directory which was the ultimate cause of my build problems.
I’ve reported this issuelet to Boost, but doubt it’s severe enough to warrant code changes. Hopefully this post can save others some debugging time.
