[英]libgomp and MacOsx
我正在使用 MacOS Mojave 版本 10.14.16,我正在嘗試安裝http://www.rpl2.net/index.php (一種使用反向波蘭表示法的編程語言,如在某些 HP 計算器(如 48GX)上發現的),應該可以工作在 MacOSX 上(他們說“MacOS X(Xcode 3.1.4 + gfortran 4.5)”)。
所以我下載了最新的穩定版本,cd到文件夾,想運行
./configure
make
make install
但是 ./configure 由於“配置:錯誤:找不到 libgomp !”而失敗。 沒有我可以用 brew 安裝的 libgomp 包(我已經安裝了 gfortran 附帶的 gcc 並認為它會提供 libgomp 但顯然沒有)。
有人可以幫助一個試圖在其 macbook 上安裝軟件的可憐的應用數學家嗎?
謝謝
編輯
在我的 config.log 我有這個,也許它會有所幫助:
configure:7433: checking for vim
configure:7449: found /usr/bin/vim
configure:7461: result: yes
configure:7507: checking for main in -lm
configure:7526: gcc -o conftest -g -O2 -O2 -fno-strict-overflow conftest.c -lm >&5
configure:7526: $? = 0
configure:7535: result: yes
configure:7548: checking for pthread_mutex_init in -lc
configure:7573: gcc -o conftest -g -O2 -O2 -fno-strict-overflow conftest.c -lc -lm >&5
configure:7573: $? = 0
configure:7582: result: yes
configure:7687: checking for omp_get_num_procs in -lgomp
configure:7712: gcc -o conftest -g -O2 -O2 -fno-strict-overflow conftest.c -lgomp -lc -lm >&5
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:7712: $? = 1
你沒有說你是如何安裝GCC
。 如果你是用homebrew 做的,並且
brew install gcc
你應該能夠看到:
/usr/local/Cellar/gcc/10.2.0/lib/gcc/10/libgomp.dylib
這意味着你需要編譯:
gcc ... -L /usr/local/Cellar/gcc/10.2.0/lib/gcc/10 -l gomp ...
否則,您始終可以使用以下libgomp
搜索libgomp
:
find /usr -name "lib*gomp*lib"
您可以測試您使用的是哪個gcc
:
type gcc
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.