When using Perl’s exec() call, the best way to invoke it is as follows:
1
exec("$dir/myprog.sh",@ARGV);
This syntax does some important things: – passes a scalar value as the first argument which exec interprets as PROGRAM – passes an array as the second argument which exec will use as the arguments to pass into PROGRAM Note […]
The Problem Tried to install the latest version of cpan and got stuck. Tracked it down to the dependency module Mac::SystemDirectory which was failing to build:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cpan[1]>install Mac::SystemDirectory
Reading'/var/root/.cpan/Metadata'
Database was generated on Sun,09Jun201907:17:02GMT
Running install formodule'Mac::SystemDirectory'
Running make forE/ET/ETHER/Mac-SystemDirectory-0.10.tar.gz
Couldn't execute cc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -Os "-I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" -c HASCOMPILEREZFt/TESTUSSI.c -o HASCOMPILEREZFt/TESTUSSI.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE]
ETHER/Mac-SystemDirectory-0.10.tar.gz
/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -- NOT OK
Running make test
Make had some problems, won'ttest
Running make install
Make had some problems,won't install
Failed during this command:
ETHER/Mac-SystemDirectory-0.10.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INC=-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE'returned status6400
The Solution Use the MacOS installer command to deploy the needed files: