Income Tax E-Filing and Excel Automation Error

After painstakingly filling out the Excel based ITR form provided by the Income Tax department, how would you feel if you got an “Automation error” dialog when attempting to generate XML? Pretty frustrated, I suppose. Fear not - just install .NET framework 2.5⁄3, preferably from Windows Features Turn On/Off window. Looks like the VBA code references .NET types, and you need the framework to be installed to keep it happy.

Read more →

getprotobyname and the default ubuntu:vivid Docker image

Trying to setup a network server on a ubuntu:vivid docker image, I ran into a weird problem - the server would accept the TCP request and then drop the connection. After eliminating a bunch of possible causes (firewall, SELinux), I found that a simple python TCP server I cooked up worked just fine - it was just that particular network server program that was acting up. It worked perfectly fine on the Arch linux distribution running on my laptop though.

Read more →

Docker - setting the default size of images with device mapper storage driver

Been playing around with docker (http://docker.io) for a while now to see if it can help create a one script setup for setting up the build environment for the avr8 toolchain. One pesky problem when using the device mapper storage driver (the default on RHEL) is that the created images/containers are small - only 10G. That isn’t going to cut it for building the GNU toolchain - the gcc repo itself takes up 2.6G on my machine.

Read more →

Debugging a debugger - gdb crash on Windows XP

If you’re one of the crazy guys building gdb for Windows using the 4.6.1 version of the mingw gcc compiler, here’s something to watch out for. gdb will crash on any error (even a mistyped command), but only on Windows XP. Turns out that gdb uses a setjmp/longjmp based error handling mechanism (see gdb/exceptions.c), and any error causes gdb to execute a longjmp. In Windows land, longjmp is implemented in msvcrt.dll, and it so happens that the implementation expects the frame pointer to be setup correctly.

Read more →

LTO and the linker command line

If you’re using GCC’s LTO feature, make sure you repeat the compiler flags when linking. So, if you compile code with -Os -ffunction-sections, make sure you pass the same flags to the gcc driver when linking. This is needed because LTO effectively recompiles by streaming in IR from the object files and regenerating code. Only this time it knows about the code in all the object files that’s going to be part of the final executable, so it can perform a bunch of optimizations it previously couldn’t.

Read more →