hi, I am writing an application to r/w data to an xml file using "C" language I want to complie thru the arm-linux-gcc , I tried using flags like --enable-libxml2 --with-arch=arm but I got an error if any body already tried this in arm-linux-compiler or have any idea abt hw to do this please guide me by some steps or any web links for material thanks, armtry.
Libxml in arm-linux-gcc tool chain
Hmm you mix something here. You want compile your code with arm-linux-gcc and want to link with some xml library?
Hi nandra,
Yes I want to include libxml2-dev library or mxml library and any
other XML parsers that can compile with C code
but libxml2 is of main interest say earlier I was using these libraries
#include<libxml/xmlmemory.h>
#include<libxml/parser.h> and compile with these flags -lm `xml2-config
--cflags` `xml2-config --libs` for gcc compiler well now that I have
libxml2
You can try to build againt libxml2 in that way (if xml2 is shared lib): arm-linux-gcc <file_to_compile.c> -o <binary_output_name> -I<include pathc for libxml2> -L<path to libxml2.so library> -lxml2
Hi nandra,
I downloaded the source libxml2-2.7.7.tar.gz from
http://xmlsoft.org/downloads.html
and utared libxml2 and then tried these steps
1. Set the environment variables:
export PATH=/usr/local/arm/4.3.2/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-linux-
2. Configure and build Expat:
./configure --host=arm-linux --prefix=/usr/local/arm/
make
make install
after this when I tried compile my source code then I get this following
error
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
cc1: warning: include location "/usr/include/libxml2" is unsafe for
cross-compilation
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm
-none-linux-gnueabi/bin/ld:
cannot find -lxml2
collect2: ld returned 1 exit status
thanks in advance,
armtry.
hi nandra,
I've used this link
http://mail.gnome.org/archives/xml/2004-October/msg00122.html as reference
but I want to know how to do cross compilation paramters
I've install my arm-linux-gcc cross tool chain in /usr/local/arm/4.3.2/
as given in the mini2440 manual
thanks in advance,
armtry.
Hi all,
I have done the Cross Compiling of Libxml successfully against
arm-linux-gcc
download libxml2-2.6.27.tar.gz and untar it and replace Makefile with the
Makefile attached to this thread
and then
1) cd libxml2-2.6.27
2) ./configure --host=arm-linux-gnu --target=arm-linux CC=arm-linux-gcc
AR=arm-linux-ar LD=arm-linux-ld RANLIB=arm-linux-ranlib --prefix=/usr
/local/arm/4.3.2/
3) make install
and the try to compile C code with arm-linux-gcc including the #include
libraries for libxml2.h
Thanks,
ARMTRY
Hi all,
in the target machine mini2440 board put this libxml2.so.2 in /lib/
and run the executable
Thanks,
ARMTRY
Hello Sir, Here i am compiling my c code with arm-none-linux-gnueabi-gcc. The process which you explain to compile c code with arm-linux can be used for compile my code with arm-none-linux-gnueabi-gcc? or i have to make some changes for this? Please help me to sort out this issue.
i am compiling my c code with arm-xilinx-linux-gnueabi-gcc. The process which you explain to compile c code with arm-linux can be used for compile my code with arm-xilinx-linux-gnueabi-gcc? or i have to make some changes for this? Please help me to sort out this issue.


