At this point, I switched to using the bash shell present with octave.
MSYS2 on top of Octave's MSYS environment ===
When using the bash prompt from 'octave-cli.exe' we could not use the libboost-python that we used with MSYS2, so we had to build boost from source using octave's msys tools.. The steps I used to build boost are:
# Open octave-cli.exe
# cd e:/boost_1_61_0
# ./b2 install --with-python --prefix=/e/boost_build
But I was getting some linking error with octave. Tatsuro provided a 32 bit version of octave that he had built. After this, I had to use install 32 bit Python and rebuild boost .
There was an error in configure that PYTHON_EXTRA_LIBS was 'None' on windows and hence the configure failed. As per Mike's suggestion I set it to a valid gcc flag for the time being with ''export $PYTHON_EXTRA_LIBS=-g''
After this too the build failed with undefined references to few symbols. Tatsuro suggested to build boost with ''link=static,shared''. He had successfully built boost with it but I could not build boost with this option on my PC.