Ok, we need to get clear how you’re acquiring Psi4 because the command you posted is mixing conda and cmake arguments.
Would you be happy with a completely conda installation? conda install psi4 -c psi4 comes with gdma already installed and compiled in. psi4 --test should show “PASSED” for the gdma test.
Is the Ubuntu or Debian package repository at all involved? I suspect @Pistack1234 is right about not enabling gdma by default.
If you want to build Psi4 from source, you easiest thing is to just cmake ... -DENABLE_gdma=ON. If you’re using psi4-dev pkg with psi4-path-advisor command to build Psi4 from source with dependencies from conda, the default command will enable gdma.