Subject: | PAR in trunk doesn't build on Mac OS X 10.4.3 |
This is from MacOS X 10.4.3 for PAR in svn trunk.
I tried using my own version of 5.8.7 in /usr/local/bin but that didn't work. Applied patches to myldr/static.c and myldr/mktmpdir.h, and now install works on both Apple's default and 5.8.7.
Output using 5.8.7 before patches:
turtle:~/svn/par/trunk dromano$ perl -v
This is perl, v5.8.7 built for darwin-2level
Copyright 1987-2005, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
turtle:~/svn/par/trunk dromano$ uname -a
Darwin turtle.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc
turtle:~/svn/par/trunk dromano$ perl Makefile.PL
*** ExtUtils::AutoInstall version 0.63
*** Checking for dependencies...
[Core Features]
- File::Temp ...loaded. (0.16 >= 0.05)
- Compress::Zlib ...loaded. (1.41 >= 1.3)
- Archive::Zip ...loaded. (1.16 >= 1)
- Module::ScanDeps ...loaded. (0.51 >= 0.45)
- PAR::Dist ...loaded. (0.07 >= 0.06)
[Digital signature support]
- Digest ...loaded. (1.13)
- Module::Signature ...loaded. (0.50 >= 0.35)
*** ExtUtils::AutoInstall configuration finished.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
META.yml
SIGNATURE
Please inform the author.
Writing Makefile for the par program
Writing Makefile for PAR
turtle:~/svn/par/trunk dromano$ make
cp lib/App/Packer/PAR.pm blib/lib/App/Packer/PAR.pm
cp lib/PAR/Packer.pm blib/lib/PAR/Packer.pm
cp lib/PAR/Filter/Obfuscate.pm blib/lib/PAR/Filter/Obfuscate.pm
cp lib/PAR/Filter/PodStrip.pm blib/lib/PAR/Filter/PodStrip.pm
cp lib/PAR/Filter.pm blib/lib/PAR/Filter.pm
cp lib/PAR.pm blib/lib/PAR.pm
cp lib/PAR/Filter/PatchContent.pm blib/lib/PAR/Filter/PatchContent.pm
cp lib/PAR/Filter/Bytecode.pm blib/lib/PAR/Filter/Bytecode.pm
cp lib/PAR/Tutorial.pod blib/lib/PAR/Tutorial.pod
cp lib/PAR/FAQ.pod blib/lib/PAR/FAQ.pod
cp lib/PAR/Heavy.pm blib/lib/PAR/Heavy.pm
cp lib/PAR/Filter/Bleach.pm blib/lib/PAR/Filter/Bleach.pm
perl sha1.c.PL sha1.c
cc -c -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/opt/local/include -I/usr/local/lib/perl5/5.8.7/darwin-2level/CORE sha1.c
cc -c -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/opt/local/include -I/usr/local/lib/perl5/5.8.7/darwin-2level/CORE main.c
perl ./file2c.pl ../script/par.pl my_par_pl.c load_me_2 1
cc -c -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -I/opt/local/include -I/usr/local/lib/perl5/5.8.7/darwin-2level/CORE my_par_pl.c
env MACOSX_DEPLOYMENT_TARGET=10.3 cc main.o my_par_pl.o -L/usr/local/lib -L/opt/local/lib /usr/local/lib/perl5/5.8.7/darwin-2level/auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.8.7/darwin-2level/CORE -lperl -ldl -lm -lc --output ./par
/usr/bin/ld: multiple definitions of symbol _PL_statbuf
main.o definition of _PL_statbuf in section (__DATA,__common)
/usr/local/lib/perl5/5.8.7/darwin-2level/CORE/libperl.a(globals.o) definition of _PL_statbuf in section (__DATA,__common)
collect2: ld returned 1 exit status
make[1]: *** [par] Error 1
make: *** [subdirs] Error 2
mktmpdir.h.patch:
--- mktmpdir.h.orig 2005-11-24 23:10:54.000000000 -0800
+++ mktmpdir.h 2005-11-24 23:11:07.000000000 -0800
@@ -64,10 +64,6 @@ static const char *dir_sep = "/";
static const char *path_sep = ":";
#endif
-#ifndef PL_statbuf
-struct stat PL_statbuf;
-#endif
-
#ifdef WIN32
# include <process.h>
# define my_mkdir(file, mode) _mkdir(file)
static.c.patch:
--- static.c.orig 2005-11-24 22:30:37.000000000 -0800
+++ static.c 2005-11-24 23:18:25.000000000 -0800
@@ -1,6 +1,9 @@
#undef PL_statbuf
#undef readdir
+#ifndef PL_statbuf
+struct stat PL_statbuf;
+#endif
#include "mktmpdir.c"
#include "my_perl.c"
#include "my_par.c"
--- mktmpdir.h.orig 2005-11-24 23:10:54.000000000 -0800
+++ mktmpdir.h 2005-11-24 23:11:07.000000000 -0800
@@ -64,10 +64,6 @@ static const char *dir_sep = "/";
static const char *path_sep = ":";
#endif
-#ifndef PL_statbuf
-struct stat PL_statbuf;
-#endif
-
#ifdef WIN32
# include <process.h>
# define my_mkdir(file, mode) _mkdir(file)