Missing ___emutls_get_address with gcc-4.7 and openMP

前端 未结 2 1027
梦谈多话
梦谈多话 2021-02-20 15:51

I am trying to compile a program using a self-compiled GCC-4.7.1 on Mac OS 10.8.2. The program uses openMP and the compilation succeeds; however, when I try to run the program,

相关标签:
2条回答
  • 2021-02-20 16:02

    I had exactly the same problem too. And I am new to openMP, and my skill is not that good to use the solution offered by Michal Fapso. I solve this problem by using

    brew link --overwrite gcc
    

    and the problem is solved!

    Maybe you can try to reinstall gcc to your Mac.

    0 讨论(0)
  • 2021-02-20 16:10

    I had exactly the same problem. In my case it was caused by linking against a library (I don't remember which one) of an older version of gcc installed by XCode, which was in /usr/lib. When I corrected it to link against the newer gcc library of the version I used for compiling (in /usr/local) this error was fixed.

    So just check your built executable and all the libraries it is linked with using

    otool -L EXECUTABLE_OR_DYLIB
    

    And if you find anything linked with a library of an older gcc, fix that.

    0 讨论(0)
提交回复
热议问题