Front page | perl.perl5.porters |
Postings from November 2003
[perl #24415] 5.8.1 build problem
From:
Richard Kandarian
Date:
November 4, 2003 21:29
Subject:
[perl #24415] 5.8.1 build problem
Message ID:
rt-24415-67070.11.2250002337131@rt.perl.org
# New Ticket Created by Richard Kandarian
# Please include the string: [perl #24415]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24415 >
I'm building an embedded Perl application with XS modules.
I build perl 5.8.1 (problem exists in 5.8.0 also but I don't think I
reported it) on Win32 (XP) platform with win32/Makefile patched as under
"Makefile.patch" at the end of this message.
My build fails (in ext - unresolved symbol - the interpreter, if I recall
correctly) unless I patch regcomp.c and regexec.c as follows:
regcomp.c.patch:
--- regcomp.c.orig 2003-09-21 04:39:02.000000000 -0600
+++ regcomp.c 2003-11-04 13:55:14.000000000 -0700
@@ -83,6 +83,9 @@
#include "EXTERN.h"
#define PERL_IN_REGCOMP_C
#include "perl.h"
+#ifdef PERL_IN_XSUB_RE
+#include "XSUB.h"
+#endif
#ifndef PERL_IN_XSUB_RE
# include "INTERN.h"
regexec.c.patch:
--- regexec.c.orig 2003-09-11 00:07:03.000000000 -0600
+++ regexec.c 2003-11-04 13:55:23.000000000 -0700
@@ -80,6 +80,9 @@
#include "EXTERN.h"
#define PERL_IN_REGEXEC_C
#include "perl.h"
+#ifdef PERL_IN_XSUB_RE
+#include "XSUB.h"
+#endif
#include "regcomp.h"
Makefile.patch:
--- Makefile.orig 2003-09-25 05:14:19.000000000 -0600
+++ Makefile 2003-11-04 13:29:58.000000000 -0700
@@ -32,7 +32,7 @@
# versioned installation can be obtained by setting INST_TOP above to a
# path that includes an arbitrary version string.
#
-#INST_VER = \5.8.1
+INST_VER = \5.8.1
#
# Comment this out if you DON'T want your perl installation to have
@@ -43,7 +43,7 @@
# the same location. Commenting it out gives you a simpler
# installation that is easier to understand for beginners.
#
-#INST_ARCH = \$(ARCHNAME)
+INST_ARCH = \$(ARCHNAME)
#
# uncomment to enable multiple interpreters. This is need for fork()
@@ -56,14 +56,14 @@
# This should be enabled to get the fork() emulation. This needs
# USE_MULTI as well.
#
-USE_ITHREADS = define
+#USE_ITHREADS = define
#
# uncomment to enable the implicit "host" layer for all system calls
# made by perl. This needs USE_MULTI above. This is also needed to
# get fork().
#
-USE_IMP_SYS = define
+#USE_IMP_SYS = define
#
# Comment out next assign to disable perl's I/O subsystem and use compiler's
@@ -102,6 +102,18 @@
# with all compilers that are known to have a working optimizer.
#
#CFG = Debug
+# symbols etc but no _DEBUG (no -MDd, no msvcrtd)
+CFG = db0
+# db0 plus _DDEBUGGING (standard CFG)
+#CFG = db1
+# db0 plus _DEBUG (-MDd and msvcrtd)
+#CFG = db2
+# db2 plus -DDEBUGGING (I think this is a Perl symbol)
+#CFG = db3
+# db2 plus -D_CRTDBG_MAP_ALLOC
+#CFG = db4
+# db2 plus -DDEBUGGING and -D_CRTDBG_MAP_ALLOC
+#CFG = *
#
# uncomment to enable use of PerlCRT.DLL when using the Visual C compiler.
@@ -321,6 +333,12 @@
ARCHNAME = $(ARCHNAME)-thread
!ENDIF
+#RMK#START
+! IF "$(CFG)" != ""
+ARCHNAME = $(ARCHNAME)-$(CFG)
+! ENDIF
+#RMK#END
+
# Visual Studio 98 specific
!IF "$(CCTYPE)" == "MSVC60"
@@ -367,7 +385,17 @@
CXX_FLAG = -TP -GX
!IF "$(USE_PERLCRT)" != "define"
+#RMK#START
+! IF "$(CFG)" != ""
+! IF "$(CFG)" == "db0" || "$(CFG)" == "db1"
LIBC = msvcrt.lib
+! ELSE
+LIBC = msvcrtd.lib
+! ENDIF
+! ELSE
+LIBC = msvcrt.lib
+! ENDIF
+#RMK#END
!ELSE
LIBC = PerlCRT.lib
!ENDIF
@@ -375,11 +403,25 @@
PERLEXE_RES =
PERLDLL_RES =
-!IF "$(CFG)" == "Debug"
+!IF "$(CFG)" != ""
! IF "$(CCTYPE)" == "MSVC20"
OPTIMIZE = -Od -MD -Z7 -DDEBUGGING
! ELSE
-OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+#RMK#OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+! IF "$(CFG)" == "db0"
+OPTIMIZE = -Od -MD -Zi
+! ELSE IF "$(CFG)" == "db1"
+ OPTIMIZE = -Od -MD -Zi -DDEBUGGING
+! ELSE IF "$(CFG)" == "db2"
+OPTIMIZE = -Od -MDd -Zi
+! ELSE IF "$(CFG)" == "db3"
+OPTIMIZE = -Od -MDd -Zi -DDEBUGGING
+! ELSE IF "$(CFG)" == "db4"
+OPTIMIZE = -Od -MDd -Zi -D_CRTDBG_MAP_ALLOC
+! ELSE
+OPTIMIZE = -Od -MDd -Zi -DDEBUGGING -D_CRTDBG_MAP_ALLOC
+! ENDIF
+#RMK#END
! ENDIF
LINK_DBG = -debug
!ELSE
@@ -392,6 +434,8 @@
! ELSE
# -O1 yields smaller code, which turns out to be faster than -O2 on x86
OPTIMIZE = $(OPTIMIZE) -O1
+#RMK#OPTIMIZE = -O1 -MD -DNDEBUG #problems restarting interpreter
+OPTIMIZE = -Od -MD -DNDEBUG
#OPTIMIZE = $(OPTIMIZE) -O2
! ENDIF
!ENDIF
Richard Kandarian
http://www.lanl.gov/cgi-bin/fonelink.pl/085598
Any opinions stated in this message are not expressed on behalf of any
individual or entity other than me unless explicitly noted otherwise. My
node in the Web: http://www.kandarian.com
-
[perl #24415] 5.8.1 build problem
by Richard Kandarian