运行调用 Perl 脚本的 Makefile 时出现问题
一个月前我正在尝试编译一个 C++ 软件。
尽快完成这项工作面临着很大的压力。
我一直在寻找类似的问题,但我越来越困惑。
我正在使用以下命令:
bcmsa@braw176 ~/nba >uname -a
SunOS braw176 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
bcmsa@braw176 ~/nba >make -v
make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.8
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
我执行了命令:
bcmsa@braw176 ~/nba/DLPRTER_CAA/bin/RPG3/default >make -dwp all
但我收到了以下信息:
Reaping winning child 0x0006da38 PID 27586
/bin/sh: /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/sigunion.pl: not found
Live child 0x0006da38 (/export/home/bcmsa/nba/DLPRTER_CAA/bin/RPG3/default/sigunion.h) PID 27588
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x0006da38 PID 27588
make: *** [/export/home/bcmsa/nba/DLPRTER_CAA/bin/RPG3/default/sigunion.h] Error 1
Removing child 0x0006da38 PID 27588 from chain.
疯狂的是 sigunion.pl 存储在指定的目录中:
bcmsa@braw176 ~/nba >cd /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >ls -la
total 120
drwxrwsr-x 2 80422 3626 4096 Jun 12 2002 .
drwxrwsr-x 3 80422 3626 4096 Jun 12 2002 ..
-r-xr-xr-x 1 80422 3626 2195 Jun 28 1999 bdt_c.sh
-r-xr-xr-x 1 80422 3626 2449 Mar 8 1999 bdt_h.sh
-r-xr-xr-x 1 80422 3626 681 Oct 20 1999 change_base
-r-xr-xr-x 1 80422 3626 990 Oct 20 1999 convert_to_iog11
-r-xr-xr-x 1 80422 3626 692 Oct 20 1999 create_directory
-r-xr-xr-x 1 80422 3626 604 Oct 20 1999 create_elements
-r--r--r-- 1 80422 3626 582 Mar 2 1999 create_elements.base
-r-xr-xr-x 1 80422 3626 2059 Dec 13 2001 generate_signal_files.csh
-r-xr-xr-x 1 80422 3626 486 Oct 20 1999 generate_version_info
-r-xr-xr-x 1 80422 3626 610 Oct 20 1999 get_program.csh
-r-xr-xr-x 1 80422 3626 760 Oct 20 1999 get_suid.csh
-r-xr-xr-x 1 80422 3626 774 Oct 20 1999 set_autostart.pl
-r-xr-xr-x 1 80422 3626 1555 Oct 20 1999 sigunion.pl
请帮我找到如何修复此错误。 我真的不知道还能做什么。
我尝试执行以下命令只是为了看看会发生什么:
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >perl sigunion.pl
Can't exec /usr/atria/bin/Perl at sigunion.pl line 1.
信息:
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >which perl
/usr/bin/perl
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >perl -v
This is perl, version 5.005_03 built for sun4-solaris
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >head sigunion.pl
#! /usr/atria/bin/Perl
I'm trying to compile a C++ software a month ago.
There is a lot of pressure to make this work as soon as possible.
I've been looking for similar problems but I'm getting more and more confused.
I'm using the following:
bcmsa@braw176 ~/nba >uname -a
SunOS braw176 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
bcmsa@braw176 ~/nba >make -v
make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.8
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
I executed the command:
bcmsa@braw176 ~/nba/DLPRTER_CAA/bin/RPG3/default >make -dwp all
But I'm receiving the following:
Reaping winning child 0x0006da38 PID 27586
/bin/sh: /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/sigunion.pl: not found
Live child 0x0006da38 (/export/home/bcmsa/nba/DLPRTER_CAA/bin/RPG3/default/sigunion.h) PID 27588
Got a SIGCHLD; 1 unreaped children.
Reaping losing child 0x0006da38 PID 27588
make: *** [/export/home/bcmsa/nba/DLPRTER_CAA/bin/RPG3/default/sigunion.h] Error 1
Removing child 0x0006da38 PID 27588 from chain.
The crazy thing is that sigunion.pl is stored at the indicated directory:
bcmsa@braw176 ~/nba >cd /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >ls -la
total 120
drwxrwsr-x 2 80422 3626 4096 Jun 12 2002 .
drwxrwsr-x 3 80422 3626 4096 Jun 12 2002 ..
-r-xr-xr-x 1 80422 3626 2195 Jun 28 1999 bdt_c.sh
-r-xr-xr-x 1 80422 3626 2449 Mar 8 1999 bdt_h.sh
-r-xr-xr-x 1 80422 3626 681 Oct 20 1999 change_base
-r-xr-xr-x 1 80422 3626 990 Oct 20 1999 convert_to_iog11
-r-xr-xr-x 1 80422 3626 692 Oct 20 1999 create_directory
-r-xr-xr-x 1 80422 3626 604 Oct 20 1999 create_elements
-r--r--r-- 1 80422 3626 582 Mar 2 1999 create_elements.base
-r-xr-xr-x 1 80422 3626 2059 Dec 13 2001 generate_signal_files.csh
-r-xr-xr-x 1 80422 3626 486 Oct 20 1999 generate_version_info
-r-xr-xr-x 1 80422 3626 610 Oct 20 1999 get_program.csh
-r-xr-xr-x 1 80422 3626 760 Oct 20 1999 get_suid.csh
-r-xr-xr-x 1 80422 3626 774 Oct 20 1999 set_autostart.pl
-r-xr-xr-x 1 80422 3626 1555 Oct 20 1999 sigunion.pl
Please, help me find how to fix this fault.
I really don't know what else to do.
I tried to execute the following just to see what happens:
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >perl sigunion.pl
Can't exec /usr/atria/bin/Perl at sigunion.pl line 1.
Info:
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >which perl
/usr/bin/perl
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >perl -v
This is perl, version 5.005_03 built for sun4-solaris
bcmsa@braw176 /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts >head sigunion.pl
#! /usr/atria/bin/Perl
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我强烈怀疑 sigunion.pl 中的 shebang(又名 #! 行)指向了 perl 可执行文件的错误位置。
head sigunion.pl
将显示 sigunion.pl 认为 perl 的位置,而which perl
将显示 perl 实际安装的位置。例子:
I strongly suspect that the shebang in sigunion.pl (aka the #! line) is pointing to the wrong place for your perl executable.
head sigunion.pl
will show you where sigunion.pl thinks perl is, andwhich perl
will show you where perl is actually installed.Example:
...表明 /bin/sh 无法弄清楚如何运行脚本 sigunion.pl。它可能缺少一个 shebang 行:
...它告诉 shell 哪个外部程序(在本例中为 perl)来解析和运行该文件。
或者,您可以在
$PATH
中找到perl
,方法是将 Makefile 中的相应行更改为:...indicates that /bin/sh could not figure out how to run the script sigunion.pl. It is probably missing a shebang line:
...which tells the shell what external program (in this case, perl) to parse and run the file.
Alternatively, you can just let
perl
be found in the$PATH
, by changing the appropriate line in the Makefile to: