http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60425
--- Comment #2 from j-frankish at slb dot com --- Ah - I see the problem now. I'm using gcc packaged into a squashfs package, loop mounted at /tmp/tcloop/gcc and symlinked to the root file system. The gcc libs are packaged separately and mounted at /tmp/tcloop/gcc_libs. As -fopenmp is searching a relative path to libgomp.spec and only looks in absolute paths to /lib and /usr/lib, it does not find it. I entered the absolute path /usr/local/lib/libgomp.spec in the root file system in the specs file, which is what made things work. ..in some respects, if gcc is compiled to /usr/local, shouldn't it search the absolute path to /usr/local? ---------- $ strace gcc hello.c -fopenmp 2>&1 | grep libgomp.spec strace gcc hello.c -fopenmp 2>&1 | grep libgomp.spec access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/4.7.2/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/4.7.2/../../../../i486-pc-linux-gnu/lib/i486-pc-linux-gnu/4.7.2/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/4.7.2/../../../../i486-pc-linux-gnu/lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/4.7.2/../../../i486-pc-linux-gnu/4.7.2/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/i486-pc-linux-gnu/4.7.2/../../../libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/lib/i486-pc-linux-gnu/4.7.2/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/i486-pc-linux-gnu/4.7.2/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/libgomp.spec", R_OK) = -1 ENOENT (No such file or directory) open("libgomp.spec", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) write(2, "gcc: error: libgomp.spec: No suc"..., 51gcc: error: libgomp.spec: No such file or directory) = 51