added serialize generation to common
fixed dependencies
fixed compile on linux