curl-users
Re: A cross-compile problem
Date: Mon, 02 Oct 2006 12:46:10 -0400
Dan, thanks for the advice; I made some progress but not out of the woods yet.
Following are the cleaned-up cfg script, configure result, and make result.
It seemed to have passed the configure, but there are error messages at the
end of make.
Wonder what's causing "...could not read symbols: File in wrong format" (???).
--------------------------------------------------------------------------------------------------
#! /bin/sh
export PATH=$PATH:/root/work/toolchain/bin
./configure --host=mipsel-linux --prefix=/usr/curl --disable-ares
--disable-cookies --disable-crypto-auth --disable-ipv6
--enable-hidden-symbols --without-libidn --with-random=/dev/random --with-ssl
---------------------------------------------------------------------------------------------------
bash-2.05b# ./cfg.sh
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking whether to enable maintainer-specific portions of Makefiles... no
checking for sed... /root/work/toolchain/bin/sed
checking for mipsel-linux-ar... mipsel-linux-ar
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for mipsel-linux-strip... mipsel-linux-strip
checking curl version... 7.15.5
checking build system type... i686-pc-linux-gnu
checking host system type... mipsel-unknown-linux-gnu
checking for style of include used by make... GNU
checking for mipsel-linux-gcc... mipsel-linux-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 mipsel-linux-gcc accepts -g... yes
checking for mipsel-linux-gcc option to accept ISO C89... none needed
checking dependency style of mipsel-linux-gcc... gcc3
checking how to run the C preprocessor... mipsel-linux-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for AIX... no
checking for mipsel-linux-gcc... (cached) mipsel-linux-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether mipsel-linux-gcc accepts -g... (cached) yes
checking for mipsel-linux-gcc option to accept ISO C89... (cached) none needed
checking dependency style of mipsel-linux-gcc... (cached) gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for a sed that does not truncate output...
/root/work/toolchain/bin/sed
checking for ld used by mipsel-linux-gcc...
/root/work/toolchain/mipsel-linux-uclibc/bin/ld
checking if the linker (/root/work/toolchain/mipsel-linux-uclibc/bin/ld) is
GNU ld... yes
checking for /root/work/toolchain/mipsel-linux-uclibc/bin/ld option to
reload object files... -r
checking for BSD-compatible nm... /root/work/toolchain/bin/mipsel-linux-nm -B
checking whether ln -s works... yes
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 mipsel-linux-g++... mipsel-linux-g++
checking whether we are using the GNU C++ compiler... yes
checking whether mipsel-linux-g++ accepts -g... yes
checking dependency style of mipsel-linux-g++... gcc3
checking how to run the C++ preprocessor... mipsel-linux-g++ -E
checking for mipsel-linux-g77... no
checking for mipsel-linux-f77... no
checking for mipsel-linux-xlf... no
checking for mipsel-linux-frt... no
checking for mipsel-linux-pgf77... no
checking for mipsel-linux-cf77... no
checking for mipsel-linux-fort77... no
checking for mipsel-linux-fl32... no
checking for mipsel-linux-af77... no
checking for mipsel-linux-f90... no
checking for mipsel-linux-xlf90... no
checking for mipsel-linux-pgf90... no
checking for mipsel-linux-pghpf... no
checking for mipsel-linux-epcf90... no
checking for mipsel-linux-gfortran... no
checking for mipsel-linux-g95... no
checking for mipsel-linux-f95... no
checking for mipsel-linux-fort... no
checking for mipsel-linux-xlf95... no
checking for mipsel-linux-ifort... no
checking for mipsel-linux-ifc... no
checking for mipsel-linux-efc... no
checking for mipsel-linux-pgf95... no
checking for mipsel-linux-lf95... no
checking for mipsel-linux-ftn... no
checking for g77... g77
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 autoconf_at_gnu.org.
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... 32768
checking command to parse /root/work/toolchain/bin/mipsel-linux-nm -B
output from mipsel-linux-gcc object... ok
checking for objdir... .libs
checking for mipsel-linux-ar... (cached) mipsel-linux-ar
checking for mipsel-linux-ranlib... mipsel-linux-ranlib
checking for mipsel-linux-strip... (cached) mipsel-linux-strip
checking if mipsel-linux-gcc supports -fno-rtti -fno-exceptions... no
checking for mipsel-linux-gcc option to produce PIC... -fPIC
checking if mipsel-linux-gcc PIC flag -fPIC works... yes
checking if mipsel-linux-gcc static flag -static works... yes
checking if mipsel-linux-gcc supports -c -o file.o... yes
checking whether the mipsel-linux-gcc linker
(/root/work/toolchain/mipsel-linux-uclibc/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 mipsel-linux-g++...
/root/work/toolchain/mipsel-linux-uclibc/bin/ld
checking if the linker (/root/work/toolchain/mipsel-linux-uclibc/bin/ld) is
GNU ld... yes
checking whether the mipsel-linux-g++ linker
(/root/work/toolchain/mipsel-linux-uclibc/bin/ld) supports shared
libraries... yes
checking for mipsel-linux-g++ option to produce PIC... -fPIC
checking if mipsel-linux-g++ PIC flag -fPIC works... yes
checking if mipsel-linux-g++ static flag -static works... yes
checking if mipsel-linux-g++ supports -c -o file.o... yes
checking whether the mipsel-linux-g++ linker
(/root/work/toolchain/mipsel-linux-uclibc/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 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... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker
(/root/work/toolchain/mipsel-linux-uclibc/bin/ld) supports shared
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking if we need -no-undefined... no
checking if we need -mimpure-text... no
checking if we need BUILDING_LIBCURL... no
checking whether make sets $(MAKE)... (cached) yes
checking for windows.h... no
checking for winsock.h... no
checking for winsock2.h... no
checking for ws2tcpip.h... no
checking whether to support http... yes
checking whether to support ftp... yes
checking whether to support file... yes
checking whether to support ldap... yes
checking whether to support dict... yes
checking whether to support telnet... yes
checking whether to support tftp... yes
checking whether to provide built-in manual... yes
checking for icc in use... no
checking for gethostbyname... yes
checking for strcasecmp... yes
checking for connect... yes
checking for dlclose... no
checking for dlopen in -ldl... yes
checking whether to use libgcc... no
checking name of dynamic library ldap... libldap.so (guess while
cross-compiling)
checking name of dynamic library lber... liblber.so (guess while
cross-compiling)
checking for timeGetTime in winmm... no
checking whether to enable ipv6... no
checking non-blocking sockets style... O_NONBLOCK
checking if argv can be written to... no
configure: WARNING: the previous check could not be made default was used
checking if Kerberos4 support is requested... no
checking if SPNEGO support is requested... no
checking if GSSAPI support is requested... no
checking for gdi32... no
checking for CRYPTO_lock in -lcrypto... no
checking for CRYPTO_add_lock in -lcrypto... no
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS,
NTLM and more.
configure: WARNING: Use --with-ssl or --with-gnutls to address this.
checking for inflateEnd in -lz... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for gzread in -lz... no
configure: WARNING: configure found only the libz header file, not the lib!
checking whether to build with libidn... no
checking AIX 4.3 or later... no
checking for gethostbyname_r... yes
checking if gethostbyname_r takes 3 arguments... no
checking if gethostbyname_r with -D_REENTRANT takes 3 arguments... no
checking if gethostbyname_r takes 5 arguments... no
checking if gethostbyname_r takes 6 arguments... yes
checking for inet_ntoa_r... yes
checking whether inet_ntoa_r is declared... no
checking whether inet_ntoa_r with -D_REENTRANT is declared... no
checking for localtime_r... yes
checking whether localtime_r is declared... yes
checking for strerror_r... no
checking for gmtime_r... yes
checking for ANSI C header files... (cached) yes
checking for malloc.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/ioctl.h... yes
checking for assert.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for limits.h... yes
checking for arpa/inet.h... yes
checking for net/if.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking for netdb.h... yes
checking for sys/sockio.h... no
checking for sys/stat.h... (cached) yes
checking for sys/param.h... yes
checking for termios.h... yes
checking for termio.h... yes
checking for sgtty.h... yes
checking for fcntl.h... yes
checking for dlfcn.h... (cached) yes
checking for alloca.h... yes
checking for time.h... yes
checking for io.h... no
checking for pwd.h... yes
checking for utime.h... yes
checking for sys/utime.h... no
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for libgen.h... yes
checking for locale.h... yes
checking for errno.h... yes
checking for arpa/tftp.h... yes
checking for sys/filio.h... no
checking for setjmp.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for curl_off_t... yes
checking size of curl_off_t... 8
checking for size_t... (cached) yes
checking size of size_t... 4
checking for long... yes
checking size of long... 4
checking for time_t... yes
checking size of time_t... 4
checking for long long... yes
checking if numberLL works... yes
checking for ssize_t... yes
checking for socklen_t... yes
checking for in_addr_t... yes
checking for struct sockaddr_storage... yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for recv... yes
checking types of arguments and return type for recv... int,void
*,size_t,int,int
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for send... yes
checking types of arguments and return type for send... int,const void
*,size_t,int,intchecking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for MSG_NOSIGNAL... yes
checking return type of signal handlers... void
checking for strtoll... yes
checking for socket... yes
checking for select... yes
checking for strdup... yes
checking for strstr... yes
checking for strtok_r... yes
checking for uname... yes
checking for strcasecmp... (cached) yes
checking for stricmp... no
checking deeper for stricmp... but still no
checking for strcmpi... no
checking deeper for strcmpi... but still no
checking for gethostbyaddr... yes
checking for gettimeofday... yes
checking for inet_addr... yes
checking for inet_ntoa... yes
checking for inet_pton... yes
checking for perror... yes
checking for closesocket... no
checking deeper for closesocket... but still no
checking for siginterrupt... yes
checking for sigaction... yes
checking for signal... yes
checking for getpass_r... no
checking deeper for getpass_r... but still no
checking for strlcat... yes
checking for getpwuid... yes
checking for geteuid... yes
checking for dlopen... yes
checking for utime... yes
checking for sigsetjmp... no
checking deeper for sigsetjmp... but still no
checking for basename... yes
checking for setlocale... yes
checking for ftruncate... yes
checking for pipe... yes
checking for poll... yes
checking for getprotobyname... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for fork... yes
checking for sigsetjmp defined as macro... yes
checking whether basename is declared... yes
checking whether inet_pton is declared... yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking for netdb.h... (cached) yes
checking for getnameinfo... yes
checking types of arguments for getnameinfo... const struct sockaddr
*,socklen_t,size_t,unsigned int
checking if we are Mac OS X (to disable poll)... no
checking if poll works with NULL inputs... cross-compiling assumes yes
checking for perl... /usr/bin/perl
checking for gnroff... /usr/bin/gnroff
checking how to use *nroff to get plain text from man pages... -man
checking whether to enable ares... no
checking whether to enable verbose strings... yes
checking whether to enable SSPI support (win32 builds only)... no
checking whether to enable debug options... no
checking whether to enable cryptographic authentication methods... no
checking whether to enable support for cookies... no
checking whether to enable hidden symbols in the library... checking
whether mipsel-linux-gcc supports it... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/examples/Makefile
config.status: creating docs/libcurl/Makefile
config.status: creating include/Makefile
config.status: creating include/curl/Makefile
config.status: creating src/Makefile
config.status: creating lib/Makefile
config.status: creating tests/Makefile
config.status: creating tests/data/Makefile
config.status: creating tests/server/Makefile
config.status: creating tests/libtest/Makefile
config.status: creating packages/Makefile
config.status: creating packages/Win32/Makefile
config.status: creating packages/Win32/cygwin/Makefile
config.status: creating packages/Linux/Makefile
config.status: creating packages/Linux/RPM/Makefile
config.status: creating packages/Linux/RPM/curl.spec
config.status: creating packages/Linux/RPM/curl-ssl.spec
config.status: creating packages/Solaris/Makefile
config.status: creating packages/DOS/Makefile
config.status: creating packages/EPM/curl.list
config.status: WARNING: packages/EPM/curl.list.in seems to ignore the
--datarootdir setting
config.status: creating packages/EPM/Makefile
config.status: creating packages/vms/Makefile
config.status: creating packages/AIX/Makefile
config.status: creating packages/AIX/RPM/Makefile
config.status: creating packages/AIX/RPM/curl.spec
config.status: creating curl-config
config.status: creating libcurl.pc
config.status: creating lib/config.h
config.status: lib/config.h is unchanged
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
configure: Configured to build curl/libcurl:
curl version: 7.15.5
Host setup: mipsel-unknown-linux-gnu
Install prefix: /usr/curl
Compiler: mipsel-linux-gcc
SSL support: no (--with-ssl / --with-gnutls)
zlib support: no (--with-zlib)
krb4 support: no (--with-krb4*)
GSSAPI support: no (--with-gssapi)
SPNEGO support: no (--with-spnego)
c-ares support: no (--enable-ares)
ipv6 support: no (--enable-ipv6)
IDN support: no (--with-libidn)
Build libcurl: Shared=yes, Static=yes
Built-in manual: enabled
Verbose errors: enabled (--disable-verbose)
SSPI support: no (--enable-sspi)
ca cert path: no
--------------------------------------------------------------------------------------------------
bash-2.05b# make
Making all in lib
make[1]: Entering directory `/root/tools/curl-7.15.5/lib'
echo "/* This file is generated automatically */" > ../lib/ca-bundle.h
echo '#undef CURL_CA_BUNDLE /* unknown */' >> ../lib/ca-bundle.h
make all-am
make[2]: Entering directory `/root/tools/curl-7.15.5/lib'
if /bin/sh ../libtool --tag=CC --mode=compile mipsel-linux-gcc
-DHAVE_CONFIG_H -I../include -I../lib -I../lib -g -O2 -MT url.lo -MD
-MP -MF ".deps/url.Tpo" -c -o url.lo url.c; \
then mv -f ".deps/url.Tpo" ".deps/url.Plo"; else rm -f ".deps/url.Tpo";
exit 1; fi
mipsel-linux-gcc -DHAVE_CONFIG_H -I../include -I../lib -I../lib -g -O2
-MT url.lo -MD
-MP -MF .deps/url.Tpo -c url.c -fPIC -DPIC -o .libs/url.o
mipsel-linux-gcc -DHAVE_CONFIG_H -I../include -I../lib -I../lib -g -O2
-MT url.lo -MD
-MP -MF .deps/url.Tpo -c url.c -o url.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC --mode=link mipsel-linux-gcc -g -O2 -o
libcurl.la -rpath /usr/curl/lib -version-info 3:0:0 file.lo timeval.lo
base64.lo hostip.lo progress.lo formdata.lo cookie.lo http.lo sendf.lo
ftp.lo url.lo dict.lo if2ip.lo speedcheck.lo ldap.lo ssluse.lo version.lo
getenv.lo escape.lo mprintf.lo telnet.lo netrc.lo getinfo.lo transfer.lo
strequal.lo easy.lo security.lo krb4.lo memdebug.lo http_chunks.lo
strtok.lo connect.lo llist.lo hash.lo multi.lo content_encoding.lo share.lo
http_digest.lo md5.lo http_negotiate.lo http_ntlm.lo inet_pton.lo
strtoofft.lo strerror.lo hostares.lo hostasyn.lo hostip4.lo hostip6.lo
hostsyn.lo hostthre.lo inet_ntop.lo parsedate.lo select.lo gtls.lo
sslgen.lo tftp.lo splay.lo strdup.lo -ldl
mipsel-linux-gcc -shared .libs/file.o .libs/timeval.o .libs/base64.o
.libs/hostip.o .libs/progress.o .libs/formdata.o .libs/cookie.o
.libs/http.o .libs/sendf.o .libs/ftp.o .libs/url.o .libs/dict.o
.libs/if2ip.o .libs/speedcheck.o .libs/ldap.o .libs/ssluse.o
.libs/version.o .libs/getenv.o .libs/escape.o .libs/mprintf.o
.libs/telnet.o .libs/netrc.o .libs/getinfo.o .libs/transfer.o
.libs/strequal.o .libs/easy.o .libs/security.o .libs/krb4.o
.libs/memdebug.o .libs/http_chunks.o .libs/strtok.o .libs/connect.o
.libs/llist.o .libs/hash.o .libs/multi.o .libs/content_encoding.o
.libs/share.o .libs/http_digest.o .libs/md5.o .libs/http_negotiate.o
.libs/http_ntlm.o .libs/inet_pton.o .libs/strtoofft.o .libs/strerror.o
.libs/hostares.o .libs/hostasyn.o .libs/hostip4.o .libs/hostip6.o
.libs/hostsyn.o .libs/hostthre.o .libs/inet_ntop.o .libs/parsedate.o
.libs/select.o .libs/gtls.o .libs/sslgen.o .libs/tftp.o .libs/splay.o
.libs/strdup.o -ldl -Wl,-soname -Wl,libcurl.so.3 -o .libs/libcurl.so.3.0.0
/root/work/toolchain/bin-ccache/../lib/gcc/mipsel-linux-uclibc/3.4.2/../../../../mipsel-linux-uclibc/bin/ld:
.libs/memdebug.o: Relocations in generic ELF (EM: 3)
.libs/memdebug.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [libcurl.la] Error 1
make[2]: Leaving directory `/root/tools/curl-7.15.5/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/tools/curl-7.15.5/lib'
make: *** [all-recursive] Error 1
Sid
Received on 2006-10-02