This problem has to do with the gcc/gfortran/g++ driver not being able to find libgomp.spec; it has nothing to do with LD_LIBRARY_PATH. Can you execute these 3 commands and post us the output:
gcc -dumpspecs |grep -C3 libgo
It's also useful to do your compile command with -v, e.g.
gcc -v -fopenmp myprog.c -o myprog.exe
Let's see if anyone can help you with that. You may want to report that bug on Ubuntu website ( https://launchpad.net/ubuntu/+filebug
), or report this problem to email@example.com
(general GCC mailing list). I don't have a 8.04 box here, so I can't be of much help until I see your gcc output above.