运行调用 Perl 脚本的 Makefile 时出现问题

发布于 2024-10-01 00:50:27 字数 3024 浏览 2 评论 0原文

一个月前我正在尝试编译一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

甜中书 2024-10-08 00:50:27

我强烈怀疑 sigunion.pl 中的 shebang(又名 #! 行)指向了 perl 可执行文件的错误位置。

head sigunion.pl 将显示 sigunion.pl 认为 perl 的位置,而 which perl 将显示 perl 实际安装的位置。

例子:

$ head sigunion.pl
#!/usr/bin/perl
.....stuff omited
$ which perl
/usr/opt/perl-5.8.8/bin/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, and which perl will show you where perl is actually installed.

Example:

$ head sigunion.pl
#!/usr/bin/perl
.....stuff omited
$ which perl
/usr/opt/perl-5.8.8/bin/perl
大海や 2024-10-08 00:50:27

/bin/sh: /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/sigunion.pl: 未找到

...表明 /bin/sh 无法弄清楚如何运行脚本 sigunion.pl。它可能缺少一个 shebang 行:

#!/usr/bin/perl

...它告诉 shell 哪个外部程序(在本例中为 perl)来解析和运行该文件。

或者,您可以在 $PATH 中找到 perl,方法是将 Makefile 中的相应行更改为:

perl /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/sigunion.pl <arguments>

/bin/sh: /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/sigunion.pl: not found

...indicates that /bin/sh could not figure out how to run the script sigunion.pl. It is probably missing a shebang line:

#!/usr/bin/perl

...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:

perl /aps/APS40/RPG3_R4A/lib/cmtool/plugin/rpg3.R3B/tools/tools/scripts/sigunion.pl <arguments>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文