# Problem: emerge system

## hama

```

# emerge system

!!! Your current profile is deprecated and not supported anymore.

!!! Please upgrade to the following profile if possible:

        hardened-x86-2004.0

Calculating system dependencies ...done!

>>> emerge (1 of 1) net-misc/openssh-3.7.1_p2-r2 to /

>>> Downloading http://gentoo.oregonstate.edu/distfiles/openssh-3.7.1p2.tar.gz

--12:07:14--  http://gentoo.oregonstate.edu/distfiles/openssh-3.7.1p2.tar.gz

           => `/usr/portage/distfiles/openssh-3.7.1p2.tar.gz'

Resolving gentoo.oregonstate.edu... 128.193.0.3

Connecting to gentoo.oregonstate.edu[128.193.0.3]:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 792,280 [application/x-gzip]

100%[====================================================================>] 792,280       42.25K/s    ETA 00:00

12:07:40 (30.38 KB/s) - `/usr/portage/distfiles/openssh-3.7.1p2.tar.gz' saved [792280/792280]

>>> md5 src_uri ;-) openssh-3.7.1p2.tar.gz

>>> Unpacking source...

>>> Unpacking openssh-3.7.1p2.tar.gz to /var/tmp/portage/openssh-3.7.1_p2-r2/work

 * Applying openssh-3.7.1_p2-kerberos.patch...                                                            [ ok ]

>>> Source unpacked.

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 for i686-pc-linux-gnu-gcc... 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 gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

checking whether byte ordering is bigendian... no

checking for gawk... gawk

checking how to run the C preprocessor... gcc -E

checking for i686-pc-linux-gnu-ranlib... no

checking for ranlib... ranlib

checking for a BSD-compatible install... /bin/install -c

checking for ar... /usr/bin/ar

checking for perl5... no

checking for perl... /usr/bin/perl

checking for sed... /bin/sed

checking for ent... no

checking for bash... /bin/bash

checking for ksh... (cached) /bin/bash

checking for sh... (cached) /bin/bash

checking for sh... /bin/sh

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 login... /bin/login

checking for inline... inline

checking compiler and flags for sanity... configure: error: cannot run test program while cross compiling

See `config.log' for more details.

!!! ERROR: net-misc/openssh-3.7.1_p2-r2 failed.

!!! Function src_compile, Line 101, Exitcode 1

!!! bad configure

```

----------

## rc

hi,

had the same problem after an "emerge --update --upgradonly system".

also this error apeared while emerging other packages (e.g. xmms).

i got it work again with emerging gcc.

but i dont like that solution much cause emerging gcc takes some time.

please let me know if someone else found a better solution

rc

----------

## hama

 *rc wrote:*   

> 
> 
> i got it work again with emerging gcc.
> 
> 

 

dosn't work here  :Sad: 

----------

## rc

hmm strange thing had exactly the same error message plus all other messages

identical to the ones you posted.

i just made an

```
emerge gcc
```

and everything worked.

if this wont help, i dont have a clue how to solve your problem.

i hope someone more experienced can help here.

so far all i can do is wishing you good luck with solving that problem

rc

----------

## Ateo

Have you looked at config.log as it's stated? The config log will tell you a lot. It seems you are just randomly picking packages that might be broken. Check the log. It's location --> /var/tmp/portage/openssh-<VERSION>/work/

----------

## dacoool

I have the same error, while emerging system.

The cross-compiler causes an error.

I have posted this problem in the german gentoo forum, but they are not the best...

I'll try your way, emerging gcc again...

we'll see

----------

## imbezol

Did you download the 2004.0 pie-ssp stage file? That is for SELinux. I would recommend starting with the normal stage tarball if you didn't mean to use that. Since the new version is not on most of the mirrors yet you may have to wait a day or so.

----------

## dumdey

Hi,

i have the same problem, and a 'emerge gcc' DOESN'T solve it...    :Crying or Very sad: 

Any new information?

----------

## Painkiller

 *imbezol wrote:*   

> Did you download the 2004.0 pie-ssp stage file? That is for SELinux. I would recommend starting with the normal stage tarball if you didn't mean to use that. Since the new version is not on most of the mirrors yet you may have to wait a day or so.

 

hmmm strange, i believe that this is my problem because i remember that yesterday in this route http://gentoo.oregonstate.edu/releases/x86/2004.0/stages/x86/   was a file called in that way, today there's something diferent..

----------

## dumdey

Hi,

two things i've found:

1. The problem i've had was, i've tried to do a new installation with the new Live-CD (install-x86-universal-2004.0.iso) and it worked until the 'emerge system' part - at thie point i've had the same problem as 'hama'. Now i've done it the second time and it works! Why? I'm not shure   :Crying or Very sad: 

 - i didn't used the portage-something.tar.bz2, i've done a 'emerge sync'

2. a 'ls -l /etc' shows 

```

lrwxrwxrwx    1 root     root           43 Mar  3 16:02 make.profile -> ../usr/portage/profiles/hardened-x86-2004.0

```

but i don't want anything hardened and if i do here a 'emerge -pu system' it shows

```

livecd / #  emerge -puv system

These are the packages that I would merge, in order:

Calculating system dependencies ...done!

[ebuild     U ] sys-devel/hardened-gcc-3.3.2.1-r2 [2.4.5]  52 kB

[ebuild     U ] sys-devel/autoconf-2.58-r1 [2.58]  1,336 kB

[ebuild     U ] net-misc/openssh-3.7.1_p2-r2 [3.7.1_p2-r1] -X509 -chroot -ipv6 -

kerberos +pam -(selinux) -skey -static +tcpd  896 kB

Total size of downloads: 2,285 kB

```

If i remove this link and do a 'cd /etc; ln -s ../usr/portage/profiles/default-x86-2004.0 make.profile'

then i see

```

livecd etc #  emerge -puv system

These are the packages that I would merge, in order:

Calculating system dependencies ...done!

[ebuild     U ] sys-devel/autoconf-2.58-r1 [2.58]  1,336 kB

[ebuild     U ] net-misc/openssh-3.7.1_p2-r2 [3.7.1_p2-r1] -X509 -chroot -ipv6 -

kerberos +pam -(selinux) -skey -static +tcpd  896 kB

Total size of downloads: 2,233 kB

```

Maybe the 'hardened-gcc' is the problem???

----------

## To

If you installed your system from stage 1 using hardened, I think that now with the new profle you will need to update/replace some packages like gcc, baselayout etc.

Tó

----------

## dumdey

Also the same for stage3 (i used stage3)? But could it be that the 'hardened-gcc'-package is the problem? And why is the default-profile the hardened?   :Question: 

----------

## To

Sorry I wasn't able to explain. If(?) you used any stage from hardened you will have a dif layout and several packages changed. Modifying your profile will required you to change those packages to your new profile. But that is only if you really used hardened in first place.

Tó

----------

## dumdey

But it looks like that the hardened-profile is the default... 

And this is not clear to me... where is it documented that the default-profile is the hardened?

Anyway, it works for me, but now i have a problem with the 2.6.3 kernel   :Laughing: 

regards, harry

----------

## Painkiller

 *dumdey wrote:*   

> But it looks like that the hardened-profile is the default... 
> 
> And this is not clear to me... where is it documented that the default-profile is the hardened?
> 
> Anyway, it works for me, but now i have a problem with the 2.6.3 kernel  
> ...

 

my profile shows that is hardened too

why this???

what can i do for resolv this/???

should i must begin again???

the emerge gcc give me another error...

----------

## dumdey

hi painkiller,

i'm not sure if you have to begin again   :Rolling Eyes: 

but you can solve it this way:

```

cd /etc

rm make.profile

ln -s ../usr/portage/profiles/default-x86-2004.0 make.profile

```

harry

----------

## Painkiller

 *dumdey wrote:*   

> hi painkiller,
> 
> i'm not sure if you have to begin again  
> 
> but you can solve it this way:
> ...

 

I just begun again, but thanx for the help.

i believe that yesterday i downloaded a strange stage...so let me see, if i receive the error again i will use your help...

----------

## stephen.austin

Hi,

I'm getting that same error about "cannot run test program while cross compiling". Looking at my system, it does indeed appear that make.profile is pointing to a hardened version. The name of the stage tarball that I downloaded is this: "stage1-x86-pie-ssp-2004.0.tar.bz2", this is the hardened version? When are we likely to have the standard version available on the mirrors and what is the standard version likely to be called? (Is there actually a mirror already that has it on?)

Cheers,

Steve

----------

## Painkiller

 *stephen.austin wrote:*   

> Hi,
> 
> I'm getting that same error about "cannot run test program while cross compiling". Looking at my system, it does indeed appear that make.profile is pointing to a hardened version. The name of the stage tarball that I downloaded is this: "stage1-x86-pie-ssp-2004.0.tar.bz2", this is the hardened version? When are we likely to have the standard version available on the mirrors and what is the standard version likely to be called? (Is there actually a mirror already that has it on?)
> 
> Cheers,
> ...

 

yes indead, that is the hardened version...

Download the normal version from here

http://gentoo.oregonstate.edu/releases/x86/2004.0/stages/x86/

----------

## praio

I've tried yo install Gentoo 2004 from http://gentoo.oregonstate.edu/experimental/x86/livecd/x86/livecd-2004.0-x86-selinux-nostages-20040227.iso and i'm getting "cannot run test program while cross compiling" during emerge system (bash).

I used a x86 stage1 but can't remember what because the gentoo.oregonstate has changed radically in the last two days.

Now I'm trying http://gentoo.oregonstate.edu/releases/x86/2004.0/livecd/universal/install-x86-minimal-2004.0.iso and http://gentoo.oregonstate.edu/releases/hardened/2004.0/stages/pentium3/stage1-pentium3-pie-ssp-2004.0.tar.bz2 .

I'm bootstrapping now and everything's fine but i can see "if a cross compiler is detected the cross compile mode will be used" during the compilation and so I think "cannot run test program while cross compiling" is going to happen again.

I want to install hardened Gentoo!  :Twisted Evil: 

Is this problem related with hardened stages or is happening even with http://gentoo.oregonstate.edu/releases/x86/2004.0/stages/x86/stage1-x86-20040218.tar.bz2 regular stage?

----------

## praio

The hardened stages are now in releases but there is no dedicated liveCD.

It's correct to use the standard 2004.0 liveCD to run the hardened stages?

----------

## praio

I have finished the bootstrap and instead of emerge system I tried emerge bash .

Everything was ok.

Next I have made emerge system and had "cannot run test program while cross compiling.   :Sad: 

I think the problem is in the hardened-gcc , so I did 

```
emerge unmerge hardened-gcc

etc-update
```

I updated the configuration completely and then 

```
emerge hardened-gcc

etc-update
```

But nothing was left to update.

Next tried

```
emerge system
```

Now is emerging and everything seems to work

----------

## Painkiller

I begun the instalation again.

I bootstraped yesterday and emerged system today, right now i'm emerging gentoo-dev-sources..

: - )

----------

## praio

My Gentoo works!!

Probably the problem is in hardened-gcc portage script

----------

## Painkiller

I finished my installation this morning..

Gentoo is flying like a charm....

rightnow i'm emerginf Xfree.

i don't know why emerge doesn't downloaded because i set in the USE Variable yesterday....

----------

