Archive for September, 2009

Martin Pool

"failed to load compiled extensions" warnings

Bazaar uses compiled extensions, written in Pyrex or C, for some key operations. (These typically compile to names like or dll.) These extensions are optional, because we can fall back to a pure-Python version, but they make an order-of-magnitude difference to the speed of some operations.

Most users never need to know about them because the extensions are built and included in the binary package they install for their platform.

Starting after bzr 2.0, Bazaar gives you a warning if it can’t load the extensions. We want to make sure that people aren’t unintentionally getting bad performance, while still letting them run pure Python if they wish.

We’re thinking about cases like these: people running from source without compiling, or a problem in bzr, packaging, or the OS python infrastructure (like Ubuntu bug 392355) that means the extensions never get loaded. We want at least some kind of warning light, rather than for things to just be mysteriously slow.

A few people are now hitting this warning. The typical cause seems to be that they’re running tip and haven’t run make in that directory after updating. We’ll change the warning (bug 430529) to make it more clear that’s what you have to do. If you want to just silence it, run (on Unix)

echo ignore_missing_extensions=True >> ~/.bazaar/bazaar.conf

Martin Pool

tip: seeing what changes a remote branch would introduce

To see what changes a remote branch would make if you merged it into yours, try something like this:

bzr merge --preview lp:~spiv/bzr/insert-stream-check-chks-part-2|tee /tmp/spiv.diff