Netbeans fortran build fails on Mac OS 10.8, canno

2019-09-05 13:39发布

I'm trying to get Netbeans up and running so I can start a Fortran project. I've downloaded the binaries and installed the plugins to the best of my knowledge. When I try to compile my hello world I get this error:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/convection
mkdir -p build/Debug/GNU-MacOSX
gfortran   -c -g -o build/Debug/GNU-MacOSX/main.o main.f
gfortran: error trying to exec 'f951': execvp: No such file or directory
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 111ms)

Any thoughts?

EDIT: I'm using Mac OSX 10.8.5

EDIT 2: I've been messing around for awhile now and now the error is slightly different:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-MacOSX/convection
mkdir -p build/Debug/GNU-MacOSX
gfortran   -c -g -o build/Debug/GNU-MacOSX/main.o main.f
make[2]: gfortran: No such file or directory
make[2]: *** [build/Debug/GNU-MacOSX/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 127ms)

EDIT 3: And just for fun, here is the output from a successful build that I was able to do in Ubuntu:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/hannah/NetBeansProjects/test'
"/usr/bin/make"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/test
make[2]: Entering directory `/home/hannah/NetBeansProjects/test'
make[2]: `dist/Debug/GNU-Linux-x86/test' is up to date.
make[2]: Leaving directory `/home/hannah/NetBeansProjects/test'
make[1]: Leaving directory `/home/hannah/NetBeansProjects/test' 

BUILD SUCCESSFUL (total time: 92ms)

3条回答
对你真心纯属浪费
2楼-- · 2019-09-05 14:28

I think I found the solution here: http://eftrunk.blogspot.com/2011/11/how-to-fix-error-trying-to-exec-f951.html

Will report back if it works or not.

查看更多
看我几分像从前
3楼-- · 2019-09-05 14:35

Here is a link to someone else's solution to this problem. gfortran is unable to find f951.

http://ubuntuforums.org/showthread.php?t=1164394

查看更多
Viruses.
4楼-- · 2019-09-05 14:38

I had the same problem on 10.9. I needed to make a new gfortran link in my /usr/bin (Base directory). After that it worked fine. If I had it in usr/local/bin,..or any other path it didn't work.

enter image description here

查看更多
登录 后发表回答