add compiling option doc, fix some bugs