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

Re: Problem about install cross compile tool on lenny



On Fri, 4 May 2007 21:17:09 +0800
"Kun Niu" <haoniukun@gmail.com> wrote:

> But still I encountered some kind of error as follow:
>
> shuang:~/.dpkg-cross# emsetup --verbose --simulate

emdebian-tools do not need to be run under sudo or as root except where
specifically indicated.

Running emdebian-tools (and therefore apt-cross) as root or under sudo
complicates the file management in ~/.dpkg-cross. To use emdebian-tools
or apt-cross as a user (the intended method) after running either as
root or under sudo, you may have to reset the permissions on all files
beneath ~/.dpkg-cross to your user ownership.

The general GNU/Linux rule applies: if at all possible avoid running
anything as root.

In line with this principle, emdebian-tools and apt-cross include code
specifically designed to avoid root usage unless absolutely essential.
The dependency on sudo exists because emdebian-tools and apt-cross will
use sudo for only those steps that require it, avoiding the problems of
running the entire script under sudo.

I'll add that to the manpage / docs too.

> shuang:~/.dpkg-cross# sudo apt-get install  binutils-arm-linux-gnu

The EmdebianQuickStart guide recommends letting emsetup perform the
installation - at this stage, you have only run emsetup with the
--simulate option so installing the toolchain with apt-get may (in
future) skip certain operations that emsetup would do alongside
installing the toolchain.

>From emsetup --help:
"If a compatible toolchain is already installed, emsetup does nothing. If
a toolchain is available for your host architecture to build the specified
target architecture, it will be installed for you using sudo."

i.e. run emsetup as a normal user, emsetup will then run sudo for you
(and prompt you to enter your sudo password if it is not cached).

Also, there is no point running sudo when already running as root - in
fact it could complicate some operations unnecessarily.

> The following packages have unmet dependencies.
>   gcc-4.1-arm-linux-gnu: Depends: libssp0 but it is not going to be installed
>   libc6-dev-arm-cross: Depends: libc6-arm-cross (= 2.3.6.ds1-8) but
> 2.5-4em1 is to be installed
> E: Broken packages

Ah, now I do know what's happened there.

apt-cross has gone behind your back and upgraded libc6-arm-cross when
it should have left it alone. It's a bug caused by the problems with
glibc in Debian described in the other email.

Try telling apt to get libc-arm-cross from the Emdebian testing repository:

$ sudo apt-get install libc6-arm-cross=2.3.6.ds1-8 libc6-dev-arm-cross=2.3.6.ds1-8

Ensure that is all on one line. Then install the Lenny toolchain from
the Emdebian testing repository.

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgp8QJ4pNyMje.pgp
Description: PGP signature


Reply to: