On Thu, 31 Oct 2002, Wilbur R. Johnson wrote:
> Did you use the out-of-the-box instructions for the build? Did you have to
> fiddle around? Also, which version of solaris?
>
Now that you mention it, I did have to patch Xerces-XML. I sent the
patches to Jason quite a while back, but never heard anything one way or
the other.
At any rate, try this (there's some AIX-specific things too). You may
have to play with the compiler strings in the 'hints' patches.
Steve
p.s. - Obligatory disclaimer: This is in NO way an official action of IBM
Corporation.
diff -uNr XML-Xerces-1.7.0_0.orig/Handler/Makefile.PL
XML-Xerces-1.7.0_0/Handler/Makefile.PL
--- XML-Xerces-1.7.0_0.orig/Handler/Makefile.PL 2001-12-20 23:15:01.000000000 -0500
+++ XML-Xerces-1.7.0_0/Handler/Makefile.PL 2002-08-26 14:40:27.969999255 -0400
@@ -1,5 +1,5 @@
WriteMakefile(
- LINKTYPE => 'static',
+ linkext => { LINKTYPE => 'static' },
'NAME' => 'Handler',
'INC' => $INCLUDES,
'OBJECT' => '$(O_FILES)',
diff -uNr XML-Xerces-1.7.0_0.orig/Handler/hints/aix.pl
XML-Xerces-1.7.0_0/Handler/hints/aix.pl
--- XML-Xerces-1.7.0_0.orig/Handler/hints/aix.pl 1969-12-31 19:00:00.000000000
-0500
+++ XML-Xerces-1.7.0_0/Handler/hints/aix.pl 2002-08-26 14:14:45.150003905 -0400
@@ -0,0 +1,68 @@
+$self->{CCFLAGS} .= " -DHAS_BOOL -Dbool=int";
+$self->{CC} = "xlC_r -qmaxmem=16384 -qnotempinc -qfuncsect";
+
+__END__
+This was derived from the following email:
+
+From: "Derek Fountain" <[EMAIL PROTECTED]>
+Subject: Re: Xerces Perl on AIX
+To: [EMAIL PROTECTED]
+Date: Mon, 23 Jul 2001 11:22:39 +0100
+
+> Good detective work, derek. This is most definately the problem. Perl
+> thinks your bool's should be char's, and Xerces-C thinks they should
+> be int's. Try adding -Dbool=int to the CFLAGS in your Makefile.PL and
+> recompile Xerces.pm.
+>
+> You want to convince them to both use the same encoding, so you either
+> get Xerces-C to accept bool=char, or the other way 'round.
+
+Ah-ha! I've got it working! The samples work! The job's not done yet, but the
+end is in sight...
+
+Setting -Dbool=int in the Makefile.PL didn't help. The compiler issues a
+warning about the value being redefined, then uses the new value. The new
+value appears to come from my perl-5.6.1/lib/5.6.1/aix/CORE/handy.h file,
+which resets bool=char. I forced a fix by going into this file and changing
+the line there before doing the compile of Xerces for Perl. Specifically:
+
+===
+#ifndef HAS_BOOL
+# if defined(UTS) || defined(VMS)
+# define bool int
+# else
+// # define bool char
+# define bool int
+# endif
+# define HAS_BOOL 1
+#endif
+===
+
+Of course, this isn't the real solution. I've had to change the file back to
+prevent breakage in anything else I try to compile. I had a look in the
+xerces library code and found this in src/util/Transcoders/Iconv400/utypes.h:
+
+===
+#if ! HAVE_BOOL_T
+typedef int8_t bool_t;
+#endif
+===
+
+I'm not sure if that's the right file, but clearly the intention in the
+xerces code is for integer type booleans.
+
+So, if my assessment is right, the xerces library code wants ints, and the
+Perl library code wants chars, which means the Xerces-Perl code is going to
+have to bend around the issue, probably by ignoring the Perl header file and
+defining bool to be an int itself when compiled under AIX (or, presumably,
+any UNIX platform which Perl thinks should have char based bools).
+
+Quite how to sort this one out is, I think, a job for someone who has a
+better idea of how things fit together. :P
+
+---------------------------------------------------------------------
+To unsubscribe, e-mail: [EMAIL PROTECTED]
+For additional commands, e-mail: [EMAIL PROTECTED]
+
+
+
diff -uNr XML-Xerces-1.7.0_0.orig/Handler/hints/solaris_2.pl
XML-Xerces-1.7.0_0/Handler/hints/solaris_2.pl
--- XML-Xerces-1.7.0_0.orig/Handler/hints/solaris_2.pl 1969-12-31 19:00:00.000000000
-0500
+++ XML-Xerces-1.7.0_0/Handler/hints/solaris_2.pl 2002-08-26 14:41:36.009999338
+-0400
@@ -0,0 +1,18 @@
+# Different C++ compilers on the same architecture are (most likely)
+# not binary compatible. This poses difficulties in writing hints for
+# MakeMaker. Suggestions welcome.
+
+use Config;
+
+# if we are using gcc
+if ($Config{gccversion}) {
+
+ # gcc on solaris needs HAS_BOOL
+ $self->{CCFLAGS} .= " -DHAS_BOOL";
+} elsif ($Config{ccversion} =~ /WorkShop Compilers/) {
+ $self->{CC} = '/opt/SUNWspro/SC4.2/bin/CC';
+} else {
+ print STDERR "Warning: Unknown compiler '$Config{ccversion}'.";
+}
+
+
diff -uNr XML-Xerces-1.7.0_0.orig/Makefile.PL XML-Xerces-1.7.0_0/Makefile.PL
--- XML-Xerces-1.7.0_0.orig/Makefile.PL 2002-03-23 16:38:51.000000000 -0500
+++ XML-Xerces-1.7.0_0/Makefile.PL 2002-08-26 14:46:00.939999919 -0400
@@ -131,28 +131,6 @@
my $LIBXERCES = "-lxerces-c$XERCES_LIB_VERSION";
$LIBS .= " $LIBXERCES";
-# now we ensure that libxerces is in the library path
-# if not we die()
-print STDERR "Checking to see if libxerces is in your library path...";
-my $lib;
-($lib) = MM->new->ExtUtils::Liblist::ext($LIBS);
-
-die <<EOE unless $lib;
-
-
- !!!WHOA!!!
-
-I couldn\'t find $LIBXERCES anywhere in your library path. Begging to
-differ with perl, this is most assuredly *NOT* harmless. This is a
-critical error that will prevent you from running Xerces.pm.
-
-Check your settings of \$XERCES_INCLUDE and \$XERCES_LIB, and rerun
-'perl Makefile.PL'
-
-EOE
-
-print STDERR "Success!!\n";
-
# give some nice feedback for the user
print STDERR "Using Xerces-C version: $XERCES_VERSION\n";
@@ -256,9 +234,19 @@
'LIBS' => [$LIBS],
'NAME' => 'XML::Xerces',
'OBJECT' => $OBJS,
- 'DIR' => ['DOMParse'],
+ 'DIR' => ['DOMParse','Handler'],
'VERSION' => "$XERCES_PERL_VERSION",
@OPTIMIZE,
@MACRO
);
+# Adjust the embedded load path back to a reasonable base.
+sub MY::const_loadlibs {
+ package MY;
+ my $inherited = shift->SUPER::const_loadlibs(@_);
+
+ if ( $^O =~ /^linux/i or $^O =~ /^solaris/i ) {
+ $inherited =~ s!^(LD_RUN_PATH\s*=\s*).*$!$ {1}/lib:/usr/lib!ms;
+ }
+ $inherited;
+}
diff -uNr XML-Xerces-1.7.0_0.orig/hints/aix.pl XML-Xerces-1.7.0_0/hints/aix.pl
--- XML-Xerces-1.7.0_0.orig/hints/aix.pl 2001-11-05 17:10:49.000000000 -0500
+++ XML-Xerces-1.7.0_0/hints/aix.pl 2002-08-26 14:53:29.000000000 -0400
@@ -1,4 +1,6 @@
$self->{CCFLAGS} .= " -DHAS_BOOL -Dbool=int";
+$self->{LD} = "makeC++SharedLib_r -p0 -bh:5 -blibpath:/usr/xlC/lib:/usr/lib:/lib";
+$self->{CC} = "xlC_r -qmaxmem=16384 -qfuncsect -qnotempinc";
__END__
This was derived from the following email:
diff -uNr XML-Xerces-1.7.0_0.orig/hints/solaris_2.pl
XML-Xerces-1.7.0_0/hints/solaris_2.pl
--- XML-Xerces-1.7.0_0.orig/hints/solaris_2.pl 2001-11-01 12:45:06.000000000 -0500
+++ XML-Xerces-1.7.0_0/hints/solaris_2.pl 2002-08-26 14:40:07.430001861 -0400
@@ -9,4 +9,13 @@
# gcc on solaris needs HAS_BOOL
$self->{CCFLAGS} .= " -DHAS_BOOL";
+} elsif ($Config{ccversion} =~ /WorkShop Compilers/) {
+ $self->{CCFLAGS} .= " -DHAS_BOOL -Dbool=int";
+ $self->{CC} = '/opt/SUNWspro/SC4.2/bin/CC';
+ $self->{LD} = '/opt/SUNWspro/SC4.2/bin/CC';
+ $self->{LIBS}[0] .= ' -lC';
+} else {
+ print STDERR "Warning: Unknown compiler '$Config{ccversion}'.";
}
+
+
--
----------------------------------------------------------------
Steven N. Hirsch tie-line: 446-6557 ext: 802-769-6557
Staff Engineer Methodology Integration Team
ASIC Product Development IBM Microelectronics
----------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]