O problema está em uma variável de ambiente antiga que não é mais usada no Ubuntu 18.04 LTS, chamada $ X11_LIB_DIR . Isso não avalia nada, e quebra o compilador mpicc quando -L é usado.
Veja abaixo:
mpicxx -O3 -I../mfem -I../mfem/../hypre-2.10.0b/src/hypre/include -DGLVIS_MULTISAMPLE=4 -DGLVIS_MS_LINEWIDTH=1.4 -I/usr/include -DGLVIS_USE_LIBPNG -DGLVIS_USE_FREETYPE -I/usr/include/freetype2 -o glvis glvis.cpp -Llib -lglvis -L../mfem -lmfem -L../mfem/../hypre-2.10.0b/src/hypre/lib -lHYPRE -L../mfem/../metis-4.0 -lmetis -lrt -L -lX11 -lGL -lGLU -lpng -lfreetype -lfontconfig -lpthread
Observe o aleatório "- L" antes de "- lX11" ?
Deve ser assim:
mpicxx -O3 -I../mfem -I../mfem/../hypre-2.10.0b/src/hypre/include -DGLVIS_MULTISAMPLE=4 -DGLVIS_MS_LINEWIDTH=1.4 -I/usr/include -DGLVIS_USE_LIBPNG -DGLVIS_USE_FREETYPE -I/usr/include/freetype2 -o glvis glvis.cpp -Llib -lglvis -L../mfem -lmfem -L../mfem/../hypre-2.10.0b/src/hypre/lib -lHYPRE -L../mfem/../metis-4.0 -lmetis -lrt -lX11 -lGL -lGLU -lpng -lfreetype -lfontconfig -lpthread
Então, para corrigir isso, altere a linha # 121 no makefile para ler:
GL_LIBS = -lX11 -lGL -lGLU