According to this article Pakistan is pressing China to construct a naval port at Gwadar in SW Pakistan on the Arabian Sea. China has already taken over (at Pakistan's request) the little used commercial port at Gwadar. Karachi is Pakistan's major port.
The Chinese are apparently reluctant to make an overseas naval commitment of this scope. Such a naval base would be Pakistani but dual use by the two countries seems likely. The same article mentions a separate possible Chinese naval base in Sri Lanka.
Uighur Muslim guerrillas are active in Chinese teritory in Sinkiang. These are reported in this piece to be trained in camps in Pakistani Waziristan. The Chinese are interested in establishing a ground military presence in the north of Pakistan to put an end to that training and support.
IMO all of this is related to the rapidly disintegrating relations between Pakistan and Saudi Arabia on the one hand and the United States on the other. pl