我正在执行make
。在某个时候,它会进入src
并从那里尝试编译几个子目录中的源代码。它给出
gcc -x c++ -ggdb -ansi -pedantic -iquote/home/user1/code -Wall -Wcast-align -Wcast-qual -Wnested-externs -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -Dinline= -Wvariadic-macros -iprefix /home/user1/code/src/ -iwithprefix . -iwithprefix DataSet -iwithprefix Outputs -iwithprefix Solver -iwithprefix Tools -iwithprefix Models -iwithprefix Modules -iwithprefix Help -iwithprefix Common -iwithprefix Main -fPIC -fpermissive -c Common/Buffer.c -o Common/Buffer.o
make[1]: gcc: Permission denied
make[1]: *** [Makefile:140: Common/Buffer.o] Error 127
但如果执行(复制粘贴回显的命令)
$ cd src
$ gcc -x c++ -ggdb -ansi -pedantic -iquote/home/user1/code -Wall -Wcast-align -Wcast-qual -Wnested-externs -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wshadow -fno-common -Dinline= -Wvariadic-macros -iprefix /home/user1/code/src/ -iwithprefix . -iwithprefix DataSet -iwithprefix Outputs -iwithprefix Solver -iwithprefix Tools -iwithprefix Models -iwithprefix Modules -iwithprefix Help -iwithprefix Common -iwithprefix Main -fPIC -fpermissive -c Common/Buffer.c -o Common/Buffer.o
它编译得很好。
可能的原因和解决办法是什么?