torch/torch7 — pull request #54 by tudor (2014-07-10 05:24:53+00:00)
Title: No need to search for gfortran

On Linux x86_64 at least, OpenBLAS as installed in /opt/OpenBLAS/lib already has a dependency on gfortran:

tudorb@ossbuild:~$ ldd /opt/OpenBLAS/lib/libopenblas.so
linux-vdso.so.1 => (0x00007fff3c7fe000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe65f408000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007fe65f0ef000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe65eed0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe65eb0a000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fe65e8ce000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe65e6b7000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe660323000)

so there's no need to search for gfortran explicitly.

If we get rid of the explicit search for gfortran, we can get rid of this hack:

https://github.com/torch/ezinstall/blob/master/install-luajit%2Btorch#L27

where we explicitly hardcode the gcc version (4.6) and architecture (x86_64-linux-gnu), making it not forward-compatible with future versions of Linux.

Tested on Ubuntu 14.04.