This is my first time trying to cross compile libxml2. I've been successful
building it for windows using visual studio, but I need to cross compile it in
order to support building swish-e (which also requires cross compiling).
Everything seems to go smoothly, I get several .exe files created as well as
the libxml2-2.dll and corresponding .a files. Just wondering what I can do to
get past this undefined reference error when compiling runxmlconf.
Any help would be greatly appreciated.
Script I use to build with:
export CC=i586-mingw32msvc-gcc
export CXX=i586-mingw32msvc-c++
export LD=i586-mingw32msvc-ld
export AR=i586-mingw32msvc-ar
export AS=i586-mingw32msvc-as
export NM=i586-mingw32msvc-nm
export STRIP=i586-mingw32msvc-strip
export RANLIB=i586-mingw32msvc-ranlib
export DLLTOOL=i586-mingw32msvc-dlltool
export OBJDUMP=i586-mingw32msvc-objdump
export RESCOMP=i586-mingw32msvc-windres
# Host Arch
HA=i586-mingw32msvc
# Build System Arch
BA=i686-linux
# Remove the cache for our configure script else we will have problems.
rm -f config.cross.cache
# Take note of the host, target and build options. If you're building
# on another OS you will want change these.
#
# iconv and zlib are the build directory for each, ensure the directory name
# is updated below if updating the version of those libraries.
./configure --prefix=${PWD}/../install \
--without-threads \
--with-iso8859x \
--with-iconv=${PWD}/../libiconv-1.14 \
--with-zlib=${PWD}/../zlib-1.2.8 \
--without-python \
--without-readline \
--cache-file=config.cross.cache \
--host=${HA} \
--target=${HA} \
--build=${BA} \
LDFLAGS=-L${PWD}/../install/lib \
CFLAGS=-I${PWD}/../install/include #\
CPPFLAGS=-I${PWD}/../install/include
# Build Binaries
make
----- output -----
make[2]: Entering directory `/home/dez/swish-build-2.4.7/libxml2-2.9.1'
/bin/bash ./libtool --tag=CC --mode=link i586-mingw32msvc-gcc
-I/home/dez/swish-build-2.4.7/libxml2-2.9.1/../zlib-1.2.8/include
-I/home/dez/swish-build-2.4.7/libxml2-2.9.1/../install/include -pedantic -W
-Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs
-Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow
-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wredundant-decls -Wno-long-long
-L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../install/lib -o runxmlconf.exe
runxmlconf.o ./libxml2.la
-L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../zlib-1.2.8/lib -lz
-L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../libiconv-1.14/lib -liconv
-lws2_32
libtool: link: i586-mingw32msvc-gcc
-I/home/dez/swish-build-2.4.7/libxml2-2.9.1/../zlib-1.2.8/include
-I/home/dez/swish-build-2.4.7/libxml2-2.9.1/../install/include -pedantic -W
-Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs
-Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow
-Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline
-Wredundant-decls -Wno-long-long -o .libs/runxmlconf.exe runxmlconf.o
-L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../install/lib
./.libs/libxml2.dll.a
-L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../zlib-1.2.8/lib
-L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../libiconv-1.14/lib
-L/home/dez/swish-build-2.4.7/libiconv-1.14/../install/lib -lz
/home/dez/swish-build-2.4.7/libiconv-1.14/../install/lib/libiconv.dll.a
-lws2_32 -L/home/dez/swish-build-2.4.7/libxml2-2.9.1/../install/lib
-L/home/dez/swish-build-2.4.7/libiconv-1.14/../install/lib
runxmlconf.o:runxmlconf.c:(.text+0x50d): undefined reference to
`__imp__xmlLastError'
runxmlconf.o:runxmlconf.c:(.text+0x519): undefined reference to
`__imp__xmlLastError'
collect2: ld returned 1 exit status
make[2]: *** [runxmlconf.exe] Error 1
make[2]: Leaving directory `/home/dez/swish-build-2.4.7/libxml2-2.9.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dez/swish-build-2.4.7/libxml2-2.9.1'
make: *** [all] Error 2
--
Dez.
**********************************************************************
Confidentiality Notice
The information contained in this e-mail is confidential and intended for use
only by the person(s) or organization listed in the address. If you have
received this communication in error, please contact the sender at O'Neil &
Associates, Inc., immediately. Any copying, dissemination, or distribution of
this communication, other than by the intended recipient, is strictly
prohibited.
**********************************************************************
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml