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

Re: Dpkg + Architecture limitations

On Wed, 2008-05-07 at 10:13 +0300, dani wrote:
> Good Morning, 
> I have compiled a uclibc based system 

I think you should probably be asking this on the debian-embedded list.


uClibc is not in Debian at this time and dpkg does not have explicit
support for it yet. dpkg-cross is probably where you would start with
uClibc requirements.

Debian-embedded looks after dpkg-cross and I'm currently doing most of
the work on the source code for it.

> and I want to use dpkg as the package 
> manager. My config.site is;
> host=$(uname -m)-anchor-linux-uclibc

Why put 'anchor' in there? To what does anchor refer? A uClibc
architecture string is not specific to one particular machine. It should
specify the CPU (i486 because i686 is not a distinct architecture from
i486 which in turn is not distinct from i386), the kernel and the OS

> build=$host
> target=$host
> ac_cv_host=$host
> ac_cv_build=$build
> ac_cv_target=$target 

That doesn't look right to me. Where did you find this snippet?

dpkg-cross does not use system-level config.site files of that type
anymore. The i386 config.site data is:

# i386 specific configure variables
# If you have additions to this file, please tell <roman@debian.org>
# so they can be included in the package.

Nothing in that file is any different on i486, i686 or uClibc.

> My machine architecture is i686 (output of uname -m). 

I think you may be confusing things - to build uClibc packages on an
i686 machine that will run on i386 machine, you don't need config.site.

The experimental uClibc support in emdebian-tools uses an existing
toolchain (cross building toolchain if necessary) and simply "bolts-on"
uClibc support to that toolchain.

This snippet gives you your proper architecture string:

$ perl -e '$u="i486-linux-gnu"; $u =~ s/([[:alnum:]]*)-([[:alnum:]]*)-gnu(.*)/$1-$2-uclibc$3/; print "$u\n";'

The value to pass to $u is the value from:
$ dpkg-architecture -ai386 -qDEB_HOST_GNU_TYPE

Take a look at the source code for emchain in current SVN for


> My problem is; when  I run the configure script (dpkg-1.14.15), I get the 
> following warnings; 
> configure: loading site script /usr/share/config.site
> checking build system type... (cached) i686-anchor-linux-uclibc
> checking host system type... (cached) i686-anchor-linux-uclibc
> checking target system type... (cached) i686-anchor-linux-uclibc

That is plain wrong, sorry.

Call ./configure with:
--build=i486-linux-gnu --host=i486-linux-uclibc

(Just don't use config.site to do it.)

With a correctly setup uClibc environment using emchain to munge the gcc
specs files, that would be all you need. No config.site.

> What should I add to the ostable, triplettable, and cputable files to get 
> rid of the above warnings?

Nothing. The warnings, AFAICT are correct, your original approach seems

Neil Williams <codehelp@debian.org>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: