20

I was trying to use the omh.h header file and I realized it was missing. I tried reinstalling gcc on my mac using brew. This is the message I got at the end of the installation.

..
GCC has been built with multilib support. Notably, OpenMP may not work:
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670
If you need OpenMP support you may want to
  brew reinstall gcc --without-multilib
==> Summary
  /usr/local/Cellar/gcc/4.9.2_1: 1156 files, 203M

It suggests that if I need OpenMP support I need to install brew reinstall gcc --without-multilib. I am not able to understand the meaning of --without-multilib. How is it different from simply installing gcc?

And apparently brew reinstall gcc --without-multilib takes forever to run and brew uninstall gcc && brew install gcc was lightning fast.

Joshua Grigonis
  • 748
  • 5
  • 18
Pranjal Mittal
  • 10,772
  • 18
  • 74
  • 99
  • 6
    Multilib usually refers to the coexistence of both 64-bit and 32-bit versions of each library so that 32-bit software could be run on 64-bit OS. In the GCC case that probably refers to having all GCC runtime libraries in "fat" Mach-O format, i.e. versions for both i386 and x86_64 in the same shared library file. It could be that `libgomp` (the GNU OpenMP runtime library) cannot be built in such a way. – Hristo Iliev May 05 '15 at 12:08
  • 3
    In terms of install speed, install gcc is fast because it is installing from a bottle (pre-built binary), while --without-multilib will actually compile gcc on your machine. – user2548418 May 05 '15 at 17:12
  • 1
    Once installed, did you have problems with OpenMP with either gcc? I use brew and I have the generic bottle install (brew install gcc) and I have been using OpenMP daily for months. – user2548418 May 05 '15 at 17:13
  • 1
    @user2548418 I checked /usr/local/Cellar/gcc/4.9.2_1/lib/gcc/4.9/gcc/x86_64-apple-darwin11.4.2/4.9.2/include/omp.h, and my version seems to contain 32-bit version definition of omp_lock_t. I assume it would not be safe to use it for 64-bit applications. In this case, MacPorts installs the 64-bit header file, which should be safe daily use. – Yongwei Wu May 25 '15 at 11:35

1 Answers1

13

Multilib means support for multiple architectures, so you can compile binaries for them.

Given the bug you show, you should be safe as long you build binaries for AMD64 architecture (64-bit) and IA32, as that is what your machine is.

Otherwise, better to choose without multilib.

Raul
  • 373
  • 2
  • 7