Dig a tunnel and then select a tunnel that is Not at then end of a tunnel, then build the mine or other Building. It appears you can not build at the end of a tunnel. Not sure if this correct or a bug.