On as fresh Ubuntu Server 16.04.4 setup, with all packages up-to-date, trying to install amdgpu-pro with the --headless parameter fails because several required packages are not selected for installation. Actually, the installation script terminates successfully, and only reports a warning:
WARNING: amdgpu dkms failed for running kernel
After reboot, no OpenCL devices are reported by /opt/amdgpu-pro/bin/clinfo and it actually core dumps:
terminate called after throwing an instance of 'cl::Error'
Aborted (core dumped)
Installing of the following packages, followed by a reboot, fixes the issue: