最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译log4c

CrossCompiler crifan 2124浏览 0评论

【背景】

折腾完:

【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译xmlrpc

【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译curl(libcurl)

【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译libxml2

【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译expat

再去交叉编译log4c。

 

【折腾过程】

1.继续参考之前自己的:

【记录】Cygwin下用arm-xscale-linux-gnueabi交叉编译log4c

2.先拿到全新的源码:

crifan@ubuntu:log4c$ cp /mnt/hgfs/crosstool_ng/log4c/
log4c-1.2.1/        log4c-1.2.1.tar.gz  thirdparty/         
crifan@ubuntu:log4c$ cp /mnt/hgfs/crosstool_ng/log4c/log4c-1.2.1.tar.gz .
crifan@ubuntu:log4c$ tar xvf log4c-1.2.1.tar.gz 
log4c-1.2.1/
log4c-1.2.1/config/
log4c-1.2.1/config/expat.m4
log4c-1.2.1/config/Makefile.am
log4c-1.2.1/config/Makefile.in
log4c-1.2.1/config/config.guess
log4c-1.2.1/config/config.sub
log4c-1.2.1/config/depcomp
log4c-1.2.1/config/install-sh
log4c-1.2.1/config/ltmain.sh
log4c-1.2.1/config/missing
log4c-1.2.1/config/ylwrap
log4c-1.2.1/README
log4c-1.2.1/configure.in
log4c-1.2.1/aclocal.m4
log4c-1.2.1/Makefile.am
log4c-1.2.1/Makefile.in
log4c-1.2.1/log4c-config.in
log4c-1.2.1/log4c.spec.in
log4c-1.2.1/log4crc.sample.in
log4c-1.2.1/configure
log4c-1.2.1/AUTHORS
log4c-1.2.1/COPYING
log4c-1.2.1/ChangeLog
log4c-1.2.1/INSTALL
log4c-1.2.1/NEWS
log4c-1.2.1/TODO
log4c-1.2.1/log4c.m4
log4c-1.2.1/log4c.spec
log4c-1.2.1/src/
log4c-1.2.1/src/log4c.h
log4c-1.2.1/src/Makefile.am
log4c-1.2.1/src/Makefile.in
log4c-1.2.1/src/config.h.in
log4c-1.2.1/src/sd/
log4c-1.2.1/src/sd/Makefile.am
log4c-1.2.1/src/sd/Makefile.in
log4c-1.2.1/src/sd/domnode-xml-parser.c
log4c-1.2.1/src/sd/domnode-xml-scanner.c
log4c-1.2.1/src/sd/error.h
log4c-1.2.1/src/sd/defs.h
log4c-1.2.1/src/sd/stack.h
log4c-1.2.1/src/sd/stack.c
log4c-1.2.1/src/sd/list.h
log4c-1.2.1/src/sd/list.c
log4c-1.2.1/src/sd/malloc.h
log4c-1.2.1/src/sd/malloc.c
log4c-1.2.1/src/sd/domnode.h
log4c-1.2.1/src/sd/factory.h
log4c-1.2.1/src/sd/factory.c
log4c-1.2.1/src/sd/hash.h
log4c-1.2.1/src/sd/hash.c
log4c-1.2.1/src/sd/sprintf.h
log4c-1.2.1/src/sd/sprintf.c
log4c-1.2.1/src/sd/test.h
log4c-1.2.1/src/sd/test.c
log4c-1.2.1/src/sd/sd_xplatform.h
log4c-1.2.1/src/sd/sd_xplatform.c
log4c-1.2.1/src/sd/error.c
log4c-1.2.1/src/sd/domnode-expat.c
log4c-1.2.1/src/sd/domnode.c
log4c-1.2.1/src/sd/domnode-xml.h
log4c-1.2.1/src/sd/domnode-xml.c
log4c-1.2.1/src/sd/domnode-xml-parser.h
log4c-1.2.1/src/sd/domnode-xml-scanner.h
log4c-1.2.1/src/sd/domnode-xml-parser.y
log4c-1.2.1/src/sd/domnode-xml-scanner.l
log4c-1.2.1/src/sd/sprintf.osf.c
log4c-1.2.1/src/log4c/
log4c-1.2.1/src/log4c/config-win32.h
log4c-1.2.1/src/log4c/buffer.h
log4c-1.2.1/src/log4c/rc.h
log4c-1.2.1/src/log4c/init.h
log4c-1.2.1/src/log4c/defs.h
log4c-1.2.1/src/log4c/version.h
log4c-1.2.1/src/log4c/location_info.h
log4c-1.2.1/src/log4c/logging_event.h
log4c-1.2.1/src/log4c/priority.h
log4c-1.2.1/src/log4c/layout_type_basic.h
log4c-1.2.1/src/log4c/layout_type_dated.h
log4c-1.2.1/src/log4c/layout_type_basic_r.h
log4c-1.2.1/src/log4c/layout_type_dated_r.h
log4c-1.2.1/src/log4c/layout.h
log4c-1.2.1/src/log4c/appender_type_stream.h
log4c-1.2.1/src/log4c/appender_type_stream2.h
log4c-1.2.1/src/log4c/appender_type_syslog.h
log4c-1.2.1/src/log4c/appender_type_mmap.h
log4c-1.2.1/src/log4c/appender.h
log4c-1.2.1/src/log4c/category.h
log4c-1.2.1/src/log4c/appender_type_rollingfile.h
log4c-1.2.1/src/log4c/rollingpolicy.h
log4c-1.2.1/src/log4c/rollingpolicy_type_sizewin.h
log4c-1.2.1/src/log4c/Makefile.am
log4c-1.2.1/src/log4c/Makefile.in
log4c-1.2.1/src/log4c/version.h.in
log4c-1.2.1/src/log4c/rc.c
log4c-1.2.1/src/log4c/init.c
log4c-1.2.1/src/log4c/appender_type_stream.c
log4c-1.2.1/src/log4c/appender_type_stream2.c
log4c-1.2.1/src/log4c/appender_type_syslog.c
log4c-1.2.1/src/log4c/appender_type_mmap.c
log4c-1.2.1/src/log4c/layout_type_basic.c
log4c-1.2.1/src/log4c/layout_type_dated.c
log4c-1.2.1/src/log4c/layout_type_basic_r.c
log4c-1.2.1/src/log4c/layout_type_dated_r.c
log4c-1.2.1/src/log4c/version.c
log4c-1.2.1/src/log4c/logging_event.c
log4c-1.2.1/src/log4c/priority.c
log4c-1.2.1/src/log4c/appender.c
log4c-1.2.1/src/log4c/layout.c
log4c-1.2.1/src/log4c/category.c
log4c-1.2.1/src/log4c/appender_type_rollingfile.c
log4c-1.2.1/src/log4c/rollingpolicy.c
log4c-1.2.1/src/log4c/rollingpolicy_type_sizewin.c
log4c-1.2.1/doc/
log4c-1.2.1/doc/Doxyfile.in
log4c-1.2.1/doc/Makefile.am
log4c-1.2.1/doc/Makefile.in
log4c-1.2.1/doc/main.doc.in
log4c-1.2.1/tests/
log4c-1.2.1/tests/Makefile.am
log4c-1.2.1/tests/Makefile.in
log4c-1.2.1/tests/log4c/
log4c-1.2.1/tests/log4c/Makefile.am
log4c-1.2.1/tests/log4c/Makefile.in
log4c-1.2.1/tests/log4c/bench.c
log4c-1.2.1/tests/log4c/bench_fwrite.c
log4c-1.2.1/tests/log4c/cpp_compile_test.cpp
log4c-1.2.1/tests/log4c/test_category.c
log4c-1.2.1/tests/log4c/test_layout_r.c
log4c-1.2.1/tests/log4c/test_rc.c
log4c-1.2.1/tests/log4c/test_rollingfile_appender.c
log4c-1.2.1/tests/log4c/test_rollingfile_appender_mt.c
log4c-1.2.1/tests/log4c/test_stream2.c
log4c-1.2.1/tests/log4c/test_category.ref
log4c-1.2.1/tests/log4c/test_rc.in
log4c-1.2.1/tests/log4c/test_rc.ref
log4c-1.2.1/examples/
log4c-1.2.1/examples/README
log4c-1.2.1/examples/Makefile.am
log4c-1.2.1/examples/Makefile.in
log4c-1.2.1/examples/log4crc.in
log4c-1.2.1/examples/example_formatters.c
log4c-1.2.1/examples/example_appenders.c
log4c-1.2.1/examples/userloc_formatter.c
log4c-1.2.1/examples/application_1.c
log4c-1.2.1/examples/application_2.c
log4c-1.2.1/examples/application_3.c
log4c-1.2.1/examples/application_3.h
log4c-1.2.1/examples/log4crc
log4c-1.2.1/examples/helloworld/
log4c-1.2.1/examples/helloworld/README
log4c-1.2.1/examples/helloworld/Makefile.am
log4c-1.2.1/examples/helloworld/Makefile.in
log4c-1.2.1/examples/helloworld/helloworld.c
log4c-1.2.1/examples/helloworld1/
log4c-1.2.1/examples/helloworld1/README
log4c-1.2.1/examples/helloworld1/Makefile.am
log4c-1.2.1/examples/helloworld1/Makefile.in
log4c-1.2.1/examples/helloworld1/helloworld1.c
log4c-1.2.1/examples/helloworld1/mylog.h
crifan@ubuntu:log4c$ pwd
/home/crifan/develop/crosscompile/log4c
crifan@ubuntu:log4c$ cd log4c-1.2.1/
crifan@ubuntu:log4c-1.2.1$ ls
aclocal.m4  config        COPYING   INSTALL          log4crc.sample.in  Makefile.am  README  TODO
AUTHORS     configure     doc       log4c-config.in  log4c.spec         Makefile.in  src
ChangeLog   configure.in  examples  log4c.m4         log4c.spec.in      NEWS         tests
crifan@ubuntu:log4c-1.2.1$ pwd
/home/crifan/develop/crosscompile/log4c/log4c-1.2.1
crifan@ubuntu:log4c-1.2.1$ ls -lh
total 1.2M
-rw-r--r-- 1 crifan crifan 259K Sep 24  2007 aclocal.m4
-rw-r--r-- 1 crifan crifan   40 Sep 24  2007 AUTHORS
-rw-r--r-- 1 crifan crifan  18K Sep 24  2007 ChangeLog
drwxrwxr-x 2 crifan crifan 4.0K Sep 24  2007 config
-rwxr-xr-x 1 crifan crifan 773K Sep 24  2007 configure
-rw-r--r-- 1 crifan crifan 6.0K Sep 24  2007 configure.in
-rw-r--r-- 1 crifan crifan  26K Sep 24  2007 COPYING
drwxrwxr-x 2 crifan crifan 4.0K Sep 24  2007 doc
drwxrwxr-x 4 crifan crifan 4.0K Sep 24  2007 examples
-rw-r--r-- 1 crifan crifan 7.7K Sep 24  2007 INSTALL
-rw-r--r-- 1 crifan crifan  911 Sep 24  2007 log4c-config.in
-rw-r--r-- 1 crifan crifan 7.8K Sep 24  2007 log4c.m4
-rw-r--r-- 1 crifan crifan  688 Sep 24  2007 log4crc.sample.in
-rw-r--r-- 1 crifan crifan 1.6K Sep 24  2007 log4c.spec
-rw-r--r-- 1 crifan crifan 1.6K Sep 24  2007 log4c.spec.in
-rw-r--r-- 1 crifan crifan  755 Sep 24  2007 Makefile.am
-rw-r--r-- 1 crifan crifan  23K Sep 24  2007 Makefile.in
-rw-r--r-- 1 crifan crifan    0 Sep 24  2007 NEWS
-rw-r--r-- 1 crifan crifan 5.1K Sep 24  2007 README
drwxrwxr-x 4 crifan crifan 4.0K Sep 24  2007 src
drwxrwxr-x 3 crifan crifan 4.0K Sep 24  2007 tests
-rw-r--r-- 1 crifan crifan 2.3K Sep 24  2007 TODO
crifan@ubuntu:log4c-1.2.1$ pwd
/home/crifan/develop/crosscompile/log4c/log4c-1.2.1
crifan@ubuntu:log4c-1.2.1$ 

3.配置之前,参考:

【已解决】Cygwin下用arm-xscale-linux-gnueabi交叉编译log4c出错:domnode-expat.c:51:19: fatal error: expat.h: No such file or directory

【已解决】Cygwin下用arm-xscale-linux-gnueabi交叉编译log4c出错:libtool: line 1326: xxx/bin/arm-xscale-linux-gnueabi-gcc: Bad address

得知需要加上--with-expat-prefix参数。

所以去用如下配置:

crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/
curl  expat  libxml2  xmlrpc  xscale
crifan@ubuntu:log4c-1.2.1$ mkdir /opt/crosscompile/log4c
crifan@ubuntu:log4c-1.2.1$ ./configure --prefix=/opt/crosscompile/log4c --build=i686-pc-linux-gnu --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi CC=arm-xscale-linux-gnueabi-gcc --with-expat-prefix=/opt/crosscompile/expat
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-xscale-linux-gnueabi-strip... arm-xscale-linux-gnueabi-strip
checking build system type... i686-pc-linux-gnu
checking host system type... arm-xscale-linux-gnueabi
checking for bison... bison -y
checking for arm-xscale-linux-gnueabi-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-gnueabi-ranlib... arm-xscale-linux-gnueabi-ranlib
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by arm-xscale-linux-gnueabi-gcc... /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld
checking if the linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) is GNU ld... yes
checking for /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/bin/arm-xscale-linux-gnueabi-nm -B
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-gnueabi-g++... arm-xscale-linux-gnueabi-g++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-xscale-linux-gnueabi-g++ accepts -g... yes
checking dependency style of arm-xscale-linux-gnueabi-g++... gcc3
checking how to run the C++ preprocessor... arm-xscale-linux-gnueabi-g++ -E
checking for arm-xscale-linux-gnueabi-g77... no
checking for arm-xscale-linux-gnueabi-xlf... no
checking for arm-xscale-linux-gnueabi-f77... no
checking for arm-xscale-linux-gnueabi-frt... no
checking for arm-xscale-linux-gnueabi-pgf77... no
checking for arm-xscale-linux-gnueabi-cf77... no
checking for arm-xscale-linux-gnueabi-fort77... no
checking for arm-xscale-linux-gnueabi-fl32... no
checking for arm-xscale-linux-gnueabi-af77... no
checking for arm-xscale-linux-gnueabi-xlf90... no
checking for arm-xscale-linux-gnueabi-f90... no
checking for arm-xscale-linux-gnueabi-pgf90... no
checking for arm-xscale-linux-gnueabi-pghpf... no
checking for arm-xscale-linux-gnueabi-epcf90... no
checking for arm-xscale-linux-gnueabi-gfortran... no
checking for arm-xscale-linux-gnueabi-g95... no
checking for arm-xscale-linux-gnueabi-xlf95... no
checking for arm-xscale-linux-gnueabi-f95... no
checking for arm-xscale-linux-gnueabi-fort... no
checking for arm-xscale-linux-gnueabi-ifort... no
checking for arm-xscale-linux-gnueabi-ifc... no
checking for arm-xscale-linux-gnueabi-efc... no
checking for arm-xscale-linux-gnueabi-pgf95... no
checking for arm-xscale-linux-gnueabi-lf95... no
checking for arm-xscale-linux-gnueabi-ftn... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/bin/arm-xscale-linux-gnueabi-nm -B output from arm-xscale-linux-gnueabi-gcc object... ok
checking for objdir... .libs
checking for arm-xscale-linux-gnueabi-ar... arm-xscale-linux-gnueabi-ar
checking for arm-xscale-linux-gnueabi-ranlib... (cached) arm-xscale-linux-gnueabi-ranlib
checking for arm-xscale-linux-gnueabi-strip... (cached) arm-xscale-linux-gnueabi-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 (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) 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 arm-xscale-linux-gnueabi-g++... /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld
checking if the linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) is GNU ld... yes
checking whether the arm-xscale-linux-gnueabi-g++ linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) supports shared libraries... yes
checking for arm-xscale-linux-gnueabi-g++ option to produce PIC... -fPIC
checking if arm-xscale-linux-gnueabi-g++ PIC flag -fPIC works... yes
checking if arm-xscale-linux-gnueabi-g++ static flag -static works... yes
checking if arm-xscale-linux-gnueabi-g++ supports -c -o file.o... yes
checking whether the arm-xscale-linux-gnueabi-g++ linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) 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 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... no
checking for dot... no
checking for latex... no
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
crifan@ubuntu:log4c-1.2.1$ 

4.然后make编译之前,参考:

【已解决】Cygwin下用arm-xscale-linux-gnueabi交叉编译log4c出错:../../src/log4c/.libs/liblog4c.so: undefined reference to ‘rpl_malloc’

去修改

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

然后还是要重新去配置一下:

crifan@ubuntu:log4c-1.2.1$ gedit src/config.h.in 
crifan@ubuntu:log4c-1.2.1$ ./configure --prefix=/opt/crosscompile/log4c --build=i686-pc-linux-gnu --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi CC=arm-xscale-linux-gnueabi-gcc --with-expat-prefix=/opt/crosscompile/expat
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-xscale-linux-gnueabi-strip... arm-xscale-linux-gnueabi-strip
checking build system type... i686-pc-linux-gnu
checking host system type... arm-xscale-linux-gnueabi
checking for bison... bison -y
checking for arm-xscale-linux-gnueabi-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-gnueabi-ranlib... arm-xscale-linux-gnueabi-ranlib
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by arm-xscale-linux-gnueabi-gcc... /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld
checking if the linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) is GNU ld... yes
checking for /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/bin/arm-xscale-linux-gnueabi-nm -B
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-gnueabi-g++... arm-xscale-linux-gnueabi-g++
checking whether we are using the GNU C++ compiler... yes
checking whether arm-xscale-linux-gnueabi-g++ accepts -g... yes
checking dependency style of arm-xscale-linux-gnueabi-g++... gcc3
checking how to run the C++ preprocessor... arm-xscale-linux-gnueabi-g++ -E
checking for arm-xscale-linux-gnueabi-g77... no
checking for arm-xscale-linux-gnueabi-xlf... no
checking for arm-xscale-linux-gnueabi-f77... no
checking for arm-xscale-linux-gnueabi-frt... no
checking for arm-xscale-linux-gnueabi-pgf77... no
checking for arm-xscale-linux-gnueabi-cf77... no
checking for arm-xscale-linux-gnueabi-fort77... no
checking for arm-xscale-linux-gnueabi-fl32... no
checking for arm-xscale-linux-gnueabi-af77... no
checking for arm-xscale-linux-gnueabi-xlf90... no
checking for arm-xscale-linux-gnueabi-f90... no
checking for arm-xscale-linux-gnueabi-pgf90... no
checking for arm-xscale-linux-gnueabi-pghpf... no
checking for arm-xscale-linux-gnueabi-epcf90... no
checking for arm-xscale-linux-gnueabi-gfortran... no
checking for arm-xscale-linux-gnueabi-g95... no
checking for arm-xscale-linux-gnueabi-xlf95... no
checking for arm-xscale-linux-gnueabi-f95... no
checking for arm-xscale-linux-gnueabi-fort... no
checking for arm-xscale-linux-gnueabi-ifort... no
checking for arm-xscale-linux-gnueabi-ifc... no
checking for arm-xscale-linux-gnueabi-efc... no
checking for arm-xscale-linux-gnueabi-pgf95... no
checking for arm-xscale-linux-gnueabi-lf95... no
checking for arm-xscale-linux-gnueabi-ftn... no
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/bin/arm-xscale-linux-gnueabi-nm -B output from arm-xscale-linux-gnueabi-gcc object... ok
checking for objdir... .libs
checking for arm-xscale-linux-gnueabi-ar... arm-xscale-linux-gnueabi-ar
checking for arm-xscale-linux-gnueabi-ranlib... (cached) arm-xscale-linux-gnueabi-ranlib
checking for arm-xscale-linux-gnueabi-strip... (cached) arm-xscale-linux-gnueabi-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 (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) 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 arm-xscale-linux-gnueabi-g++... /opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld
checking if the linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) is GNU ld... yes
checking whether the arm-xscale-linux-gnueabi-g++ linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) supports shared libraries... yes
checking for arm-xscale-linux-gnueabi-g++ option to produce PIC... -fPIC
checking if arm-xscale-linux-gnueabi-g++ PIC flag -fPIC works... yes
checking if arm-xscale-linux-gnueabi-g++ static flag -static works... yes
checking if arm-xscale-linux-gnueabi-g++ supports -c -o file.o... yes
checking whether the arm-xscale-linux-gnueabi-g++ linker (/opt/crosscompile/xscale/gcc-4.6.0-glibc-2.9/arm-xscale-linux-gnueabi/bin/ld) 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 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... no
checking for dot... no
checking for latex... no
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
crifan@ubuntu:log4c-1.2.1$ 

5.然后再去编译:

crifan@ubuntu:log4c-1.2.1$ make
make  all-recursive
make[1]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
Making all in config
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/config'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/config'
Making all in src
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make  all-recursive
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
Making all in sd
make[4]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/sd'
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT stack.lo -MD -MP -MF .deps/stack.Tpo -c -o stack.lo stack.c
mkdir .libs
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT stack.lo -MD -MP -MF .deps/stack.Tpo -c stack.c  -fPIC -DPIC -o .libs/stack.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT stack.lo -MD -MP -MF .deps/stack.Tpo -c stack.c -o stack.o >/dev/null 2>&1
mv -f .deps/stack.Tpo .deps/stack.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT list.lo -MD -MP -MF .deps/list.Tpo -c -o list.lo list.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT list.lo -MD -MP -MF .deps/list.Tpo -c list.c  -fPIC -DPIC -o .libs/list.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT list.lo -MD -MP -MF .deps/list.Tpo -c list.c -o list.o >/dev/null 2>&1
mv -f .deps/list.Tpo .deps/list.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT malloc.lo -MD -MP -MF .deps/malloc.Tpo -c -o malloc.lo malloc.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT malloc.lo -MD -MP -MF .deps/malloc.Tpo -c malloc.c  -fPIC -DPIC -o .libs/malloc.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT malloc.lo -MD -MP -MF .deps/malloc.Tpo -c malloc.c -o malloc.o >/dev/null 2>&1
mv -f .deps/malloc.Tpo .deps/malloc.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT factory.lo -MD -MP -MF .deps/factory.Tpo -c -o factory.lo factory.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT factory.lo -MD -MP -MF .deps/factory.Tpo -c factory.c  -fPIC -DPIC -o .libs/factory.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT factory.lo -MD -MP -MF .deps/factory.Tpo -c factory.c -o factory.o >/dev/null 2>&1
mv -f .deps/factory.Tpo .deps/factory.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT hash.lo -MD -MP -MF .deps/hash.Tpo -c -o hash.lo hash.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT hash.lo -MD -MP -MF .deps/hash.Tpo -c hash.c  -fPIC -DPIC -o .libs/hash.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT hash.lo -MD -MP -MF .deps/hash.Tpo -c hash.c -o hash.o >/dev/null 2>&1
mv -f .deps/hash.Tpo .deps/hash.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT sprintf.lo -MD -MP -MF .deps/sprintf.Tpo -c -o sprintf.lo sprintf.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT sprintf.lo -MD -MP -MF .deps/sprintf.Tpo -c sprintf.c  -fPIC -DPIC -o .libs/sprintf.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT sprintf.lo -MD -MP -MF .deps/sprintf.Tpo -c sprintf.c -o sprintf.o >/dev/null 2>&1
mv -f .deps/sprintf.Tpo .deps/sprintf.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT test.lo -MD -MP -MF .deps/test.Tpo -c -o test.lo test.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT test.lo -MD -MP -MF .deps/test.Tpo -c test.c  -fPIC -DPIC -o .libs/test.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT test.lo -MD -MP -MF .deps/test.Tpo -c test.c -o test.o >/dev/null 2>&1
mv -f .deps/test.Tpo .deps/test.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT sd_xplatform.lo -MD -MP -MF .deps/sd_xplatform.Tpo -c -o sd_xplatform.lo sd_xplatform.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT sd_xplatform.lo -MD -MP -MF .deps/sd_xplatform.Tpo -c sd_xplatform.c  -fPIC -DPIC -o .libs/sd_xplatform.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT sd_xplatform.lo -MD -MP -MF .deps/sd_xplatform.Tpo -c sd_xplatform.c -o sd_xplatform.o >/dev/null 2>&1
mv -f .deps/sd_xplatform.Tpo .deps/sd_xplatform.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c -o error.lo error.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c  -fPIC -DPIC -o .libs/error.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT error.lo -MD -MP -MF .deps/error.Tpo -c error.c -o error.o >/dev/null 2>&1
mv -f .deps/error.Tpo .deps/error.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include    -g -O2 -Wall -MT domnode-expat.lo -MD -MP -MF .deps/domnode-expat.Tpo -c -o domnode-expat.lo domnode-expat.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT domnode-expat.lo -MD -MP -MF .deps/domnode-expat.Tpo -c domnode-expat.c  -fPIC -DPIC -o .libs/domnode-expat.o
domnode-expat.c: In function 'sd_domnode_load':
domnode-expat.c:429:11: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
domnode-expat.c: In function 'sd_domnode_store':
domnode-expat.c:444:11: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -I/opt/crosscompile/expat/include -g -O2 -Wall -MT domnode-expat.lo -MD -MP -MF .deps/domnode-expat.Tpo -c domnode-expat.c -o domnode-expat.o >/dev/null 2>&1
mv -f .deps/domnode-expat.Tpo .deps/domnode-expat.Plo
/bin/bash ../../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall -L/opt/crosscompile/expat/lib -lexpat  -o liblog4c_sd.la  stack.lo list.lo malloc.lo factory.lo hash.lo sprintf.lo test.lo sd_xplatform.lo error.lo domnode-expat.lo   -lpthread
arm-xscale-linux-gnueabi-ar cru .libs/liblog4c_sd.a .libs/stack.o .libs/list.o .libs/malloc.o .libs/factory.o .libs/hash.o .libs/sprintf.o .libs/test.o .libs/sd_xplatform.o .libs/error.o .libs/domnode-expat.o
arm-xscale-linux-gnueabi-ranlib .libs/liblog4c_sd.a
creating liblog4c_sd.la
(cd .libs && rm -f liblog4c_sd.la && ln -s ../liblog4c_sd.la liblog4c_sd.la)
make[4]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/sd'
Making all in log4c
make[4]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c'
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT rc.lo -MD -MP -MF .deps/rc.Tpo -c -o rc.lo rc.c
mkdir .libs
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT rc.lo -MD -MP -MF .deps/rc.Tpo -c rc.c  -fPIC -DPIC -o .libs/rc.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT rc.lo -MD -MP -MF .deps/rc.Tpo -c rc.c -o rc.o >/dev/null 2>&1
mv -f .deps/rc.Tpo .deps/rc.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT init.lo -MD -MP -MF .deps/init.Tpo -c -o init.lo init.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT init.lo -MD -MP -MF .deps/init.Tpo -c init.c  -fPIC -DPIC -o .libs/init.o
init.c: In function 'log4c_fini':
init.c:231:9: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT init.lo -MD -MP -MF .deps/init.Tpo -c init.c -o init.o >/dev/null 2>&1
mv -f .deps/init.Tpo .deps/init.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT appender_type_stream.lo -MD -MP -MF .deps/appender_type_stream.Tpo -c -o appender_type_stream.lo appender_type_stream.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_stream.lo -MD -MP -MF .deps/appender_type_stream.Tpo -c appender_type_stream.c  -fPIC -DPIC -o .libs/appender_type_stream.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_stream.lo -MD -MP -MF .deps/appender_type_stream.Tpo -c appender_type_stream.c -o appender_type_stream.o >/dev/null 2>&1
mv -f .deps/appender_type_stream.Tpo .deps/appender_type_stream.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT appender_type_stream2.lo -MD -MP -MF .deps/appender_type_stream2.Tpo -c -o appender_type_stream2.lo appender_type_stream2.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_stream2.lo -MD -MP -MF .deps/appender_type_stream2.Tpo -c appender_type_stream2.c  -fPIC -DPIC -o .libs/appender_type_stream2.o
appender_type_stream2.c: In function 'stream2_get_or_make_udata':
appender_type_stream2.c:136:9: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_stream2.lo -MD -MP -MF .deps/appender_type_stream2.Tpo -c appender_type_stream2.c -o appender_type_stream2.o >/dev/null 2>&1
mv -f .deps/appender_type_stream2.Tpo .deps/appender_type_stream2.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT appender_type_syslog.lo -MD -MP -MF .deps/appender_type_syslog.Tpo -c -o appender_type_syslog.lo appender_type_syslog.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_syslog.lo -MD -MP -MF .deps/appender_type_syslog.Tpo -c appender_type_syslog.c  -fPIC -DPIC -o .libs/appender_type_syslog.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_syslog.lo -MD -MP -MF .deps/appender_type_syslog.Tpo -c appender_type_syslog.c -o appender_type_syslog.o >/dev/null 2>&1
mv -f .deps/appender_type_syslog.Tpo .deps/appender_type_syslog.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT appender_type_mmap.lo -MD -MP -MF .deps/appender_type_mmap.Tpo -c -o appender_type_mmap.lo appender_type_mmap.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_mmap.lo -MD -MP -MF .deps/appender_type_mmap.Tpo -c appender_type_mmap.c  -fPIC -DPIC -o .libs/appender_type_mmap.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_mmap.lo -MD -MP -MF .deps/appender_type_mmap.Tpo -c appender_type_mmap.c -o appender_type_mmap.o >/dev/null 2>&1
mv -f .deps/appender_type_mmap.Tpo .deps/appender_type_mmap.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT layout_type_basic.lo -MD -MP -MF .deps/layout_type_basic.Tpo -c -o layout_type_basic.lo layout_type_basic.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_basic.lo -MD -MP -MF .deps/layout_type_basic.Tpo -c layout_type_basic.c  -fPIC -DPIC -o .libs/layout_type_basic.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_basic.lo -MD -MP -MF .deps/layout_type_basic.Tpo -c layout_type_basic.c -o layout_type_basic.o >/dev/null 2>&1
mv -f .deps/layout_type_basic.Tpo .deps/layout_type_basic.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT layout_type_dated.lo -MD -MP -MF .deps/layout_type_dated.Tpo -c -o layout_type_dated.lo layout_type_dated.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_dated.lo -MD -MP -MF .deps/layout_type_dated.Tpo -c layout_type_dated.c  -fPIC -DPIC -o .libs/layout_type_dated.o
layout_type_dated.c: In function 'dated_format':
layout_type_dated.c:28:2: warning: #warning gmtime() routine should be defined in sd_xplatform [-Wcpp]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_dated.lo -MD -MP -MF .deps/layout_type_dated.Tpo -c layout_type_dated.c -o layout_type_dated.o >/dev/null 2>&1
mv -f .deps/layout_type_dated.Tpo .deps/layout_type_dated.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT layout_type_basic_r.lo -MD -MP -MF .deps/layout_type_basic_r.Tpo -c -o layout_type_basic_r.lo layout_type_basic_r.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_basic_r.lo -MD -MP -MF .deps/layout_type_basic_r.Tpo -c layout_type_basic_r.c  -fPIC -DPIC -o .libs/layout_type_basic_r.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_basic_r.lo -MD -MP -MF .deps/layout_type_basic_r.Tpo -c layout_type_basic_r.c -o layout_type_basic_r.o >/dev/null 2>&1
mv -f .deps/layout_type_basic_r.Tpo .deps/layout_type_basic_r.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT layout_type_dated_r.lo -MD -MP -MF .deps/layout_type_dated_r.Tpo -c -o layout_type_dated_r.lo layout_type_dated_r.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_dated_r.lo -MD -MP -MF .deps/layout_type_dated_r.Tpo -c layout_type_dated_r.c  -fPIC -DPIC -o .libs/layout_type_dated_r.o
layout_type_dated_r.c: In function 'dated_r_format':
layout_type_dated_r.c:28:2: warning: #warning gmtime() routine should be defined in sd_xplatform [-Wcpp]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout_type_dated_r.lo -MD -MP -MF .deps/layout_type_dated_r.Tpo -c layout_type_dated_r.c -o layout_type_dated_r.o >/dev/null 2>&1
mv -f .deps/layout_type_dated_r.Tpo .deps/layout_type_dated_r.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT version.lo -MD -MP -MF .deps/version.Tpo -c -o version.lo version.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT version.lo -MD -MP -MF .deps/version.Tpo -c version.c  -fPIC -DPIC -o .libs/version.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT version.lo -MD -MP -MF .deps/version.Tpo -c version.c -o version.o >/dev/null 2>&1
mv -f .deps/version.Tpo .deps/version.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT logging_event.lo -MD -MP -MF .deps/logging_event.Tpo -c -o logging_event.lo logging_event.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT logging_event.lo -MD -MP -MF .deps/logging_event.Tpo -c logging_event.c  -fPIC -DPIC -o .libs/logging_event.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT logging_event.lo -MD -MP -MF .deps/logging_event.Tpo -c logging_event.c -o logging_event.o >/dev/null 2>&1
mv -f .deps/logging_event.Tpo .deps/logging_event.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT priority.lo -MD -MP -MF .deps/priority.Tpo -c -o priority.lo priority.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT priority.lo -MD -MP -MF .deps/priority.Tpo -c priority.c  -fPIC -DPIC -o .libs/priority.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT priority.lo -MD -MP -MF .deps/priority.Tpo -c priority.c -o priority.o >/dev/null 2>&1
mv -f .deps/priority.Tpo .deps/priority.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT appender.lo -MD -MP -MF .deps/appender.Tpo -c -o appender.lo appender.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender.lo -MD -MP -MF .deps/appender.Tpo -c appender.c  -fPIC -DPIC -o .libs/appender.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender.lo -MD -MP -MF .deps/appender.Tpo -c appender.c -o appender.o >/dev/null 2>&1
mv -f .deps/appender.Tpo .deps/appender.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT layout.lo -MD -MP -MF .deps/layout.Tpo -c -o layout.lo layout.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout.lo -MD -MP -MF .deps/layout.Tpo -c layout.c  -fPIC -DPIC -o .libs/layout.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT layout.lo -MD -MP -MF .deps/layout.Tpo -c layout.c -o layout.o >/dev/null 2>&1
mv -f .deps/layout.Tpo .deps/layout.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT category.lo -MD -MP -MF .deps/category.Tpo -c -o category.lo category.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT category.lo -MD -MP -MF .deps/category.Tpo -c category.c  -fPIC -DPIC -o .libs/category.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT category.lo -MD -MP -MF .deps/category.Tpo -c category.c -o category.o >/dev/null 2>&1
mv -f .deps/category.Tpo .deps/category.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT appender_type_rollingfile.lo -MD -MP -MF .deps/appender_type_rollingfile.Tpo -c -o appender_type_rollingfile.lo appender_type_rollingfile.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_rollingfile.lo -MD -MP -MF .deps/appender_type_rollingfile.Tpo -c appender_type_rollingfile.c  -fPIC -DPIC -o .libs/appender_type_rollingfile.o
appender_type_rollingfile.c: In function 'rollingfile_append':
appender_type_rollingfile.c:133:26: warning: unused variable 'my_event' [-Wunused-variable]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT appender_type_rollingfile.lo -MD -MP -MF .deps/appender_type_rollingfile.Tpo -c appender_type_rollingfile.c -o appender_type_rollingfile.o >/dev/null 2>&1
mv -f .deps/appender_type_rollingfile.Tpo .deps/appender_type_rollingfile.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT rollingpolicy.lo -MD -MP -MF .deps/rollingpolicy.Tpo -c -o rollingpolicy.lo rollingpolicy.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT rollingpolicy.lo -MD -MP -MF .deps/rollingpolicy.Tpo -c rollingpolicy.c  -fPIC -DPIC -o .libs/rollingpolicy.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT rollingpolicy.lo -MD -MP -MF .deps/rollingpolicy.Tpo -c rollingpolicy.c -o rollingpolicy.o >/dev/null 2>&1
mv -f .deps/rollingpolicy.Tpo .deps/rollingpolicy.Plo
/bin/bash ../../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH="\"/opt/crosscompile/log4c/etc\""    -g -O2 -Wall -MT rollingpolicy_type_sizewin.lo -MD -MP -MF .deps/rollingpolicy_type_sizewin.Tpo -c -o rollingpolicy_type_sizewin.lo rollingpolicy_type_sizewin.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT rollingpolicy_type_sizewin.lo -MD -MP -MF .deps/rollingpolicy_type_sizewin.Tpo -c rollingpolicy_type_sizewin.c  -fPIC -DPIC -o .libs/rollingpolicy_type_sizewin.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src -I../../src -DLOG4C_RCPATH=\"/opt/crosscompile/log4c/etc\" -g -O2 -Wall -MT rollingpolicy_type_sizewin.lo -MD -MP -MF .deps/rollingpolicy_type_sizewin.Tpo -c rollingpolicy_type_sizewin.c -o rollingpolicy_type_sizewin.o >/dev/null 2>&1
mv -f .deps/rollingpolicy_type_sizewin.Tpo .deps/rollingpolicy_type_sizewin.Plo
/bin/bash ../../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall -version-info 4:0:1  -o liblog4c.la -rpath /opt/crosscompile/log4c/lib rc.lo init.lo appender_type_stream.lo appender_type_stream2.lo appender_type_syslog.lo appender_type_mmap.lo layout_type_basic.lo layout_type_dated.lo layout_type_basic_r.lo layout_type_dated_r.lo version.lo logging_event.lo priority.lo appender.lo layout.lo category.lo appender_type_rollingfile.lo rollingpolicy.lo rollingpolicy_type_sizewin.lo ../sd/liblog4c_sd.la -lpthread
arm-xscale-linux-gnueabi-gcc -shared  .libs/rc.o .libs/init.o .libs/appender_type_stream.o .libs/appender_type_stream2.o .libs/appender_type_syslog.o .libs/appender_type_mmap.o .libs/layout_type_basic.o .libs/layout_type_dated.o .libs/layout_type_basic_r.o .libs/layout_type_dated_r.o .libs/version.o .libs/logging_event.o .libs/priority.o .libs/appender.o .libs/layout.o .libs/category.o .libs/appender_type_rollingfile.o .libs/rollingpolicy.o .libs/rollingpolicy_type_sizewin.o -Wl,--whole-archive ../sd/.libs/liblog4c_sd.a -Wl,--no-whole-archive  -Wl,--rpath -Wl,/opt/crosscompile/expat/lib -Wl,--rpath -Wl,/opt/crosscompile/expat/lib -L/opt/crosscompile/expat/lib /opt/crosscompile/expat/lib/libexpat.so -lpthread  -Wl,-soname -Wl,liblog4c.so.3 -o .libs/liblog4c.so.3.1.0
(cd .libs && rm -f liblog4c.so.3 && ln -s liblog4c.so.3.1.0 liblog4c.so.3)
(cd .libs && rm -f liblog4c.so && ln -s liblog4c.so.3.1.0 liblog4c.so)
rm -fr .libs/liblog4c.lax
mkdir .libs/liblog4c.lax
rm -fr .libs/liblog4c.lax/liblog4c_sd.a
mkdir .libs/liblog4c.lax/liblog4c_sd.a
(cd .libs/liblog4c.lax/liblog4c_sd.a && arm-xscale-linux-gnueabi-ar x /home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c/../sd/.libs/liblog4c_sd.a)
arm-xscale-linux-gnueabi-ar cru .libs/liblog4c.a  rc.o init.o appender_type_stream.o appender_type_stream2.o appender_type_syslog.o appender_type_mmap.o layout_type_basic.o layout_type_dated.o layout_type_basic_r.o layout_type_dated_r.o version.o logging_event.o priority.o appender.o layout.o category.o appender_type_rollingfile.o rollingpolicy.o rollingpolicy_type_sizewin.o  .libs/liblog4c.lax/liblog4c_sd.a/stack.o .libs/liblog4c.lax/liblog4c_sd.a/error.o .libs/liblog4c.lax/liblog4c_sd.a/hash.o .libs/liblog4c.lax/liblog4c_sd.a/sprintf.o .libs/liblog4c.lax/liblog4c_sd.a/sd_xplatform.o .libs/liblog4c.lax/liblog4c_sd.a/domnode-expat.o .libs/liblog4c.lax/liblog4c_sd.a/factory.o .libs/liblog4c.lax/liblog4c_sd.a/malloc.o .libs/liblog4c.lax/liblog4c_sd.a/test.o .libs/liblog4c.lax/liblog4c_sd.a/list.o 
arm-xscale-linux-gnueabi-ranlib .libs/liblog4c.a
rm -fr .libs/liblog4c.lax
creating liblog4c.la
(cd .libs && rm -f liblog4c.la && ln -s ../liblog4c.la liblog4c.la)
make[4]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c'
make[4]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[4]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
Making all in examples
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
Making all in helloworld
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld'
arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src  -I../../src   -g -O2 -Wall -MT helloworld.o -MD -MP -MF .deps/helloworld.Tpo -c -o helloworld.o helloworld.c
helloworld.c: In function 'main':
helloworld.c:6:7: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
mv -f .deps/helloworld.Tpo .deps/helloworld.Po
/bin/bash ../../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o helloworld helloworld.o ../../src/log4c/liblog4c.la -lpthread
mkdir .libs
arm-xscale-linux-gnueabi-gcc -g -O2 -Wall -o .libs/helloworld helloworld.o  ../../src/log4c/.libs/liblog4c.so -L/opt/crosscompile/expat/lib /opt/crosscompile/expat/lib/libexpat.so -lpthread -Wl,--rpath -Wl,/opt/crosscompile/log4c/lib -Wl,--rpath -Wl,/opt/crosscompile/expat/lib
creating helloworld
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld'
Making all in helloworld1
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld1'
arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../../src  -I../../src   -g -O2 -Wall -MT helloworld1.o -MD -MP -MF .deps/helloworld1.Tpo -c -o helloworld1.o helloworld1.c
mv -f .deps/helloworld1.Tpo .deps/helloworld1.Po
/bin/bash ../../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o helloworld1 helloworld1.o ../../src/log4c/liblog4c.la -lpthread
mkdir .libs
arm-xscale-linux-gnueabi-gcc -g -O2 -Wall -o .libs/helloworld1 helloworld1.o  ../../src/log4c/.libs/liblog4c.so -L/opt/crosscompile/expat/lib /opt/crosscompile/expat/lib/libexpat.so -lpthread -Wl,--rpath -Wl,/opt/crosscompile/log4c/lib -Wl,--rpath -Wl,/opt/crosscompile/expat/lib
creating helloworld1
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld1'
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
/bin/bash ../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src   -g -O2 -Wall -MT example_formatters.lo -MD -MP -MF .deps/example_formatters.Tpo -c -o example_formatters.lo example_formatters.c
mkdir .libs
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -MT example_formatters.lo -MD -MP -MF .deps/example_formatters.Tpo -c example_formatters.c  -fPIC -DPIC -o .libs/example_formatters.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -MT example_formatters.lo -MD -MP -MF .deps/example_formatters.Tpo -c example_formatters.c -o example_formatters.o >/dev/null 2>&1
mv -f .deps/example_formatters.Tpo .deps/example_formatters.Plo
/bin/bash ../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src   -g -O2 -Wall -MT example_appenders.lo -MD -MP -MF .deps/example_appenders.Tpo -c -o example_appenders.lo example_appenders.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -MT example_appenders.lo -MD -MP -MF .deps/example_appenders.Tpo -c example_appenders.c  -fPIC -DPIC -o .libs/example_appenders.o
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -MT example_appenders.lo -MD -MP -MF .deps/example_appenders.Tpo -c example_appenders.c -o example_appenders.o >/dev/null 2>&1
mv -f .deps/example_appenders.Tpo .deps/example_appenders.Plo
/bin/bash ../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o liblog4c_examples.la  example_formatters.lo example_appenders.lo  -lpthread
arm-xscale-linux-gnueabi-ar cru .libs/liblog4c_examples.a .libs/example_formatters.o .libs/example_appenders.o
arm-xscale-linux-gnueabi-ranlib .libs/liblog4c_examples.a
creating liblog4c_examples.la
(cd .libs && rm -f liblog4c_examples.la && ln -s ../liblog4c_examples.la liblog4c_examples.la)
/bin/bash ../libtool --tag=CC   --mode=compile arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src   -g -O2 -Wall -MT userloc_formatter.lo -MD -MP -MF .deps/userloc_formatter.Tpo -c -o userloc_formatter.lo userloc_formatter.c
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -MT userloc_formatter.lo -MD -MP -MF .deps/userloc_formatter.Tpo -c userloc_formatter.c  -fPIC -DPIC -o .libs/userloc_formatter.o
userloc_formatter.c: In function 'userloc_format':
userloc_formatter.c:30:5: warning: implicit declaration of function 'sd_debug' [-Wimplicit-function-declaration]
 arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -MT userloc_formatter.lo -MD -MP -MF .deps/userloc_formatter.Tpo -c userloc_formatter.c -o userloc_formatter.o >/dev/null 2>&1
mv -f .deps/userloc_formatter.Tpo .deps/userloc_formatter.Plo
/bin/bash ../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o liblog4c_userloc.la  userloc_formatter.lo  -lpthread
arm-xscale-linux-gnueabi-ar cru .libs/liblog4c_userloc.a .libs/userloc_formatter.o
arm-xscale-linux-gnueabi-ranlib .libs/liblog4c_userloc.a
creating liblog4c_userloc.la
(cd .libs && rm -f liblog4c_userloc.la && ln -s ../liblog4c_userloc.la liblog4c_userloc.la)
arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src   -g -O2 -Wall -MT application_1.o -MD -MP -MF .deps/application_1.Tpo -c -o application_1.o application_1.c
mv -f .deps/application_1.Tpo .deps/application_1.Po
/bin/bash ../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o application_1 application_1.o ../src/log4c/liblog4c.la -lpthread
arm-xscale-linux-gnueabi-gcc -g -O2 -Wall -o .libs/application_1 application_1.o  ../src/log4c/.libs/liblog4c.so -L/opt/crosscompile/expat/lib /opt/crosscompile/expat/lib/libexpat.so -lpthread -Wl,--rpath -Wl,/opt/crosscompile/log4c/lib -Wl,--rpath -Wl,/opt/crosscompile/expat/lib
creating application_1
arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src   -g -O2 -Wall -MT application_2.o -MD -MP -MF .deps/application_2.Tpo -c -o application_2.o application_2.c
mv -f .deps/application_2.Tpo .deps/application_2.Po
/bin/bash ../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o application_2 application_2.o liblog4c_examples.la ../src/log4c/liblog4c.la -lpthread
arm-xscale-linux-gnueabi-gcc -g -O2 -Wall -o .libs/application_2 application_2.o  ./.libs/liblog4c_examples.a ../src/log4c/.libs/liblog4c.so -L/opt/crosscompile/expat/lib /opt/crosscompile/expat/lib/libexpat.so -lpthread -Wl,--rpath -Wl,/opt/crosscompile/log4c/lib -Wl,--rpath -Wl,/opt/crosscompile/expat/lib
creating application_2
arm-xscale-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I../src  -I../src   -g -O2 -Wall -MT application_3.o -MD -MP -MF .deps/application_3.Tpo -c -o application_3.o application_3.c
mv -f .deps/application_3.Tpo .deps/application_3.Po
/bin/bash ../libtool --tag=CC   --mode=link arm-xscale-linux-gnueabi-gcc  -g -O2 -Wall   -o application_3 application_3.o liblog4c_userloc.la liblog4c_examples.la ../src/log4c/liblog4c.la -lpthread
arm-xscale-linux-gnueabi-gcc -g -O2 -Wall -o .libs/application_3 application_3.o  ./.libs/liblog4c_userloc.a ./.libs/liblog4c_examples.a ../src/log4c/.libs/liblog4c.so -L/opt/crosscompile/expat/lib /opt/crosscompile/expat/lib/libexpat.so -lpthread -Wl,--rpath -Wl,/opt/crosscompile/log4c/lib -Wl,--rpath -Wl,/opt/crosscompile/expat/lib
creating application_3
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
make[1]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
crifan@ubuntu:log4c-1.2.1$ 

6.然后再去安装:

crifan@ubuntu:log4c-1.2.1$ make install
make  install-recursive
make[1]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
Making install in config
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/config'
make[3]: Entering directory `/home/crifan/develop/crosscompile/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/crifan/develop/crosscompile/log4c/log4c-1.2.1/config'
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/config'
Making install in src
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
Making install in sd
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/sd'
make[4]: Entering directory `/home/crifan/develop/crosscompile/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/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/sd'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/sd'
Making install in log4c
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c'
make[4]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c'
test -z "/opt/crosscompile/log4c/lib" || /bin/mkdir -p "/opt/crosscompile/log4c/lib"
 /bin/bash ../../libtool --mode=install /usr/bin/install -c  'liblog4c.la' '/opt/crosscompile/log4c/lib/liblog4c.la'
/usr/bin/install -c .libs/liblog4c.so.3.1.0 /opt/crosscompile/log4c/lib/liblog4c.so.3.1.0
(cd /opt/crosscompile/log4c/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 /opt/crosscompile/log4c/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 /opt/crosscompile/log4c/lib/liblog4c.la
/usr/bin/install -c .libs/liblog4c.a /opt/crosscompile/log4c/lib/liblog4c.a
chmod 644 /opt/crosscompile/log4c/lib/liblog4c.a
arm-xscale-linux-gnueabi-ranlib /opt/crosscompile/log4c/lib/liblog4c.a
PATH="$PATH:/sbin" ldconfig -n /opt/crosscompile/log4c/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /opt/crosscompile/log4c/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 add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/opt/crosscompile/log4c/include/log4c" || /bin/mkdir -p "/opt/crosscompile/log4c/include/log4c"
 /usr/bin/install -c -m 644 'config-win32.h' '/opt/crosscompile/log4c/include/log4c/config-win32.h'
 /usr/bin/install -c -m 644 'buffer.h' '/opt/crosscompile/log4c/include/log4c/buffer.h'
 /usr/bin/install -c -m 644 'rc.h' '/opt/crosscompile/log4c/include/log4c/rc.h'
 /usr/bin/install -c -m 644 'init.h' '/opt/crosscompile/log4c/include/log4c/init.h'
 /usr/bin/install -c -m 644 'defs.h' '/opt/crosscompile/log4c/include/log4c/defs.h'
 /usr/bin/install -c -m 644 'version.h' '/opt/crosscompile/log4c/include/log4c/version.h'
 /usr/bin/install -c -m 644 'location_info.h' '/opt/crosscompile/log4c/include/log4c/location_info.h'
 /usr/bin/install -c -m 644 'logging_event.h' '/opt/crosscompile/log4c/include/log4c/logging_event.h'
 /usr/bin/install -c -m 644 'priority.h' '/opt/crosscompile/log4c/include/log4c/priority.h'
 /usr/bin/install -c -m 644 'layout_type_basic.h' '/opt/crosscompile/log4c/include/log4c/layout_type_basic.h'
 /usr/bin/install -c -m 644 'layout_type_dated.h' '/opt/crosscompile/log4c/include/log4c/layout_type_dated.h'
 /usr/bin/install -c -m 644 'layout_type_basic_r.h' '/opt/crosscompile/log4c/include/log4c/layout_type_basic_r.h'
 /usr/bin/install -c -m 644 'layout_type_dated_r.h' '/opt/crosscompile/log4c/include/log4c/layout_type_dated_r.h'
 /usr/bin/install -c -m 644 'layout.h' '/opt/crosscompile/log4c/include/log4c/layout.h'
 /usr/bin/install -c -m 644 'appender_type_stream.h' '/opt/crosscompile/log4c/include/log4c/appender_type_stream.h'
 /usr/bin/install -c -m 644 'appender_type_stream2.h' '/opt/crosscompile/log4c/include/log4c/appender_type_stream2.h'
 /usr/bin/install -c -m 644 'appender_type_syslog.h' '/opt/crosscompile/log4c/include/log4c/appender_type_syslog.h'
 /usr/bin/install -c -m 644 'appender_type_mmap.h' '/opt/crosscompile/log4c/include/log4c/appender_type_mmap.h'
 /usr/bin/install -c -m 644 'appender.h' '/opt/crosscompile/log4c/include/log4c/appender.h'
 /usr/bin/install -c -m 644 'category.h' '/opt/crosscompile/log4c/include/log4c/category.h'
 /usr/bin/install -c -m 644 'appender_type_rollingfile.h' '/opt/crosscompile/log4c/include/log4c/appender_type_rollingfile.h'
 /usr/bin/install -c -m 644 'rollingpolicy.h' '/opt/crosscompile/log4c/include/log4c/rollingpolicy.h'
 /usr/bin/install -c -m 644 'rollingpolicy_type_sizewin.h' '/opt/crosscompile/log4c/include/log4c/rollingpolicy_type_sizewin.h'
make[4]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src/log4c'
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[4]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[4]: Nothing to be done for `install-exec-am'.
test -z "/opt/crosscompile/log4c/include" || /bin/mkdir -p "/opt/crosscompile/log4c/include"
 /usr/bin/install -c -m 644 'log4c.h' '/opt/crosscompile/log4c/include/log4c.h'
make[4]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/src'
Making install in examples
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
Making install in helloworld
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld'
make[4]: Entering directory `/home/crifan/develop/crosscompile/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/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld'
Making install in helloworld1
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld1'
make[4]: Entering directory `/home/crifan/develop/crosscompile/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/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld1'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples/helloworld1'
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
make[4]: Entering directory `/home/crifan/develop/crosscompile/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/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1/examples'
make[2]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
make[3]: Entering directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
test -z "/opt/crosscompile/log4c/bin" || /bin/mkdir -p "/opt/crosscompile/log4c/bin"
 /usr/bin/install -c 'log4c-config' '/opt/crosscompile/log4c/bin/log4c-config'
test -z "/opt/crosscompile/log4c/etc" || /bin/mkdir -p "/opt/crosscompile/log4c/etc"
 /usr/bin/install -c -m 644 'log4crc.sample' '/opt/crosscompile/log4c/etc/log4crc.sample'
test -z "/opt/crosscompile/log4c/share/aclocal" || /bin/mkdir -p "/opt/crosscompile/log4c/share/aclocal"
 /usr/bin/install -c -m 644 'log4c.m4' '/opt/crosscompile/log4c/share/aclocal/log4c.m4'
make[3]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
make[2]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
make[1]: Leaving directory `/home/crifan/develop/crosscompile/log4c/log4c-1.2.1'
crifan@ubuntu:log4c-1.2.1$ 

即可。

7.再去确认一下:

crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/ -lh
total 20K
drwxrwxr-x 2 crifan crifan 4.0K Aug  9 00:39 bin
drwxrwxr-x 2 crifan crifan 4.0K Aug  9 00:39 etc
drwxrwxr-x 3 crifan crifan 4.0K Aug  9 00:39 include
drwxrwxr-x 2 crifan crifan 4.0K Aug  9 00:39 lib
drwxrwxr-x 3 crifan crifan 4.0K Aug  9 00:39 share
crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/bin -lh
total 4.0K
-rwxr-xr-x 1 crifan crifan 947 Aug  9 00:39 log4c-config
crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/etc/ -lh
total 4.0K
-rw-r--r-- 1 crifan crifan 684 Aug  9 00:39 log4crc.sample
crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/include/ -lh
total 8.0K
drwxrwxr-x 2 crifan crifan 4.0K Aug  9 00:39 log4c
-rw-r--r-- 1 crifan crifan  472 Aug  9 00:39 log4c.h
crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/lib/ -lh
total 544K
-rw-r--r-- 1 crifan crifan 326K Aug  9 00:39 liblog4c.a
-rwxr-xr-x 1 crifan crifan  892 Aug  9 00:39 liblog4c.la
lrwxrwxrwx 1 crifan crifan   17 Aug  9 00:39 liblog4c.so -> liblog4c.so.3.1.0
lrwxrwxrwx 1 crifan crifan   17 Aug  9 00:39 liblog4c.so.3 -> liblog4c.so.3.1.0
-rwxr-xr-x 1 crifan crifan 210K Aug  9 00:39 liblog4c.so.3.1.0
crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/share/ -lh
total 4.0K
drwxrwxr-x 2 crifan crifan 4.0K Aug  9 00:39 aclocal
crifan@ubuntu:log4c-1.2.1$ ls /opt/crosscompile/log4c/share/aclocal/ -lh
total 8.0K
-rw-r--r-- 1 crifan crifan 7.8K Aug  9 00:39 log4c.m4
crifan@ubuntu:log4c-1.2.1$ 

 

 

【总结】

此处,在Ubuntu下交叉编译log4c,的步骤是:

1.前提是已经交叉编译了expat:

【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译expat

2.准备工作:

(1)取消undef malloc和undef realloc

去修改

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

以此避免错误:

【已解决】Cygwin下用arm-xscale-linux-gnueabi交叉编译log4c出错:../../src/log4c/.libs/liblog4c.so: undefined reference to ‘rpl_malloc’

 

3.配置:

./configure --prefix=/opt/crosscompile/log4c --build=i686-pc-linux-gnu --target=arm-xscale-linux-gnueabi --host=arm-xscale-linux-gnueabi CC=arm-xscale-linux-gnueabi-gcc --with-expat-prefix=/opt/crosscompile/expat

4.编译:

make

5.安装:

make install

转载请注明:在路上 » 【记录】Ubuntu下用arm-xscale-linux-gnueabi交叉编译log4c

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.193 seconds, using 22.38MB memory