[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cdbs and i686-pc-linux-gnu-ar error



On Wed, Nov 23, 2005 at 05:58:57PM +0200, Alexei Chetroi wrote:
>   Hi,
> 
>   I'm trying to build a package with cdbs, but it fails with this
> message:
> make[2]: i686-pc-linux-gnu-ar: Command not found
> make[2]: *** [libiberty.a] Error 127
> 
> debian/rules contains these lines:
> include /usr/share/cdbs/1/rules/debhelper.mk
> include /usr/share/cdbs/1/class/autotools.mk
> include /usr/share/cdbs/1/rules/dpatch.mk
> 
> CC := gcc
> DEB_CONFIGURE_EXTRA_FLAGS := --target=avr --disable-static
> 
> from build log I see it call configure with these options:
> chmod a+x /home/lex/lex/src/avr/binutils/cdbs/binutils-avr-2.16.1/./configure 
> if test ""; then cd ""; else cd "."; fi && CC="gcc" CXX="g++" CFLAGS="-g -Wall -
> O2" CXXFLAGS="-g -Wall -O2" /home/lex/lex/src/avr/binutils/cdbs/binutils-avr-2.1
> 6.1/./configure  --build=i386-linux --prefix=/usr --includedir="\${prefix}/inclu
> de" --mandir="\${prefix}/share/man" --infodir="\${prefix}/share/info" --sysconfd
> ir=/etc --localstatedir=/var --libexecdir="\${prefix}/lib/binutils-avr" --srcdir
> =. --disable-maintainer-mode  --target=avr --disable-static 
> creating cache ./config.cache
> checking host system type... i686-pc-linux-gnu
> checking target system type... avr-unknown-none
> checking build system type... i386-pc-linux-gnu
> 
> and as I can see, configure script doesn't find ar, as and ranlib:
> checking for makeinfo... makeinfo
> checking for i686-pc-linux-gnu-ar... no
> checking for i686-pc-linux-gnu-as... no
> checking for i686-pc-linux-gnu-dlltool... no
> checking for i686-pc-linux-gnu-ld... no
> checking for i686-pc-linux-gnu-nm... no
> checking for i686-pc-linux-gnu-ranlib... no
> checking for i686-pc-linux-gnu-windres... no
> checking for i686-pc-linux-gnu-objcopy... no
> checking for i686-pc-linux-gnu-objdump... no
> checking for avr-ar... avr-ar
> 
> 
> What is wrong with my setup? Any help would be apreciated.
dh_make has:

  # These are used for cross-compiling and for saving the configure script
  # from having to guess our platform (since we know it already)
  DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  
  ...
  
  CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man

I guess you could also pass the --host option to ./configure script,
and use --build variable from dpkg too.

-- 
Clear skies,
Justin



Reply to: