0

我正在尝试安装 PVM 库(https://netlib.org/pvm3/pvm3.4.6.tgz
我成功地在我的 $HOME 中提取了包
按照自述文件的说明我设置了我的环境变量 PVM_ROOT=$HOME/pvm3在我的 $HOME/.bashrc 文件的末尾,我已将文件 $HOME/pvm/lib/bashrc.stub 的内容附加到 .bashrc 并取消注释行 'export PATH=$PATH:$PVM_ROOT/lib/ PVM_ARCH' 和 'export PATH=$PATH:$PVM_ROOT/bin/PVM_ARCH'
重新打开 bash 后,我的所有 env 变量都在那里,所以我想在此之前一切都很好。

但是然后我进入〜/ pvm3,当我输入'make'时,我第一次得到一个警告列表:

这是我第一次运行 make 时收到的警告示例

cc  -DIMA_LINUX -I../../include -I../../tracer -I../../src -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC  -c ../../console/job.c
../../console/job.c:150:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  150 | job_init()
      | ^~~~~~~~
../../console/job.c:175:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  175 | job_free(jp)
      | ^~~~~~~~
../../console/job.c:224:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  224 | obuf_free(jp, op)
      | ^~~~~~~~~
../../console/job.c:240:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  240 | obuf_dump(jp)
      | ^~~~~~~~~
../../console/job.c:252:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  252 | checkoutput(jp, cc, len, cod, src)
      | ^~~~~~~~~~~

它以:

cc  -I../../include -I../../src -DIMA_LINUX -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC  -c ../../pvmgs/pvmgroups.c
../../pvmgs/pvmgroups.c:37:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   37 | main()
      | ^~~~
../../pvmgs/pvmgroups.c: In function ‘main’:
../../pvmgs/pvmgroups.c:41:10: warning: implicit declaration of function ‘gs_getgstid’; did you mean ‘gs_gettid’? [-Wimplicit-function-declaration]
   41 |  gstid = gs_getgstid();
      |          ^~~~~~~~~~~
      |          gs_gettid
cc  -I../../include -I../../src -DIMA_LINUX -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC  -o pvmgroups pvmgroups.o libgpvm3.a  -L../../lib/LINUX -lpvm3  
cp pvmgroups ../../bin/LINUX
cp libgpvm3.a ../../lib/LINUX
case xt in xt ) echo ranlib; ranlib ../../lib/LINUX/libgpvm3.a ;; esac
ranlib
cp pvmgs ../../lib/LINUX
make[2] : leaving directory « /home/thesylio/pvm3/pvmgs/LINUX »
done building group server and library
make[1] : leaving directory « /home/thesylio/pvm3 »

如果我再试一次,我会收到以下消息:

./lib/aimk -here -f ./conf/`./lib/pvmtmparch`.def -f ./Makefile.aimk default
making in . for LINUX
make[1] : entering directory « /home/thesylio/pvm3 »
building in src
cd src; ../lib/aimk CC="cc" F77="f77" install
making in LINUX/ for LINUX
make[2] : entering directory « /home/thesylio/pvm3/src/LINUX »
make[2]: nothing to do for « install ».
make[2] : leaving directory « /home/thesylio/pvm3/src/LINUX »
done building in src
building tracer
cd tracer; ../lib/aimk CC="cc" F77="f77" install
making in LINUX/ for LINUX
make[2] : entering directory « /home/thesylio/pvm3/tracer/LINUX »
ar rcv libpvmtrc.a trcmess.o trcfile.o trccompat.o trccompatglob.o trcutil.o trclib.o
r - trcmess.o
r - trcfile.o
r - trccompat.o
r - trccompatglob.o
r - trcutil.o
r - trclib.o
ranlib libpvmtrc.a
cc -O  -DIMA_LINUX -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC  -o tracer tracer.o cmd.o trcglob.o -L../../lib/LINUX -L../../tracer/LINUX -lpvmtrc -lpvm3 
cc -O  -DIMA_LINUX -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC  -o trcsort trcsort.o -L../../lib/LINUX -L../../tracer/LINUX -lpvmtrc -lpvm3 
make[2] : leaving directory « /home/thesylio/pvm3/tracer/LINUX »
done building tracer
building console
cd console; ../lib/aimk CC="cc" F77="f77" install
making in LINUX/ for LINUX
make[2] : entering directory « /home/thesylio/pvm3/console/LINUX »
cc  -DIMA_LINUX -I../../include -I../../tracer -I../../src -DSYSVSIGNAL -DNOWAIT3 -DRSHCOMMAND=\"/usr/bin/rsh\" -DNEEDENDIAN -DFDSETNOTSTRUCT -DHASERRORVARS -DCTIMEISTIMET -DSYSERRISCONST -DNOTMPNAM -DUSESTRERROR -DSYSVSTR -DHASSTDLIB -DSYSVBFUNC  -o pvm cons.o cmds.o job.o trc.o  -L../../tracer/LINUX -L../../lib/LINUX -lpvmtrc -lpvm3 
cp pvm ../../lib/LINUX
make[2] : leaving directory « /home/thesylio/pvm3/console/LINUX »
done building console
building libfpvm
cd libfpvm; ../lib/aimk CC="cc" F77="f77" install
making in LINUX/ for LINUX
make[2] : entering directory « /home/thesylio/pvm3/libfpvm/LINUX »
make[2]: nothing to do for « install ».
make[2] : leaving directory « /home/thesylio/pvm3/libfpvm/LINUX »
done building libfpvm
building group server and library
cd pvmgs; ../lib/aimk CC="cc" F77="f77" install
making in LINUX/ for LINUX
make[2] : oentering directory « /home/thesylio/pvm3/pvmgs/LINUX »
make[2]: Nothing to do « install ».
make[2] : leaving directory « /home/thesylio/pvm3/pvmgs/LINUX »
done building group server and library
make[1] : leaving directory « /home/thesylio/pvm3 »

我不知道它是否有效,但无论如何我尝试调用 pvm 并且它有点工作:

~/pvm$ pvm
pvm> halt
halt
completed

虽然 xpvm 命令找不到,但我认为没关系,所以尝试了 pvm3/examples 中给出的代码示例之一

$ cc -o hello hello.c
hello.c:37:10: fatal error: pvm3.h no such file or directory of this type
    37 | #include "pvm3.h"
       |          ^~~~~~~~
compilation terminated.

很好,http://www.netlib.org/pvm3/faq_html/node62.html上的文档为此类问题提供了答案

$ cc -o hello -I$PVM_ROOT/include hello.c
hello.c:39:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   39 | main()
      | ^~~~
/usr/bin/ld : /tmp/ccEvHgbT.o : in function « main » :
hello.c:(.text+0x1e) : undefined reference to « pvm_mytid »
/usr/bin/ld : hello.c:(.text+0x51) : undefined reference to « pvm_spawn »
/usr/bin/ld : hello.c:(.text+0x69) : undefined reference to« pvm_recv »
/usr/bin/ld : hello.c:(.text+0x7f) : undefined reference to « pvm_bufinfo »
/usr/bin/ld : hello.c:(.text+0x8e) : undefined reference to « pvm_upkstr »
/usr/bin/ld : hello.c:(.text+0xc4) : undefined reference to « pvm_exit »
collect2: error: ld returned 1 exit status

然后我关注了这个网站http://parallel.vub.ac.be/documentation/pvm/troubleshooting.html#compile2

$ cc -o hello -I$PVM_ROOT/include -L$HOME/pvm3/lib/pvm3 hello.c
hello.c:39:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
   39 | main()
      | ^~~~
/usr/bin/ld : /tmp/ccmzt4MN.o : in function « main » :
hello.c:(.text+0x1e) : undefined reference to « pvm_mytid »
/usr/bin/ld : hello.c:(.text+0x51) : undefined reference to « pvm_spawn »
/usr/bin/ld : hello.c:(.text+0x69) : undefined reference to« pvm_recv »
/usr/bin/ld : hello.c:(.text+0x7f) : undefined reference to « pvm_bufinfo »
/usr/bin/ld : hello.c:(.text+0x8e) : undefined reference to « pvm_upkstr »
/usr/bin/ld : hello.c:(.text+0xc4) : undefined reference to « pvm_exit »
collect2: error: ld returned 1 exit status

我尝试了 gcc 和 cc,我尝试了不同的发行版:64 位计算机上的 kali-rolling 2020.3 和 32 位和 64 位计算机上的 ubuntu-20.04.1。
我计划尝试使用 cshell 而不是 bash,但我认为是 makefile 使它变得困难,或者我可能没有足够好地指定架构。我也不是普通的 C 编码器,所以我可能犯了一些明显的错误。
我也会在 Windows 10 上安装它,但我们不要着急啊
谢谢您的时间

4

0 回答 0