Re: [xml] Question about character encoding support
From: jwert ilstechnology com
To: Roumen Petrov <bugtrack roumenpetrov info>
Cc: xml gnome org
Subject: Re: [xml] Question about character encoding support
Date: Mon, 9 Jun 2008 15:56:40 -0400
I can't use get anything to properly
configure with automake/autoconf on a VxWorks toolchain. I give it
a 50/50 chance that its a user (me) error, not necissarily a problem with
autotools, but VxWorks isn't a popular target for most people, so I don't
think it gets tested often.
I should note, that to compile a hello
world type RTP application for vxworks, you would compile with something
I don't think autotools is smart enough
to figure out all the flags that are required even for the most basic applications.
Jim Wert Jr.
JWert ILSTechnology com
ILS Technology, Inc.
5300 Broken Sound Blvd. Suite 150
Boca Raton, FL 33487
Office: (561) 807-0051
Cell: (561) 504-3452
Roumen Petrov <bugtrack roumenpetrov info>
06/09/2008 03:40 PM
jwert ilstechnology com
xml gnome org
Re: [xml] Question about character encoding
Can we assume that you are able to cross-compile sample
program with gnu autotools without problems ?
jwert ilstechnology com wrote:
> Here are my instructions for building on VxWorks.... I am very ashamed
> how I did this because it is a complete hack, but it works great,
> can't complain too much.
> General Information
> 1. The only way to build for VxWorks is to cross compile from a windows
> linux system. We use a RedHat 5.1 workstation system as our
> 2. VxWorks 6.X has two main types of executable, DKMs (dynamic kernel
> modules), and RTPs (real-time processes). Kernel modules are
> and butter of VxWorks, but they look nothing like processes/threads
> normal UNIX/Windows systems. RTPs are more like processes that
> memory protection, threads, etc. VxWorks 6.X also introduces
> of POSIX conformance to their environment. The POSIX conformance
> key for us to be able to port libxml2. We support accessing
> both DKMs and RTPs.
> 3. There are 2 compilers for VxWorks, the WindRiver compiler, and
> of the GNU toolchain, we have only tested and built with the GNU
> How To Build
> 1. Run the configure on your native linux system (this is the cheesy
> hack). Since the VxWorks GNU toolchain is very close in version
> one in red hat, it generates a good config.h file. We configured
> with the following to keep the size down, (but we have done basic
> with everything compiled in).
> ./configure --with-minimum --with-reader --with-writer --with-regexps
> --with-threads --with-thread-alloc
> 2. Rename the libxml2 folder to "src". This step is
required for our
> replacement makefile to work.
> 3. Run the replacement makefile. I wrote a new makefile that
sets all the
> proper vxworks defines and uses the correct compilers. The two
> the make command line are to tell it which VxWorks Target (SH3.2 little
> endian), and the executable type. We have tested this code on
> and SH32gnule.
> This makefile creates a shared library that runs on VxWorks: (libxml2.so)
> make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=RTP
> This makefile creates a kernel module that runs on VxWorks: (xml2.out)
> make -f Makefile.vxworks clean all VXCPU=SH32gnule VXTYPE=DKM
> Important Notes
> 1. There are several ways that this process could be improved, but
> end of the day, we make products, not port libraries, so we did a
> minimum for our needs.
> 2. VxWorks is the devil, give me embedded linux every day.
> 3. No matter what I tried, I couldn't get the configure to pick up
> VxWorks toolchain, and in my investigation, it has something to do
> automake/autoconf, not any individual package. VxWorks doesn't
> the normal rules for building toolchains.
> 4. The PIC flag in VxWorks (especially for SH processors) is very
> important, and very troublesome. On linux, you can liberally
use the PIC
> flag when compiling and the compiler/linker will ignore it as needed,
> VxWorks if must always be on for shared libraries, and always be off
> static libraries and executables.
> 5. If anyone wants to work on a better way to do the build of libxml2
> VxWorks, I'm happy to help as much as I can, but I'm not looking to
> support it myself.
> Attached Files
> 1. To use my Makefile for vxworks, you should enter the vxworks
> environment (/opt/windriver/wrenv.linux -p vxworks-6.4 for me).
> 2. Run: build.sh libxml2-2.6.32 SH32gnule RTP (where you have
> libxml2-2.6.32.tar.gz and the Makefile in the same directory as the
> Jim Wert Jr.
> JWert ILSTechnology com
> Daniel Veillard <veillard redhat com>
> 06/09/2008 06:23 AM
> Please respond to
> veillard redhat com
> jwert ilstechnology com
> xml gnome org
> Re: [xml] Question about character encoding support
> On Sun, Jun 08, 2008 at 05:46:20PM -0400, jwert ilstechnology com
>> We are using libxml-2.6.32 on VxWorks 6.4. It is far from
being a posix
>> system. I compiled libxml2 without too many issues, but
>> proving to be a lot more difficult. What options do I have
>> various character encodings when parsing XML? 98% of our
>> UTF-8 encoding, but I don't want to limit them if I don't have
>> other parts of our product, I have written my own layer to convert
>> character sets.
>> What is the default behavior for libxml2 if it doesn't have iconv
> By default you will have UTF-8 and UTF-16 which are mandatory,
> the full set of ISO-8859-x (see xmlRegisterCharEncodingHandlersISO8859x
> in encoding.c), plus the possibility to connect new handlers at runtime
> How did you build on VxWorks ? Does configure work ? If not could
> post some kind of Howto so that others can benefits too ?