Hi,
After reading the build instructions on the Apache site and googling around, I
am still having some problems compiling Xalan 1.5 with the STLPort 4.5.
Here are more details:
- My platform is linux, i686, kernel 2.2.19-az.3, redhat 6.2, gcc-2.95.2
- I built xerces 2.1.0 successfully with STLPort4.5 and the same platform
- I set the environment variables XERCESCROOT, XALANCROOT, STLPORTROOT.
- The Xalan configure command line was:
./runConfigure -plinux -cgcc -xg++ -d -rpthread -b32 -z
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport
The compilation runs fine until the first std::ostream& reference. the error is:
g++ -I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
-Wall -fPIC -DLINUX -D_REENTRANT -c
-I/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src
-I/workplace/abrampro/xerces-c-src2_1_0/src/
-I/workplace/abrampro/xerces-c-src2_1_0/include/xercesc
-I/workplace/abrampro/xerces-c-src2_1_0/include/ -o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/obj/AttributeListImpl.o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/AttributeListImpl.cpp
In file included from
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/AttributeVectorEntry.hpp:71,
from
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/AttributeListImpl.cpp:72:
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp:1049:
`ostream' undeclared in namespace `_STL'
The code in question is
XALAN_PLATFORMSUPPORT_EXPORT_FUNCTION(void)
OutputString(
#if defined(XALAN_NO_STD_NAMESPACE)
ostream& theStream,
#else
std::ostream& theStream,
#endif
const CharVectorType& theString);
I attached more traces at the end of this email. What I'd like to know is if
anyone has seen this before. My gut feeling is that I am missing some
additional defines either from STLPort or Xalan.
[As a side note, if I use the stock stl provided with gcc 2.98.2, some newer
STL files like sstream are not present. Has anyone come up with a quick and
easy way to write code that's compatible with both with the newest STL files
and the oldest? I use sstream pretty much everywhere on my win32 apps.]
Thanks in advance for any input.
Emmanuel
------------
-- Traces --
env:
XERCESCROOT=/workplace/abrampro/xerces-c-src2_1_0
XALANCROOT=/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c
STLPORTROOT=/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport
----
./runConfigure -plinux -cgcc -xg++ -d -rpthread -b32 -z
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport
Generating makefiles with the following options ...
Platform: linux
C Compiler: gcc
C++ Compiler: g++
Extra compile options:
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport
Extra link options:
Thread option: pthread
bitsToBuild option: 32
Extra configure options:
Debug is ON
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
) works... yes
checking whether the C compiler (gcc
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for c++... g++
checking whether the C++ compiler (g++
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
) works... yes
checking whether the C++ compiler (g++
-I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
) is a cross-compiler... no
checking whether we are using GNU C++... yes
checking whether g++ accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for autoconf... autoconf
checking for floor in -lm... yes
checking whether -fno-elide-constructors works correctly... no
checking host system type... i686-pc-linux-gnu
updating cache ./config.cache
creating ./config.status
creating Makefile
If the result of the above commands look OK to you, go to the directory
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src and type "gmake" or "make"
to make the XALAN-C system.
Note: You must use GNU make to use the Xalan Makefile.
----
gmake
Preparing the directory structure for a build ...
mkdir -p /workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/obj
mkdir -p /workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/lib
mkdir -p /workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/bin
g++ -I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
-Wall -fPIC -DLINUX -D_REENTRANT -c
-I/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src
-I/workplace/abrampro/xerces-c-src2_1_0/src/
-I/workplace/abrampro/xerces-c-src2_1_0/include/xercesc
-I/workplace/abrampro/xerces-c-src2_1_0/include/ -o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/obj/XalanAttr.o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/XalanDOM/XalanAttr.cpp
g++ -I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
-Wall -fPIC -DLINUX -D_REENTRANT -c
-I/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src
-I/workplace/abrampro/xerces-c-src2_1_0/src/
-I/workplace/abrampro/xerces-c-src2_1_0/include/xercesc
-I/workplace/abrampro/xerces-c-src2_1_0/include/ -o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/obj/XalanCDataSection.o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/XalanDOM/XalanCDataSection.cpp
... compiles fine until:
g++ -I/opt/disco/third-party/Linux-2.2c2.1-i686/stlport-4.5/include/stlport -g
-Wall -fPIC -DLINUX -D_REENTRANT -c
-I/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src
-I/workplace/abrampro/xerces-c-src2_1_0/src/
-I/workplace/abrampro/xerces-c-src2_1_0/include/xercesc
-I/workplace/abrampro/xerces-c-src2_1_0/include/ -o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/obj/AttributeListImpl.o
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/AttributeListImpl.cpp
In file included from
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/AttributeVectorEntry.hpp:71,
from
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/AttributeListImpl.cpp:72:
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp:1049:
`ostream' undeclared in namespace `_STL'
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp:1049:
`theStream' was not declared in this scope
/workplace/abrampro/Xalan-C_1_5-src/xml-xalan/c/src/PlatformSupport/DOMStringHelper.hpp:1051:
parse error before `&'