Missing ___emutls_get_address with gcc-4.7 and openMP

前端 未结 2 1040
梦谈多话
梦谈多话 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条回答
  •  猫巷女王i
    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.

提交回复
热议问题