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.
http://lists.debian.org/debian-embedded/
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
suffix.
> 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.
#
ac_cv_c_bigendian=no
ac_cv_c_char_unsigned=no
ac_cv_sizeof_long_long=8
ac_cv_sizeof_unsigned_long_long=8
ac_cv_sizeof_long=4
ac_cv_sizeof_unsigned_long=4
ac_cv_sizeof_int=4
ac_cv_sizeof_unsigned_int=4
ac_cv_sizeof_short=2
ac_cv_sizeof_unsigned_short=2
ac_cv_sizeof_short=2
ac_cv_sizeof_unsigned_short=2
ac_cv_sizeof_float=4
ac_cv_sizeof_double=8
ac_cv_sizeof_long_double=12
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
";'
i486-linux-uclibc
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
emdebian-tools:
http://buildd.emdebian.org/svn/browser/current/host/trunk/emdebian-tools/trunk/emchain#L698
> 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
wrong.
--
Neil Williams <codehelp@debian.org>
|