【背景】
类似于:
【记录】Cygwin下用arm-xscale-linux-gnueabi-gcc交叉编译curl(libcurl)
【记录】Cygwin下用arm-xscale-linux-gnueabi交叉编译xmlrpc
【记录】Cygwin下用arm-xscale-linux-gnueabi交叉编译libxml2
此处也是,在Cygwin下,用arm-xscale-linux-gnueabi交叉编译,log4c
其中,之前有的是:
LOG4CBINDIR = xxx/armxscalelog4c/bin |
此处已有log4c-1.2.1的源码。
【折腾过程】
1.先去看看有哪些配置参数:
CLi@PC-CLI-1 ~/develop/log4c/log4c-1.2.1 $ ./configure --help `configure' configures this package 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/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names 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-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --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) --enable-debug LOG4C: turn on debugging (default=no) --enable-reread LOG4C: turn on re-read of log4crc file(default=no)i --enable-test LOG4C: compile test programs (default=no) --enable-doc LOG4C: create documentation with doxygen--html/man/pdf (default=no) --enable-constructors LOG4C: build with initialization constructors default=no --disable-expattest LOG4C: Do not try to compile and run a test EXPAT program. (default is no). If without-expat is set to yes this option has no effect. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --without-expat LOG4C: build without expat (default=no). Set this option to yes if you do not want Log4C to use expat for parsing the configuration file. If without-expat is set to yes then none of the other options related to expat have any effect and Log4C uses some bundled yacc/lex code for parsing it's configuration file. --with-expat-prefix=PFX LOG4C: Prefix where EXPAT is installed (defaults to just looking in the standard library locations). If --without-expat is set to yes then this option has no effect) Some influential environment variables: YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. 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 C/C++/Objective 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 F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. CLi@PC-CLI-1 ~/develop/log4c/log4c-1.2.1 $
2.先不管了, 直接去配置:
CLi@PC-CLI-1 ~/develop/log4c/log4c-1.2.1 $ ./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscalelog4c --build=i686-pc-cygwin --target=arm-xscale-linux --host=arm-xscale-linux CC=arm-xscale-linux-gnueabi-gcc checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for arm-xscale-linux-strip... no checking for strip... strip configure: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to [email protected]. checking build system type... i686-pc-cygwin checking host system type... arm-xscale-linux-gnu checking for bison... bison -y checking for arm-xscale-linux-gcc... arm-xscale-linux-gnueabi-gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... yes checking for suffix of executables... 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 style of include used by make... GNU checking dependency style of arm-xscale-linux-gnueabi-gcc... gcc3 checking how to run the C preprocessor... arm-xscale-linux-gnueabi-gcc -E checking for flex... flex checking lex output file root... lex.yy checking lex library... none needed checking whether yytext is a pointer... no checking for gawk... (cached) gawk checking for a BSD-compatible install... /usr/bin/install -c checking whether ln -s works... yes checking whether make sets $(MAKE)... (cached) yes checking for arm-xscale-linux-ranlib... no checking for ranlib... ranlib 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 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 /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 BSD-compatible nm... nm checking how to recognise dependent libraries... pass_all 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 dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes 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 dependency style of g++... gcc3 checking how to run the C++ preprocessor... g++ -E checking for arm-xscale-linux-g77... no checking for arm-xscale-linux-xlf... no checking for arm-xscale-linux-f77... no checking for arm-xscale-linux-frt... no checking for arm-xscale-linux-pgf77... no checking for arm-xscale-linux-cf77... no checking for arm-xscale-linux-fort77... no checking for arm-xscale-linux-fl32... no checking for arm-xscale-linux-af77... no checking for arm-xscale-linux-xlf90... no checking for arm-xscale-linux-f90... no checking for arm-xscale-linux-pgf90... no checking for arm-xscale-linux-pghpf... no checking for arm-xscale-linux-epcf90... no checking for arm-xscale-linux-gfortran... no checking for arm-xscale-linux-g95... no checking for arm-xscale-linux-xlf95... no checking for arm-xscale-linux-f95... no checking for arm-xscale-linux-fort... no checking for arm-xscale-linux-ifort... no checking for arm-xscale-linux-ifc... no checking for arm-xscale-linux-efc... no checking for arm-xscale-linux-pgf95... no checking for arm-xscale-linux-lf95... no checking for arm-xscale-linux-ftn... no checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes checking the maximum length of command line arguments... 8192 checking command to parse nm output from arm-xscale-linux-gnueabi-gcc object... ok checking for objdir... .libs checking for arm-xscale-linux-ar... no checking for ar... ar checking for arm-xscale-linux-ranlib... ranlib checking for arm-xscale-linux-strip... strip checking for correct ltmain.sh version... yes 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 checking if arm-xscale-linux-gnueabi-gcc PIC flag -fPIC 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 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 configure: creating libtool appending configuration tag "CXX" to libtool 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 checking if g++ PIC flag -fPIC works... no checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... 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... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for g77 option to produce PIC... -fPIC checking if g77 PIC flag -fPIC works... no checking if g77 static flag -static works... yes checking if g77 supports -c -o file.o... yes checking whether the g77 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... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_mutex_init in -lpthread... yes configure: Compile with rollingfile code checking for ANSI C header files... (cached) yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking for inttypes.h... (cached) yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking syslog.h usability... yes checking syslog.h presence... yes checking for syslog.h... yes checking for unistd.h... (cached) yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking varargs.h usability... no checking varargs.h presence... no checking for varargs.h... no checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for pthread.h... (cached) yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for size_t... yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h... time.h checking for working alloca.h... yes checking for alloca... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... no checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for getpagesize... yes checking for working mmap... no checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... no checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes checking whether utime accepts a null argument... no checking for vprintf... yes checking for _doprnt... no checking for gettimeofday... yes checking for memset... yes checking for munmap... yes checking for nl_langinfo... yes checking for strdup... yes checking for strerror... yes checking for strncasecmp... yes checking for strrchr... yes checking for strstr... yes checking for utime... yes checking for sbrk... yes checking for doxygen... /usr/bin/doxygen checking for dot... no checking for latex... /usr/bin/latex checking for EXPAT - version >= 1.95.1... cross compiling; assumed OK... yes configure: creating ./config.status config.status: creating Makefile config.status: creating log4c-config config.status: creating log4crc.sample config.status: creating log4c.spec config.status: creating config/Makefile config.status: creating doc/Makefile config.status: creating doc/Doxyfile config.status: creating doc/main.doc config.status: creating src/Makefile config.status: creating src/log4c/Makefile config.status: creating src/log4c/version.h config.status: creating src/sd/Makefile config.status: creating tests/Makefile config.status: creating tests/log4c/Makefile config.status: creating examples/Makefile config.status: creating examples/log4crc config.status: creating examples/helloworld/Makefile config.status: creating examples/helloworld1/Makefile config.status: creating src/config.h config.status: executing depfiles commands config.status: executing default commands CLi@PC-CLI-1 ~/develop/log4c/log4c-1.2.1 $
3.参考了:
和
以及自带的
log4c-1.2.1\README
中的:
perl 5.8+ (used by the automake tools) GNU make tools: automake 1.7+, autoconf 2.57+, m4 1.4+ and libtool 1.4+ A Compiler, among those tested are: . gcc4 (on HP-UX 11.11i, on Fedora Core 5) . Sun cc (versions 5.3 and 5.7 on Solaris 8 and higher, sparc and i386) . HPUX ansi C compiler (on HPUX v11.11i, pa-risc) . AIX xlc compiler If you request at compile time that the expat library be used to help parse on the system. If you do not use expat then pre-generated files from obsolete versions of flex and bison are used to do the parsing–this code is still supported for the moment but it is recommended to use expat. For information on compiling on Microsoft Windows see the README in the msvc6 * Where to find … GNU automake tools: http://www.sunfreeware.com/ for pre-built Solaris packages http://hpux.connect.org.uk/ for re-built HP-UX depots gcc3 or gcc4 http://www.sunfreeware.com for pre-built Solaris packages http://hpux.connect.org.uk/ for re-built HP-UX depots Log4C |
所以,估计待会会出错,会找不到expat。
但也是等到错了再说。
4.去编译试试,结果出错:
5.接着又出错了:
6.然后又出现:
7.然后又出现,预料中的:
8.然后make完毕,再去安装:
CLi@PC-CLI-1 ~/develop/log4c/log4c-1.2.1 $ make install make install-recursive make[1]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1' Making install in config make[2]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/config' make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/config' make[3]: Nothing to be done for `install-exec-am'. make[3]: Nothing to be done for `install-data-am'. make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/config' make[2]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/config' Making install in src make[2]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src' Making install in sd make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src/sd' make[4]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src/sd' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src/sd' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src/sd' Making install in log4c make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src/log4c' make[4]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src/log4c' test -z "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib" || /usr/bin/mkdir -p "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib" /bin/sh ../../libtool --mode=install /usr/bin/install -c 'liblog4c.la' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib/liblog4c.la' /usr/bin/install -c .libs/liblog4c.so.3.1.0 /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib/liblog4c.so.3.1.0 (cd /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib && { ln -s -f liblog4c.so.3.1.0 liblog4c.so.3 || { rm -f liblog4c.so.3 && ln -s liblog4c.so.3.1.0 liblog4c.so.3; }; }) (cd /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib && { ln -s -f liblog4c.so.3.1.0 liblog4c.so || { rm -f liblog4c.so && ln -s liblog4c.so.3.1.0 liblog4c.so; }; }) /usr/bin/install -c .libs/liblog4c.lai /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib/liblog4c.la /usr/bin/install -c .libs/liblog4c.a /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib/liblog4c.a chmod 644 /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib/liblog4c.a arm-xscale-linux-gnueabi-ranlib /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib/liblog4c.a PATH="$PATH:/sbin" ldconfig -n /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib ../../libtool: line 6700: ldconfig: command not found ---------------------------------------------------------------------- Libraries have been installed in: /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/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: PATH="$PATH:/sbin" ldconfig -n /home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/lib See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- test -z "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c" || /usr/bin/mkdir -p "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c" /usr/bin/install -c -m 644 'config-win32.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/config-win32.h' /usr/bin/install -c -m 644 'buffer.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/buffer.h' /usr/bin/install -c -m 644 'rc.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/rc.h' /usr/bin/install -c -m 644 'init.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/init.h' /usr/bin/install -c -m 644 'defs.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/defs.h' /usr/bin/install -c -m 644 'version.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/version.h' /usr/bin/install -c -m 644 'location_info.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/location_info.h' /usr/bin/install -c -m 644 'logging_event.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/logging_event.h' /usr/bin/install -c -m 644 'priority.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/priority.h' /usr/bin/install -c -m 644 'layout_type_basic.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/layout_type_basic.h' /usr/bin/install -c -m 644 'layout_type_dated.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/layout_type_dated.h' /usr/bin/install -c -m 644 'layout_type_basic_r.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/layout_type_basic_r.h' /usr/bin/install -c -m 644 'layout_type_dated_r.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/layout_type_dated_r.h' /usr/bin/install -c -m 644 'layout.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/layout.h' /usr/bin/install -c -m 644 'appender_type_stream.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/appender_type_stream.h' /usr/bin/install -c -m 644 'appender_type_stream2.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/appender_type_stream2.h' /usr/bin/install -c -m 644 'appender_type_syslog.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/appender_type_syslog.h' /usr/bin/install -c -m 644 'appender_type_mmap.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/appender_type_mmap.h' /usr/bin/install -c -m 644 'appender.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/appender.h' /usr/bin/install -c -m 644 'category.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/category.h' /usr/bin/install -c -m 644 'appender_type_rollingfile.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/appender_type_rollingfile.h' /usr/bin/install -c -m 644 'rollingpolicy.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/rollingpolicy.h' /usr/bin/install -c -m 644 'rollingpolicy_type_sizewin.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c/rollingpolicy_type_sizewin.h' make[4]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src/log4c' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src/log4c' make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src' make[4]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/src' make[4]: Nothing to be done for `install-exec-am'. test -z "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include" || /usr/bin/mkdir -p "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include" /usr/bin/install -c -m 644 'log4c.h' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/include/log4c.h' make[4]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src' make[2]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/src' Making install in examples make[2]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples' Making install in helloworld make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld' make[4]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld' Making install in helloworld1 make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld1' make[4]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld1' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld1' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples/helloworld1' make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples' make[4]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1/examples' make[4]: Nothing to be done for `install-exec-am'. make[4]: Nothing to be done for `install-data-am'. make[4]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples' make[2]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1/examples' make[2]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1' make[3]: Entering directory `/home/CLi/develop/log4c/log4c-1.2.1' test -z "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/bin" || /usr/bin/mkdir -p "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/bin" /usr/bin/install -c 'log4c-config' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/bin/log4c-config' test -z "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/etc" || /usr/bin/mkdir -p "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/etc" /usr/bin/install -c -m 644 'log4crc.sample' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/etc/log4crc.sample' test -z "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/share/aclocal" || /usr/bin/mkdir -p "/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/share/aclocal" /usr/bin/install -c -m 644 'log4c.m4' '/home/CLi/develop/crosstool-ng/x-tools/armxscalelog4c/share/aclocal/log4c.m4' make[3]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1' make[2]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1' make[1]: Leaving directory `/home/CLi/develop/log4c/log4c-1.2.1' CLi@PC-CLI-1 ~/develop/log4c/log4c-1.2.1 $
【总结】
此处,
0.准备工作:
(1)确保用最新的源码
从log4c-1.2.1.tar.gz下载最新代码。
(2)为了解决
把:
log4c-1.2.1\src\config.h.in
中的:
/* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc
改为:
/* Define to rpl_malloc if the replacement function should be used. */ //#undef malloc /* Define to rpl_realloc if the replacement function should be used. */ //#undef realloc
1.最新的配置是:
./configure --prefix=$HOME/develop/crosstool-ng/x-tools/armxscalelog4c --build=i686-pc-cygwin --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi --with-expat-prefix=$HOME/develop/crosstool-ng/x-tools/armxscaleexpat CC=arm-xscale-linux-gnueabi-gcc
其中:
- –with-expat-prefix:指定,自己的expat库,安装的位置
- 我之前通过:
- 【记录】Cygwin下用arm-xscale-linux-gnueabi交叉编译expat
- 编译出来的,位置是:
- $HOME/develop/crosstool-ng/x-tools/armxscaleexpat
- 所以,此处填写的就是这个值
2.然后再编译:
make
3.再安装:
make install