Issue 2946 - compiling back-perl with perl-5.8.0
Summary: compiling back-perl with perl-5.8.0
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-03 16:52 UTC by philippe.depouilly@math.u-bordeaux.fr
Modified: 2014-08-01 21:05 UTC (History)
0 users

See Also:


Attachments
back_perl.dif (1001 bytes, text/plain)
2004-02-08 22:25 UTC, Norbert Klasen
Details

Note You need to log in before you can comment on or make changes to this issue.
Description philippe.depouilly@math.u-bordeaux.fr 2004-02-03 16:52:16 UTC
Full_Name: Philippe Depouilly
Version: 2.2.5
OS: linux redhat 8.0, 9.0 or AS-3
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (147.210.17.43)


Compiling back-perl (openldap 2.2.5) on a redhat (8.0, 9.0 and AS-3) with
perl-5.8.0 gives this error for each source file in back-perl directory :

init.c: In function `perl_back_db_open':
init.c:152: `my_perl' undeclared (first use in this function)
etc.

But, in each source file :

changing this :

#include <EXTERN.h>
#include <perl.h>

by

#include <EXTERN.h>
#include <perl.h>
#include <XSUB.h>

compiles fine.

or just adding #include <XSUB.h> at the end of perl_back.h (not very nice)

(should be duplicate to unresolved ITS#2554 ?)

Philippe

Comment 1 Norbert Klasen 2004-02-08 22:25:43 UTC

--On Dienstag, Februar 03, 2004 16:52:18 +0000 
Philippe.Depouilly@math.u-bordeaux.fr wrote:

> Full_Name: Philippe Depouilly
> Version: 2.2.5
> OS: linux redhat 8.0, 9.0 or AS-3
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (147.210.17.43)
>
>
> Compiling back-perl (openldap 2.2.5) on a redhat (8.0, 9.0 and AS-3) with
> perl-5.8.0 gives this error for each source file in back-perl directory :
>
> init.c: In function `perl_back_db_open':
> init.c:152: `my_perl' undeclared (first use in this function)
> etc.
>
> But, in each source file :
>
> changing this :
>
># include <EXTERN.h>
># include <perl.h>
>
> by
>
># include <EXTERN.h>
># include <perl.h>
># include <XSUB.h>
>
> compiles fine.
>
> or just adding #include <XSUB.h> at the end of perl_back.h (not very nice)
>
> (should be duplicate to unresolved ITS#2554 ?)
>
> Philippe

SuSE uses the attached patch to build OpenLDAP with Perl 5.8.1. It changes 
the defines for PERL_INTERPRETER, PERL_BACK_XS_INIT_PARAMS and 
PERL_BACK_BOOT_DYNALOADER_PARAMS to the same values that are used when 
HAVE_WIN32_ASPERL is defined and also adds all necessary libs to link with 
in  Makefile.in

Norbert
Comment 2 Norbert Klasen 2004-02-09 19:52:50 UTC
I forgot that attachments are not handled by ITS...

--- servers/slapd/back-perl/perl_back.h	2003/05/16 12:30:20	1.1
+++ servers/slapd/back-perl/perl_back.h	2003/05/16 12:30:33
@@ -29,9 +29,9 @@
 # define PERL_BACK_XS_INIT_PARAMS		pTHX
 # define PERL_BACK_BOOT_DYNALOADER_PARAMS	pTHX, CV *cv
 #else
-# define PERL_INTERPRETER			perl_interpreter
-# define PERL_BACK_XS_INIT_PARAMS		void
-# define PERL_BACK_BOOT_DYNALOADER_PARAMS	CV *cv
+# define PERL_INTERPRETER			my_perl
+# define PERL_BACK_XS_INIT_PARAMS		pTHX
+# define PERL_BACK_BOOT_DYNALOADER_PARAMS	pTHX, CV *cv
 #endif

 extern PerlInterpreter *PERL_INTERPRETER;
--- servers/slapd/back-perl/Makefile.in	2003/05/16 14:32:25	1.1
+++ servers/slapd/back-perl/Makefile.in	2003/05/16 14:33:11
@@ -28,7 +28,7 @@

 shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
 NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
-UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
+UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS) `perl -MExtUtils::Embed 
-e ldopts`

 LIBBASE = back_perl



Norbert

Comment 3 Kurt Zeilenga 2004-03-25 22:32:34 UTC
changed notes
changed state Open to Suspended
Comment 4 Kurt Zeilenga 2004-03-26 18:02:41 UTC
changed notes
moved from Incoming to Build
Comment 5 Kurt Zeilenga 2004-04-27 05:24:36 UTC
changed notes
changed state Suspended to Feedback
Comment 6 Kurt Zeilenga 2004-04-28 23:35:46 UTC
changed notes
changed state Feedback to Release
Comment 7 Kurt Zeilenga 2004-06-05 20:07:48 UTC
changed notes
changed state Release to Closed
Comment 8 Howard Chu 2009-02-17 07:02:45 UTC
moved from Build to Archive.Build
Comment 9 OpenLDAP project 2014-08-01 21:05:10 UTC
Fixed in HEAD
same issue as ITS#2554.