Compiling xalan C++1.10 / xerces 2.8.0 with mingw

View: New views
9 Messages — Rating Filter:   Alert me  

Compiling xalan C++1.10 / xerces 2.8.0 with mingw

by simelbaz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I am trying to compile xalan c++ 1.10 under mingw using g++, xerces2.8.0
and icu3.2.1.
xerces 2.8.0 and ICU3.2.1 dlls are ready but when compiling xalan c++,
with the following commands:
 >cd $XALANCROOT
 >runConfigure -p cygwin -c i386-mingw32-gcc -x i386-mingw32-g++ -C
--host=i386-pc-cygwin  -m icu -t icu
 >make clean; make

I get the following error:

/home/simon/mingw/bin/i386-mingw32-g++ -O -DNDEBUG
-I/mnt/backup_software/icu_mingw/include    -Wall -DCYGWIN -D_REENTRANT
-DXALAN_ICU_MSG_LOADER -DXALAN_USE_ICU -c
-I/mnt/backup_software/xml-xalan/c/src
-I/mnt/backup_software/xml-xalan/c/include -I../../nls/include
-I/mnt/backup_software/xerces-c-src_2_8_0/src/
-I/mnt/backup_software/xerces-c-src_2_8_0/include/xercesc
-I/mnt/backup_software/xerces-c-src_2_8_0/include/
-I/mnt/backup_software/icu_mingw/include  -o ../../obj/XalanDOMString.o
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:
In function `void xalanc_1_10::doXercesTranscode(const SourceType*,
unsigned int, bool, xalanc_1_10::XalanVector<TargetType,
xalanc_1_10::MemoryManagedConstructionTraits<TargetType> >&, bool, char)
[with SourceType = xalanc_1_10::XalanDOMChar, TargetType = char]':
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1060:  
instantiated from here
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:880:
error: invalid conversion from `const xalanc_1_10::XalanDOMChar*' to
`const XMLCh*'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:880:
error:   initializing argument 1 of `static bool
xercesc_2_8::XMLString::transcode(
const XMLCh*, char*, unsigned int, xercesc_2_8::MemoryManager*)'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1060:  
instantiated from here
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:906:
error: invalid conversion from `xalanc_1_10::XalanDOMChar*' to `const
XMLCh*'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:906:
error:   initializing argument 1 of `static bool
xercesc_2_8::XMLString::transcode(const XMLCh*, char*, unsigned int,
xercesc_2_8::MemoryManager*)'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:
In function `bool xalanc_1_10::doXercesTranscode(const SourceType*,
unsigned int, bool, xalanc_1_10::XalanVector<TargetType,
xalanc_1_10::MemoryManagedConstructionTraits<TargetType> >&, bool) [with
SourceType = xalanc_1_10::XalanDOMChar, TargetType = char]':
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1095:  
instantiated from here
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
error: invalid conversion from `const xalanc_1_10::XalanDOMChar*' to
`const XMLCh*'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
error:   initializing argument 1 of `static bool
xercesc_2_8::XMLString::transcode(const XMLCh*, char*, unsigned int,
xercesc_2_8::MemoryManager*)'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:
In function `bool xalanc_1_10::doXercesTranscode(const SourceType*,
unsigned int, bool, xalanc_1_10::XalanVector<TargetType,
xalanc_1_10::MemoryManagedConstructionTraits<TargetType> >&, bool) [with
SourceType = char, TargetType = xalanc_1_10::XalanDOMChar]':
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1190:  
instantiated from here
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
error: invalid conversion from `xalanc_1_10::XalanDOMChar*' to `XMLCh*'
/mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
error:   initializing argument 2 of `static bool
xercesc_2_8::XMLString::transcode(const char*, XMLCh*, unsigned int,
xercesc_2_8::MemoryManager*)'
make[1]: *** [../../obj/XalanDOMString.o] Error 1
make[1]: Leaving directory `/mnt/backup_software/xml-xalan/c/src/xalanc'
make: *** [all] Error 2

Thanks for you help

Simon Elbaz

The periodic question...

by Rob.Conde :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey David,
        Does the current trunk work with xerces 3.0? Any plans for a xalan
release matching 3.0 in the near future?

Thanks for the hard work,
Rob



Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Simon Elbaz wrote:

> Hi,
> I am trying to compile xalan c++ 1.10 under mingw using g++, xerces2.8.0
> and icu3.2.1.
> xerces 2.8.0 and ICU3.2.1 dlls are ready but when compiling xalan c++,
> with the following commands:
>  >cd $XALANCROOT
>  >runConfigure -p cygwin -c i386-mingw32-gcc -x i386-mingw32-g++ -C
> --host=i386-pc-cygwin  -m icu -t icu
>  >make clean; make
>
> I get the following error:
>
> /home/simon/mingw/bin/i386-mingw32-g++ -O -DNDEBUG
> -I/mnt/backup_software/icu_mingw/include    -Wall -DCYGWIN -D_REENTRANT
> -DXALAN_ICU_MSG_LOADER -DXALAN_USE_ICU -c
> -I/mnt/backup_software/xml-xalan/c/src
> -I/mnt/backup_software/xml-xalan/c/include -I../../nls/include
> -I/mnt/backup_software/xerces-c-src_2_8_0/src/
> -I/mnt/backup_software/xerces-c-src_2_8_0/include/xercesc
> -I/mnt/backup_software/xerces-c-src_2_8_0/include/
> -I/mnt/backup_software/icu_mingw/include  -o ../../obj/XalanDOMString.o
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:
> In function `void xalanc_1_10::doXercesTranscode(const SourceType*,
> unsigned int, bool, xalanc_1_10::XalanVector<TargetType,
> xalanc_1_10::MemoryManagedConstructionTraits<TargetType> >&, bool, char)
> [with SourceType = xalanc_1_10::XalanDOMChar, TargetType = char]':
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1060:  
> instantiated from here
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:880:
> error: invalid conversion from `const xalanc_1_10::XalanDOMChar*' to
> `const XMLCh*'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:880:
> error:   initializing argument 1 of `static bool
> xercesc_2_8::XMLString::transcode(
> const XMLCh*, char*, unsigned int, xercesc_2_8::MemoryManager*)'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1060:  
> instantiated from here
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:906:
> error: invalid conversion from `xalanc_1_10::XalanDOMChar*' to `const
> XMLCh*'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:906:
> error:   initializing argument 1 of `static bool
> xercesc_2_8::XMLString::transcode(const XMLCh*, char*, unsigned int,
> xercesc_2_8::MemoryManager*)'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:
> In function `bool xalanc_1_10::doXercesTranscode(const SourceType*,
> unsigned int, bool, xalanc_1_10::XalanVector<TargetType,
> xalanc_1_10::MemoryManagedConstructionTraits<TargetType> >&, bool) [with
> SourceType = xalanc_1_10::XalanDOMChar, TargetType = char]':
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1095:  
> instantiated from here
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
> error: invalid conversion from `const xalanc_1_10::XalanDOMChar*' to
> `const XMLCh*'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
> error:   initializing argument 1 of `static bool
> xercesc_2_8::XMLString::transcode(const XMLCh*, char*, unsigned int,
> xercesc_2_8::MemoryManager*)'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:
> In function `bool xalanc_1_10::doXercesTranscode(const SourceType*,
> unsigned int, bool, xalanc_1_10::XalanVector<TargetType,
> xalanc_1_10::MemoryManagedConstructionTraits<TargetType> >&, bool) [with
> SourceType = char, TargetType = xalanc_1_10::XalanDOMChar]':
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1190:  
> instantiated from here
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
> error: invalid conversion from `xalanc_1_10::XalanDOMChar*' to `XMLCh*'
> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
> error:   initializing argument 2 of `static bool
> xercesc_2_8::XMLString::transcode(const char*, XMLCh*, unsigned int,
> xercesc_2_8::MemoryManager*)'
> make[1]: *** [../../obj/XalanDOMString.o] Error 1
> make[1]: Leaving directory `/mnt/backup_software/xml-xalan/c/src/xalanc'
> make: *** [all] Error 2
>
> Thanks for you help
You'll have much better luck getting the head of the Subversion
repository to compile cleanly on mingw.

If you really want to try with Xalan-C 1.10, the fix for this error is
to modify src/xalanc/Include/PlatformDefinitions.hpp as follows:

     #if defined(XALAN_USE_NATIVE_WCHAR_T)
     typedef wchar_t XalanDOMChar;
     #else
     // UTF-16 character...
     typedef unsigned short XalanDOMChar;
     #endif

becomes:

     typedef XMLCh  XalanDOMChar;

Dave

Re: The periodic question...

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rob.Conde wrote:
> Hey David,
> Does the current trunk work with xerces 3.0? Any plans for a xalan
> release matching 3.0 in the near future?
Yes, it should work with both Xerces-C 2.8 and Xerces-C 3.0.  I am
working on a release right now, but I don't know the ETA.  The head of
the trunk is now quite stable, so you might want to do some testing on
the platforms you're interested in.

Dave

RE: The periodic question...

by Rob.Conde :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for that update...we will indeed begin testing.

Rob

-----Original Message-----
From: David Bertoni [mailto:dbertoni@...]
Sent: Wednesday, October 15, 2008 3:07 PM
To: xalan-c-users@...
Subject: Re: The periodic question...

Rob.Conde wrote:
> Hey David,
> Does the current trunk work with xerces 3.0? Any plans for a xalan
> release matching 3.0 in the near future?
Yes, it should work with both Xerces-C 2.8 and Xerces-C 3.0.  I am
working on a release right now, but I don't know the ETA.  The head of
the trunk is now quite stable, so you might want to do some testing on
the platforms you're interested in.

Dave



RE: The periodic question...

by Rob.Conde :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

To make the final transition a bit easier...what version # will be used for
the release?

Thanks,
Rob

-----Original Message-----
From: David Bertoni [mailto:dbertoni@...]
Sent: Wednesday, October 15, 2008 3:07 PM
To: xalan-c-users@...
Subject: Re: The periodic question...

Rob.Conde wrote:
> Hey David,
> Does the current trunk work with xerces 3.0? Any plans for a xalan
> release matching 3.0 in the near future?
Yes, it should work with both Xerces-C 2.8 and Xerces-C 3.0.  I am
working on a release right now, but I don't know the ETA.  The head of
the trunk is now quite stable, so you might want to do some testing on
the platforms you're interested in.

Dave



Re: The periodic question...

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rob.Conde wrote:
> To make the final transition a bit easier...what version # will be used for
> the release?
1.11.  I'm going commit the changes to update the version early next
week, if not sooner. Unfortunately, there are a lot of Visual Studio
project files to fix...

Dave

Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw

by simelbaz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
after downloading the trunk version from subversion, the following error
appears:

/home/simon/mingw/bin/i386-mingw32-g++ -O -DNDEBUG
-I/mnt/backup_software/icu_mingw/include    -Wall -DCYGWIN -D_REENTRANT
-DXALAN_ICU_MSG_LOADER -DXALAN_USE_ICU -c
-I/mnt/backup_software/trunk/src -I/mnt/backup_software/trunk/include
-I../../nls/include -I/mnt/backup_software/xerces-c-src_2_8_0/src/
-I/mnt/backup_software/xerces-c-src_2_8_0/include/xercesc
-I/mnt/backup_software/xerces-c-src_2_8_0/include/
-I/mnt/backup_software/icu_mingw/include  -o
../../obj/StylesheetConstructionContextDefault.o
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:
In member function `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createMatchPattern(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMChar*, const
xalanc_1_10::PrefixResolver&, bool, bool)':
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:456:
error: invalid conversion from `const xalanc_1_10::LocatorType*' to
`const xalanc_1_10::LocatorType*'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:456:
error:   initializing argument 1 of `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createMatchPattern(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMString&, const
xalanc_1_10::PrefixResolver&, bool, bool)'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:
In member function `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createXPath(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMChar*, const
xalanc_1_10::PrefixResolver&, bool, bool)':
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:511:
error: invalid  conversion from `const xalanc_1_10::LocatorType*' to
`const xalanc_1_10::LocatorType*'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:511:
error:   initializing argument 1 of `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createXPath(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMString&, const
xalanc_1_10::PrefixResolver&, bool, bool)'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:
In member function `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createXPath(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMChar*,
xalanc_1_10::XalanSize_t, const xalanc_1_10::PrefixResolver&, bool, bool)':
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:534:
error: invalid conversion from `const xalanc_1_10::LocatorType*' to
`const xalanc_1_10::LocatorType*'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:534:
error:   initializing argument 1 of `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createXPath(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMString&, const
xalanc_1_10::PrefixResolver&, bool, bool)'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:
In member function `virtual const xalanc_1_10::LocatorType*
xalanc_1_10::StylesheetConstructionContextDefault::getLocatorFromStack()
const':
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:542:
error: invalid conversion from `const xalanc_1_10::LocatorType*' to
`const xalanc_1_10::LocatorType*'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:
In member function `virtual const xalanc_1_10::AVTPart*
xalanc_1_10::StylesheetConstructionContextDefault::createAVTPart(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMChar*,
xalanc_1_10::XalanSize_t, const xalanc_1_10::PrefixResolver&)':
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:1295:
error: invalid conversion from `const xalanc_1_10::LocatorType*' to
`const xalanc_1_10::LocatorType*'
/mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:1295:
error:   initializing argument 1 of `virtual xalanc_1_10::XPath*
xalanc_1_10::StylesheetConstructionContextDefault::createXPath(const
xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMChar*,
xalanc_1_10::XalanSize_t, const xalanc_1_10::PrefixResolver&, bool, bool)'
make[1]: *** [../../obj/StylesheetConstructionContextDefault.o] Error 1
make[1]: Leaving directory `/mnt/backup_software/trunk/src/xalanc'
make: *** [all] Error 2

Thanks for your help
Simon

David Bertoni wrote:

> Simon Elbaz wrote:
>> Hi,
>> I am trying to compile xalan c++ 1.10 under mingw using g++,
>> xerces2.8.0 and icu3.2.1.
>> xerces 2.8.0 and ICU3.2.1 dlls are ready but when compiling xalan
>> c++, with the following commands:
>>  >cd $XALANCROOT
>>  >runConfigure -p cygwin -c i386-mingw32-gcc -x i386-mingw32-g++ -C
>> --host=i386-pc-cygwin  -m icu -t icu
>>  >make clean; make
>>
>> I get the following error:
>>
>> /home/simon/mingw/bin/i386-mingw32-g++ -O -DNDEBUG
>> -I/mnt/backup_software/icu_mingw/include    -Wall -DCYGWIN ...

>> error: invalid conversion from `xalanc_1_10::XalanDOMChar*' to `XMLCh*'
>> /mnt/backup_software/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:992:
>> error:   initializing argument 2 of `static bool
>> xercesc_2_8::XMLString::transcode(const char*, XMLCh*, unsigned int,
>> xercesc_2_8::MemoryManager*)'
>> make[1]: *** [../../obj/XalanDOMString.o] Error 1
>> make[1]: Leaving directory `/mnt/backup_software/xml-xalan/c/src/xalanc'
>> make: *** [all] Error 2
>>
>> Thanks for you help
> You'll have much better luck getting the head of the Subversion
> repository to compile cleanly on mingw.
>
> If you really want to try with Xalan-C 1.10, the fix for this error is
> to modify src/xalanc/Include/PlatformDefinitions.hpp as follows:
>
>     #if defined(XALAN_USE_NATIVE_WCHAR_T)
>     typedef wchar_t            XalanDOMChar;
>     #else
>     // UTF-16 character...
>     typedef unsigned short    XalanDOMChar;
>     #endif
>
> becomes:
>
>     typedef XMLCh  XalanDOMChar;
>
> Dave
>
>


Re: Compiling xalan C++1.10 / xerces 2.8.0 with mingw

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Simon Elbaz wrote:

> Hi,
> after downloading the trunk version from subversion, the following error
> appears:
>
> /home/simon/mingw/bin/i386-mingw32-g++ -O -DNDEBUG
> -I/mnt/backup_software/icu_mingw/include    -Wall -DCYGWIN -D_REENTRANT
> -DXALAN_ICU_MSG_LOADER -DXALAN_USE_ICU -c
> -I/mnt/backup_software/trunk/src -I/mnt/backup_software/trunk/include
> -I../../nls/include -I/mnt/backup_software/xerces-c-src_2_8_0/src/
> -I/mnt/backup_software/xerces-c-src_2_8_0/include/xercesc
> -I/mnt/backup_software/xerces-c-src_2_8_0/include/
> -I/mnt/backup_software/icu_mingw/include  -o
> ../../obj/StylesheetConstructionContextDefault.o
> /mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp
>
> /mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:
> In member function `virtual xalanc_1_10::XPath*
> xalanc_1_10::StylesheetConstructionContextDefault::createMatchPattern(const
> xalanc_1_10::LocatorType*, const xalanc_1_10::XalanDOMChar*, const
> xalanc_1_10::PrefixResolver&, bool, bool)':
> /mnt/backup_software/trunk/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp:456:
> error: invalid conversion from `const xalanc_1_10::LocatorType*' to
> `const xalanc_1_10::LocatorType*'
This looks like a compiler bug.  I can't imagine any other reason it
would be invalid to "convert" between two identical types, or even why
the compiler would need to apply a conversion.

The current trunk compiles cleanly with a variety of compilers.  Can you
provide the output of the -v argument to the compiler?

Dave
LightInTheBox - Buy quality products at wholesale price!