【背景】
折腾:
【记录】Cygwin下用arm-xscale-linux-gnueabi交叉编译log4c
中的:
需要用到expat,所以,先去交叉编译expat。
【折腾过程】
1.去:
http://sourceforge.net/projects/expat/files/expat/2.1.0/
下载最新的:
得到550KB的expat-2.1.0.tar.gz
2.解压
CLi@PC-CLI-1 ~/develop/expat $ tar xvzf expat-2.1.0.tar.gz expat-2.1.0/ expat-2.1.0/COPYING expat-2.1.0/CMakeLists.txt expat-2.1.0/expat.dsw expat-2.1.0/conftools/ expat-2.1.0/conftools/PrintPath expat-2.1.0/conftools/mkinstalldirs expat-2.1.0/conftools/expat.m4 expat-2.1.0/conftools/config.sub expat-2.1.0/conftools/install-sh expat-2.1.0/conftools/ltmain.sh expat-2.1.0/conftools/ac_c_bigendian_cross.m4 expat-2.1.0/conftools/config.guess expat-2.1.0/conftools/get-version.sh expat-2.1.0/README expat-2.1.0/examples/ expat-2.1.0/examples/outline.c expat-2.1.0/examples/elements.c expat-2.1.0/examples/elements.dsp expat-2.1.0/examples/outline.dsp expat-2.1.0/bcb5/ expat-2.1.0/bcb5/expat_static.mak expat-2.1.0/bcb5/outline.mak expat-2.1.0/bcb5/xmlwf.bpf expat-2.1.0/bcb5/all_projects.bpg expat-2.1.0/bcb5/expatw.mak expat-2.1.0/bcb5/expat.mak expat-2.1.0/bcb5/xmlwf.bpr expat-2.1.0/bcb5/libexpatw_mtd.def expat-2.1.0/bcb5/expatw.bpf expat-2.1.0/bcb5/makefile.mak expat-2.1.0/bcb5/outline.bpr expat-2.1.0/bcb5/expatw.bpr expat-2.1.0/bcb5/expat.bpf expat-2.1.0/bcb5/setup.bat expat-2.1.0/bcb5/outline.bpf expat-2.1.0/bcb5/elements.bpr expat-2.1.0/bcb5/elements.mak expat-2.1.0/bcb5/elements.bpf expat-2.1.0/bcb5/README.txt expat-2.1.0/bcb5/expat_static.bpf expat-2.1.0/bcb5/expatw_static.mak expat-2.1.0/bcb5/expatw_static.bpf expat-2.1.0/bcb5/libexpat_mtd.def expat-2.1.0/bcb5/expat_static.bpr expat-2.1.0/bcb5/expatw_static.bpr expat-2.1.0/bcb5/expat.bpr expat-2.1.0/bcb5/xmlwf.mak expat-2.1.0/m4/ expat-2.1.0/m4/ltoptions.m4 expat-2.1.0/m4/lt~obsolete.m4 expat-2.1.0/m4/libtool.m4 expat-2.1.0/m4/ltsugar.m4 expat-2.1.0/m4/ltversion.m4 expat-2.1.0/ConfigureChecks.cmake expat-2.1.0/Changes expat-2.1.0/amiga/ expat-2.1.0/amiga/expat_68k_handler_stubs.c expat-2.1.0/amiga/expat_base.h expat-2.1.0/amiga/include/ expat-2.1.0/amiga/include/libraries/ expat-2.1.0/amiga/include/libraries/expat.h expat-2.1.0/amiga/include/interfaces/ expat-2.1.0/amiga/include/interfaces/expat.h expat-2.1.0/amiga/include/proto/ expat-2.1.0/amiga/include/proto/expat.h expat-2.1.0/amiga/include/inline4/ expat-2.1.0/amiga/include/inline4/expat.h expat-2.1.0/amiga/expat_68k.c expat-2.1.0/amiga/expat_vectors.c expat-2.1.0/amiga/expat_68k.h expat-2.1.0/amiga/Makefile expat-2.1.0/amiga/README.txt expat-2.1.0/amiga/launch.c expat-2.1.0/amiga/expat.xml expat-2.1.0/amiga/expat_lib.c expat-2.1.0/configure expat-2.1.0/doc/ expat-2.1.0/doc/reference.html expat-2.1.0/doc/valid-xhtml10.png expat-2.1.0/doc/expat.png expat-2.1.0/doc/style.css expat-2.1.0/doc/xmlwf.1 expat-2.1.0/doc/xmlwf.sgml expat-2.1.0/expat.pc.in expat-2.1.0/win32/ expat-2.1.0/win32/MANIFEST.txt expat-2.1.0/win32/README.txt expat-2.1.0/win32/expat.iss expat-2.1.0/tests/ expat-2.1.0/tests/runtests.c expat-2.1.0/tests/chardata.c expat-2.1.0/tests/xmltest.sh expat-2.1.0/tests/minicheck.h expat-2.1.0/tests/runtestspp.cpp expat-2.1.0/tests/README.txt expat-2.1.0/tests/benchmark/ expat-2.1.0/tests/benchmark/benchmark.dsw expat-2.1.0/tests/benchmark/benchmark.dsp expat-2.1.0/tests/benchmark/README.txt expat-2.1.0/tests/benchmark/benchmark.c expat-2.1.0/tests/chardata.h expat-2.1.0/tests/minicheck.c expat-2.1.0/expat_config.h.cmake expat-2.1.0/CMake.README expat-2.1.0/MANIFEST expat-2.1.0/expat_config.h.in expat-2.1.0/vms/ expat-2.1.0/vms/descrip.mms expat-2.1.0/vms/expat_config.h expat-2.1.0/vms/README.vms expat-2.1.0/Makefile.in expat-2.1.0/xmlwf/ expat-2.1.0/xmlwf/xmlfile.h expat-2.1.0/xmlwf/xmlurl.h expat-2.1.0/xmlwf/readfilemap.c expat-2.1.0/xmlwf/win32filemap.c expat-2.1.0/xmlwf/unixfilemap.c expat-2.1.0/xmlwf/xmlmime.h expat-2.1.0/xmlwf/ct.c expat-2.1.0/xmlwf/xmlwf.dsp expat-2.1.0/xmlwf/filemap.h expat-2.1.0/xmlwf/codepage.c expat-2.1.0/xmlwf/xmlfile.c expat-2.1.0/xmlwf/xmlmime.c expat-2.1.0/xmlwf/xmlwf.c expat-2.1.0/xmlwf/xmlwin32url.cxx expat-2.1.0/xmlwf/xmltchar.h expat-2.1.0/xmlwf/codepage.h expat-2.1.0/configure.in expat-2.1.0/lib/ expat-2.1.0/lib/xmltok_ns.c expat-2.1.0/lib/amigaconfig.h expat-2.1.0/lib/xmltok.h expat-2.1.0/lib/expat_external.h expat-2.1.0/lib/iasciitab.h expat-2.1.0/lib/Makefile.MPW expat-2.1.0/lib/libexpat.def expat-2.1.0/lib/winconfig.h expat-2.1.0/lib/nametab.h expat-2.1.0/lib/internal.h expat-2.1.0/lib/xmlrole.c expat-2.1.0/lib/expatw.dsp expat-2.1.0/lib/asciitab.h expat-2.1.0/lib/utf8tab.h expat-2.1.0/lib/libexpatw.def expat-2.1.0/lib/xmlparse.c expat-2.1.0/lib/xmltok.c expat-2.1.0/lib/ascii.h expat-2.1.0/lib/xmltok_impl.h expat-2.1.0/lib/latin1tab.h expat-2.1.0/lib/expatw_static.dsp expat-2.1.0/lib/macconfig.h expat-2.1.0/lib/expat.dsp expat-2.1.0/lib/xmlrole.h expat-2.1.0/lib/xmltok_impl.c expat-2.1.0/lib/expat_static.dsp expat-2.1.0/lib/expat.h expat-2.1.0/aclocal.m4 CLi@PC-CLI-1 ~/develop/expat $
3.去看看配置:
CLi@PC-CLI-1 ~/develop/expat $ cd expat-2.1.0/ CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $ ./configure --help `configure' configures expat 2.1.0 to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print `checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr/local] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/expat] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <[email protected]>. CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $
4.然后直接去用如下配置:
./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscaleexpat --build=i686-pc-cygwin --target=arm-xscale-linux --host=arm-xscale-linux CC=arm-xscale-linux-gnueabi-gcc
(待会如果不行,则再去试试:
./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscaleexpat --build=i686-pc-cygwin --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi CC=arm-xscale-linux-gnueabi-gcc
)
过程如下:
CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $ ./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscaleexpat --build=i686-pc-cygwin --target=arm-xscale-linux --host=arm-xscale-linux CC=arm-xscale-linux-gnueabi-gcc checking build system type... i686-pc-cygwin checking host system type... arm-xscale-linux-gnu checking how to print strings... printf checking for arm-xscale-linux-gcc... arm-xscale-linux-gnueabi-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether arm-xscale-linux-gnueabi-gcc accepts -g... yes checking for arm-xscale-linux-gnueabi-gcc option to accept ISO C89... none needed checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by arm-xscale-linux-gnueabi-gcc... /home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe checking if the linker (/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... no checking for arm-xscale-linux-dumpbin... no checking for arm-xscale-linux-link... no checking for dumpbin... no checking for link... link -dump configure: WARNING: using cross tools not prefixed with host triplet checking the name lister (nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 8192 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert i686-pc-cygwin file names to arm-xscale-linux-gnu format... func_convert_file_noop checking how to convert i686-pc-cygwin file names to toolchain format... func_convert_file_noop checking for /home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe option to reload object files... -r checking for arm-xscale-linux-objdump... objdump checking how to recognize dependent libraries... pass_all checking for arm-xscale-linux-dlltool... dlltool checking how to associate runtime and link libraries... printf %s\n checking for arm-xscale-linux-ar... no checking for ar... ar checking for archiver @FILE support... @ checking for arm-xscale-linux-strip... no checking for strip... strip checking for arm-xscale-linux-ranlib... no checking for ranlib... ranlib checking for gawk... gawk checking command to parse nm output from arm-xscale-linux-gnueabi-gcc object... ok checking for sysroot... no checking for arm-xscale-linux-mt... no checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... arm-xscale-linux-gnueabi-gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if arm-xscale-linux-gnueabi-gcc supports -fno-rtti -fno-exceptions... no checking for arm-xscale-linux-gnueabi-gcc option to produce PIC... -fPIC -DPIC checking if arm-xscale-linux-gnueabi-gcc PIC flag -fPIC -DPIC works... yes checking if arm-xscale-linux-gnueabi-gcc static flag -static works... yes checking if arm-xscale-linux-gnueabi-gcc supports -c -o file.o... yes checking if arm-xscale-linux-gnueabi-gcc supports -c -o file.o... (cached) yes checking whether the arm-xscale-linux-gnueabi-gcc linker (/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for arm-xscale-linux-gcc... (cached) arm-xscale-linux-gnueabi-gcc checking whether we are using the GNU C compiler... (cached) yes checking whether arm-xscale-linux-gnueabi-gcc accepts -g... (cached) yes checking for arm-xscale-linux-gnueabi-gcc option to accept ISO C89... (cached) none needed checking for arm-xscale-linux-g++... no checking for arm-xscale-linux-c++... no checking for arm-xscale-linux-gpp... no checking for arm-xscale-linux-aCC... no checking for arm-xscale-linux-CC... no checking for arm-xscale-linux-cxx... no checking for arm-xscale-linux-cc++... no checking for arm-xscale-linux-cl.exe... no checking for arm-xscale-linux-FCC... no checking for arm-xscale-linux-KCC... no checking for arm-xscale-linux-RCC... no checking for arm-xscale-linux-xlC_r... no checking for arm-xscale-linux-xlC... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe checking if the linker (/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe) is GNU ld... yes checking whether the g++ linker (/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... no checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/arm-xscale-linux-gnueabi/bin/ld.exe) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for a BSD-compatible install... /usr/bin/install -c checking whether arm-xscale-linux-gnueabi-gcc accepts -fexceptions... yes checking for ANSI C header files... (cached) yes checking whether byte ordering is bigendian... no checking for an ANSI C-conforming const... yes checking for size_t... yes checking for memmove... yes checking for bcopy... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for unistd.h... (cached) yes checking for off_t... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... yes checking for getpagesize... yes checking for working mmap... no checking for arm-xscale-linux-gnueabi-gcc option to accept ISO C99... -std=gnu99 checking for arm-xscale-linux-gnueabi-gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99 checking for an ANSI C99-conforming __func__... yes configure: creating ./config.status config.status: creating Makefile config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting config.status: creating expat.pc config.status: creating expat_config.h config.status: executing libtool commands CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $
5.再去make编译:
CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $ make /bin/sh ./libtool --silent --mode=compile arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlparse.lo -c lib/xmlparse.c /bin/sh ./libtool --silent --mode=compile arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmltok.lo -c lib/xmltok.c /bin/sh ./libtool --silent --mode=compile arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlrole.lo -c lib/xmlrole.c /bin/sh ./libtool --silent --mode=link arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -no-undefined -version-info 7:0:6 -rpath /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib -o libexpat.la lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/xmlwf.o -c xmlwf/xmlwf.c arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/xmlfile.o -c xmlwf/xmlfile.c arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/codepage.o -c xmlwf/codepage.c arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/readfilemap.o -c xmlwf/readfilemap.c xmlwf/readfilemap.c: In function 'filemap': xmlwf/readfilemap.c:61:5: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration] xmlwf/readfilemap.c:83:3: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration] /bin/sh ./libtool --silent --mode=link arm-xscale-linux-gnueabi-gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/xmlwf xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/readfilemap.o libexpat.la CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $
6.再去make install安装:
CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $ make install /bin/sh ./conftools/mkinstalldirs /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/include /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/pkgconfig mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/include mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/pkgconfig /bin/sh ./libtool --mode=install /usr/bin/install -c libexpat.la /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/libexpat.la libtool: install: /usr/bin/install -c .libs/libexpat.so.1.6.0 /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/libexpat.so.1.6.0 libtool: install: (cd /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib && { ln -s -f libexpat.so.1.6.0 libexpat.so.1 || { rm -f libexpat.so.1 && ln -s libexpat.so.1.6.0 libexpat.so.1; }; }) libtool: install: (cd /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib && { ln -s -f libexpat.so.1.6.0 libexpat.so || { rm -f libexpat.so && ln -s libexpat.so.1.6.0 libexpat.so; }; }) libtool: install: /usr/bin/install -c .libs/libexpat.lai /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/libexpat.la libtool: install: /usr/bin/install -c .libs/libexpat.a /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/libexpat.a libtool: install: chmod 644 /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/libexpat.a libtool: install: ranlib /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/libexpat.a libtool: finish: PATH="/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/bin:/opt/crosstool-ng/bin:/home/CLi/develop/crosstool-ng/x-tools/armxscalecurl/bin:/usr/local/bin:/usr/bin:/cygdrive/d/tmp/dev_install_root/Python27_x64:/cygdrive/d/tmp/dev_install_root/Python27_x64/Lib/site-packages/PyQt4:/cygdrive/d/tmp/dev_install_root/Perl64/site/bin:/cygdrive/d/tmp/dev_install_root/Perl64/bin:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/tmp/WordPress/mysql/mysql-5.5.18/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/MySQL/MySQL Server 5.5/bin:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64:/cygdrive/d/tmp/WordPress/DevRoot/php-5.3.6-Win32-VC9-x64/ext:/cygdrive/d/tmp/WordPress/DevRoot/Python27:/cygdrive/c/Program Files (x86)/Common Files/Acronis/SnapAPI:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_11/bin:/home/CLi/develop/docbook/tools/fop/lib:/home/CLi/develop/docbook/tools/fop:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.1.2/TOK/BIN:/cygdrive/d/DevInstallRoot/FF/DD_IDE_1.2.0/TOK/BIN:/cygdrive/d/DevRoot/EmbeddedDevelop/trunk/Research/CLI/FF/FBK/develop/tools/develop-tools:/cygdrive/d/tmp/WordPress/DevRoot/Python27/Scripts:/cygdrive/d/tmp/dev_install_root/PostgreSQL/8.3/bin:/cygdrive/d/tmp/dev_install_root/ant/apache-ant-1.8.4/bin:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files/TortoiseSVN/bin:/cygdrive/d/DevRoot/IndustrialMobileAutomation/HandheldDataSetter/ANTLR/batchFile:/cygdrive/c/Program Files (x86)/QuickTime/QTSystem:/cygdrive/d/tmp/tmp_dev_root/android/adt-bundle-windows/sdk/platform-tools:/cygdrive/d/tmp/dev_install_root/Tesseract-OCR:/cygdrive/d/tmp/dev_install_root/jython2.5.3/bin:/cygdrive/d/devinstallroot/gnuarm/bin:/cygdrive/d/tmp/dev_install_root/HTML Help Workshop:/cygdrive/c/Users/CLi/AppData/Roaming/npm:/usr/lib/lapack:/sbin" ldconfig -n /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib /home/CLi/develop/expat/expat-2.1.0/libtool: line 1104: ldconfig: command not found ---------------------------------------------------------------------- Libraries have been installed in: /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator run these commands: See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- for FN in ./lib/expat.h ./lib/expat_external.h ; do /usr/bin/install -c -m 644 $FN /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/include ; done /usr/bin/install -c -m 644 expat.pc /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/lib/pkgconfig/expat.pc /bin/sh ./conftools/mkinstalldirs /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/bin /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/share/man/man1 mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/bin mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/share mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/share/man mkdir /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/share/man/man1 /bin/sh ./libtool --mode=install /usr/bin/install -c xmlwf/xmlwf /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/bin/xmlwf libtool: install: /usr/bin/install -c xmlwf/.libs/xmlwf /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/bin/xmlwf /usr/bin/install -c -m 644 ./doc/xmlwf.1 /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/share/man/man1 CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $
【总结】
expat的交叉编译,相对很简单:
配置:
./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscaleexpat --build=i686-pc-cygwin --target=arm-xscale-linux --host=arm-xscale-linux CC=arm-xscale-linux-gnueabi-gcc
注:换用:
./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscaleexpat --build=i686-pc-cygwin --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi CC=arm-xscale-linux-gnueabi-gcc
应该更好。
编译:
make
安装:
make install
注:
expat安装后,是叫xmlwf:
CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $ file ~/develop/crosstool-ng/x-tools/armxscaleexpat/bin/xmlwf /home/CLi/develop/crosstool-ng/x-tools/armxscaleexpat/bin/xmlwf: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.19, not stripped CLi@PC-CLI-1 ~/develop/expat/expat-2.1.0 $ ls ~/develop/crosstool-ng/x-tools/armxscaleexpat/bin/ -lah total 52K drwxr-xr-x+ 1 CLi Domänen-Benutzer 0 Aug 5 16:52 . drwxr-xr-x+ 1 Administrators Domänen-Benutzer 0 Aug 5 16:52 .. -rwxr-xr-x 1 CLi Domänen-Benutzer 52K Aug 5 16:52 xmlwf