开发者

Problem running Makefile that calls Perl script

开发者 https://www.devze.com 2023-01-23 12:22 出处:网络
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'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 ge开发者_开发问答tting 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


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


/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>
0

精彩评论

暂无评论...
验证码 换一张
取 消