Subject: | Build fails for non-system Perl |
The build scripts have a hard coded path for /usr/bin/perl. If you're attempting to build against your own Perl, rather than the system one, you end up with your .xs having been built against the wrong Perl.
The attached patch should resolve this.
Best regards,
Dave
Subject: | non-system-perl.diff |
diff -ru CLucene-1.00/check.pl CLucene/check.pl
--- CLucene-1.00/check.pl 2005-05-13 14:52:15.000000000 +0100
+++ CLucene/check.pl 2018-03-02 19:45:32.171312426 +0000
@@ -1,4 +1,3 @@
-#!/usr/bin/perl
# check.pl - Makefile helper utility to make perl wrapper for CLucene
# usage: check.pl -> checks that SWIG is 1.3 or later or gives an error
# usage: check.pl -perl -> prints location of perl CORE directory
diff -ru CLucene-1.00/Makefile.PL CLucene/Makefile.PL
--- CLucene-1.00/Makefile.PL 2005-05-16 23:35:37.000000000 +0100
+++ CLucene/Makefile.PL 2018-03-02 19:46:09.383139457 +0000
@@ -43,8 +43,8 @@
{
return <<EOM ;
-OS := \$(shell perl ./check.pl -os)
-PERLCORE := \$(shell perl check.pl -perl)
+OS := \$(shell $^X ./check.pl -os)
+PERLCORE := \$(shell $^X check.pl -perl)
ifeq ("cygwin","\$(OS)") # cygwin
LIBDIR=\$(HOME)/clucene.output/lib
@@ -80,7 +80,7 @@
# swig perl/C wrapper to DLL interface
clucene_wrap.o: clucene.i clucene_perl.h
- \@perl check.pl
+ \@$^X check.pl
\$(SWIG) -perl clucene.i
\${CC} -c clucene_wrap.c \$(CFLAGS) -I\${PERLCORE} -Dbool=char \${SWIGCFLAGS}
diff -ru CLucene-1.00/t/clucene_test.pl CLucene/t/clucene_test.pl
--- CLucene-1.00/t/clucene_test.pl 2005-05-16 23:37:07.000000000 +0100
+++ CLucene/t/clucene_test.pl 2018-03-02 16:49:25.813606492 +0000
@@ -1,4 +1,3 @@
-#!/usr/bin/perl
# clucene_test.pl - test program for CLucene perl wrapper
#
# Copyright(c) 2005 Peter Edwards <peterdragon@users.sourceforge.net>