Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 204071 - crossdev -t avr Emerging cross-gcc-stage1 fails
Summary: crossdev -t avr Emerging cross-gcc-stage1 fails
Status: VERIFIED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-02 16:23 UTC by Steven De Bock
Modified: 2008-01-06 12:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
cross-avr-info.log (cross-avr-info.log,9.89 KB, text/plain)
2008-01-02 16:24 UTC, Steven De Bock
Details
cross-avr-gcc-stage1.log (cross-avr-gcc-stage1.log,520.00 KB, text/plain)
2008-01-02 16:25 UTC, Steven De Bock
Details
emerge.info (emerge.info,3.55 KB, text/plain)
2008-01-02 16:27 UTC, Steven De Bock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven De Bock 2008-01-02 16:23:52 UTC
After a sudden error when compiling my projects (gcc-config error: Could not run/locate "avr-gcc"), I decided to reinstall the avr-gcc compiler using "crossdev -t avr", however it fails during "Emerging cross-gcc-stage1 ..."

If someone might now the solution to the "gcc-config error: Could not run/locate "avr-gcc"" or have a clue about what might have broken it, I would be as happy as well ;)

However I think the crossdev command should work properly... Attaching logs in a second

Reproducible: Always

Steps to Reproduce:
1. crossdev -t avr
Comment 1 Steven De Bock 2008-01-02 16:24:54 UTC
Created attachment 139879 [details]
cross-avr-info.log

added cross-avr-info.log
Comment 2 Steven De Bock 2008-01-02 16:25:52 UTC
Created attachment 139880 [details]
cross-avr-gcc-stage1.log

Added cross-avr-gcc-stage1.log
Comment 3 Steven De Bock 2008-01-02 16:27:33 UTC
Created attachment 139882 [details]
emerge.info

Added emerge.info
Comment 4 SpanKY gentoo-dev 2008-01-02 17:21:25 UTC
run `gcc-config -f` on your existing avr target

you're trying to build gcc-3.3.6 ... that is not supported for avr
Comment 5 Steven De Bock 2008-01-05 13:38:22 UTC
(In reply to comment #4)
> run `gcc-config -f` on your existing avr target
> 
> you're trying to build gcc-3.3.6 ... that is not supported for avr
> 

Thank you for your quick response, however I'm still quite at a loss here. I tried running "gcc-config -f i686-pc-linux-gnu-gcc-4.1.2", however I got the following error:  "gcc-config: Could not locate 'i686-pc-linux-gnu-gcc-4.1.2' in '/etc/env.d/gcc/' !"
However the file /etc/env.d/gcc/i686-pc-linux-gnu-gcc-4.1.2 clearly exists on my system. I'll be attaching it shortly, together with my make.conf.
Comment 6 Steven De Bock 2008-01-05 13:45:11 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > run `gcc-config -f` on your existing avr target
> > 
> > you're trying to build gcc-3.3.6 ... that is not supported for avr
> > 
> 
> Thank you for your quick response, however I'm still quite at a loss here. I
> tried running "gcc-config -f i686-pc-linux-gnu-gcc-4.1.2", however I got the
> following error:  "gcc-config: Could not locate 'i686-pc-linux-gnu-gcc-4.1.2'
> in '/etc/env.d/gcc/' !"
> However the file /etc/env.d/gcc/i686-pc-linux-gnu-gcc-4.1.2 clearly exists on
> my system. I'll be attaching it shortly, together with my make.conf.

Ok, while attaching the file I noticed a small subtlety in the filename: there is a /etc/env.d/gcc/i686-pc-linux-gnu-4.1.2 instead of the required /etc/env.d/gcc/i686-pc-linux-gnu-gcc-4.1.2 by the gcc-config. Notice the gcc missing in the filename. I suppose this isn't correct behaviour? Any ideas?

So for now I'm not attaching the mentionned files.
Comment 7 Steven De Bock 2008-01-05 14:01:48 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > run `gcc-config -f` on your existing avr target
> > > 
> > > you're trying to build gcc-3.3.6 ... that is not supported for avr
> > > 
> > 
> > Thank you for your quick response, however I'm still quite at a loss here. I
> > tried running "gcc-config -f i686-pc-linux-gnu-gcc-4.1.2", however I got the
> > following error:  "gcc-config: Could not locate 'i686-pc-linux-gnu-gcc-4.1.2'
> > in '/etc/env.d/gcc/' !"
> > However the file /etc/env.d/gcc/i686-pc-linux-gnu-gcc-4.1.2 clearly exists on
> > my system. I'll be attaching it shortly, together with my make.conf.
> 
> Ok, while attaching the file I noticed a small subtlety in the filename: there
> is a /etc/env.d/gcc/i686-pc-linux-gnu-4.1.2 instead of the required
> /etc/env.d/gcc/i686-pc-linux-gnu-gcc-4.1.2 by the gcc-config. Notice the gcc
> missing in the filename. I suppose this isn't correct behaviour? Any ideas?
> 
> So for now I'm not attaching the mentionned files.
> 

I made a mistake running gcc-config -f, corrected it to "gcc-config -f /etc/env.d/gcc/i686-pc-linux-gnu-4.1.2", which ran smoothly. 

However, the crossdev -t avr still didn't succeed. So I think this bug remains open?

If gcc-3.3.6 is not supported by avr than why is crossdev trying to emerge cross-avr/gcc-3.3.6-r1?
Comment 8 SpanKY gentoo-dev 2008-01-05 16:13:38 UTC
crossdev is not really involved in package selection ... it is merely a wrapper that runs `emerge`

you will have to consult your configuration setup to see why emerge is selecting 3.3.6 instead of something newer

you can test outside of crossdev by doing:
emerge cross-avr/gcc -pv
emerge ~cross-avr/gcc-3.4.6 -pv
emerge ~cross-avr/gcc-4.1.2 -pv
Comment 9 Steven De Bock 2008-01-05 17:12:49 UTC
(In reply to comment #8)
> crossdev is not really involved in package selection ... it is merely a wrapper
> that runs `emerge`
> 
> you will have to consult your configuration setup to see why emerge is
> selecting 3.3.6 instead of something newer
> 
> you can test outside of crossdev by doing:
> emerge cross-avr/gcc -pv
> emerge ~cross-avr/gcc-3.4.6 -pv
> emerge ~cross-avr/gcc-4.1.2 -pv
> 

I think I'm missing something... I resynced my tree a moment ago however cross-avr/gcc is nowhere to be found :( 

---
emerge cross-avr/gcc -pv

These are the packages that would be merged, in order:

Calculating dependencies |
emerge: there are no ebuilds to satisfy "cross-avr/gcc".
---

Same goes for "emerge ~cross-avr/gcc-3.4.6 -pv" and "emerge ~cross-avr/gcc-4.1.2 -pv"

Any idea?
Comment 10 Steven De Bock 2008-01-05 17:23:30 UTC
Follow-up information:

It seems that whenever I run "crossdev -t avr" a directory /usr/portage/local/cross-avr is created. This directory contains the following symlinks:

lrwxrwxrwx  1 root root   34 Jan  5 18:12 avr-libc -> /usr/portage/dev-embedded/avr-libc
lrwxrwxrwx  1 root root   31 Jan  5 18:12 binutils -> /usr/portage/sys-devel/binutils
lrwxrwxrwx  1 root root   26 Jan  5 18:12 gcc -> /usr/portage/sys-devel/gcc
lrwxrwxrwx  1 root root   26 Jan  5 18:12 gdb -> /usr/portage/sys-devel/gdb

I'm not sure whether this is relevant information?

---

I would almost suspect a missing cross-avr/gcc in the tree? Is this possible? cross-avr is not listed on http://sources.catmur.co.uk/viewvc/svn/gentoo/tree/
Comment 11 SpanKY gentoo-dev 2008-01-05 17:46:46 UTC
there isnt supposed to be cross-* in the tree ... crossdev will create the symlinked dirs for you

so what you see is 100% what you should be seeing
Comment 12 Steven De Bock 2008-01-05 18:05:43 UTC
I hope you don(In reply to comment #11)
> there isnt supposed to be cross-* in the tree ... crossdev will create the
> symlinked dirs for you
> 
> so what you see is 100% what you should be seeing
> 

I hope you don't mind me reopening this bug as it's clearly not resolved ;)

If you have any ideas I'll gladly try them out. 
In the mean time I'll try to have a look at and understand the crossdev script.

Once more, thanks for your effort!
Comment 13 Steven De Bock 2008-01-05 18:57:51 UTC
Some more usefull information

Ok, so after the symlinks got restored(In reply to comment #11)
> there isnt supposed to be cross-* in the tree ... crossdev will create the
> symlinked dirs for you
> 
> so what you see is 100% what you should be seeing
> 

So after the symlinks got restored with crossdev I got some results from the emerge:
> emerge cross-avr/gcc -pv
[ebuild  NS   ] cross-avr/gcc-3.3.6-r1  USE="nls nocxx (-altivec) -bootstrap -boundschecking -build -doc -fortran -gcj -gtk -hardened -ip28 -ip32r10k (-multilib) -multislot (-n32) (-n64) -nopie -nossp -objc -test -vanilla" 0 kB [1]

Total: 1 package (1 in new slot), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/portage/local

> emerge ~cross-avr/gcc-3.4.6 -pv
All ebuilds that could satisfy "~cross-avr/gcc-3.4.6" have been masked.

> emerge ~cross-avr/gcc-4.1.2 -pv
All ebuilds that could satisfy "~cross-avr/gcc-4.1.2" have been masked.

In /etc/portage/package.mask/cross-avr however, I found >cross-avr/gcc-3.4.6. So I removed this line. "emerge -pv cross-avr/gcc" does a better job:

[ebuild  NS   ] cross-avr/gcc-4.2.2  USE="nls nocxx openmp (-altivec) -bootstrap -build -doc -fortran -gcj -gtk -hardened -ip28 -ip32r10k -mudflap (-multilib) -multislot (-n32) (-n64) -objc -objc++ -objc-gc -test -vanilla" 43,149 kB [1]

However, "crossdev -t avr" sets that line, meaning I can't get a newer package version than cross-avr/gcc-3.3.6.

Any idea?
Comment 14 SpanKY gentoo-dev 2008-01-05 19:12:08 UTC
you're probably using an old crossdev then ... make sure you're running the latest version and then do:
crossdev -C avr
crossdev -t avr

you should not have that cross-avr file in package.mask anymore
Comment 15 Steven De Bock 2008-01-06 00:01:49 UTC
Thank(In reply to comment #14)
> you're probably using an old crossdev then ... make sure you're running the
> latest version and then do:
> crossdev -C avr
> crossdev -t avr
> 
> you should not have that cross-avr file in package.mask anymore
> 

crossdev -C avr, crossdev -t avr had no effect I had to explicitly upgrade crossdev 

*  sys-devel/crossdev
      Latest version available: 0.9.18-r6
      Latest version installed: 0.9.18-r1

Upgrade to package 0.9.18-r6 made the package.mask/cross-avr file in it's entirety disappear. 

So instead of making crossdev only a revision update, I would propose to rename the package version to 0.9.19?

For the time being everything is merging, I'll post the results tomorrow...
Comment 16 SpanKY gentoo-dev 2008-01-06 00:18:29 UTC
whether it's 0.9.18-r1 or 0.9.18-r6 or 0.9.19 or 123456, it woulddnt have made a difference to you ... portage would have (or would not have) selected a newer version the same way
Comment 17 Steven De Bock 2008-01-06 08:43:39 UTC
(In reply to comment #16)
> whether it's 0.9.18-r1 or 0.9.18-r6 or 0.9.19 or 123456, it woulddnt have made
> a difference to you ... portage would have (or would not have) selected a newer
> version the same way
> 
Thank you for help!

I've marked the bug as closed as everything went fine. I've got a fresh cross-avr/gcc down here :)

Do you mind to elaborate why portage wouldn't get me a newer version of crossdev during updates?
Comment 18 SpanKY gentoo-dev 2008-01-06 09:48:22 UTC
i imagine you normally upgrade by doing `emerge world -up` ... this will only look for upgrades to packages listed in the "world" file.  if crossdev is not in that world file, then it would not have been checked.

but every package the user does `emerge` on should be added to the world file automatically, so how you managed to get crossdev installed w/out it being in the world file is a mystery.

you can run `man 5 portage` and read more about the world file in there.

HTH
Comment 19 Steven De Bock 2008-01-06 10:21:33 UTC
(In reply to comment #18)
> i imagine you normally upgrade by doing `emerge world -up` ... this will only
> look for upgrades to packages listed in the "world" file.  if crossdev is not
> in that world file, then it would not have been checked.
> 
> but every package the user does `emerge` on should be added to the world file
> automatically, so how you managed to get crossdev installed w/out it being in
> the world file is a mystery.
> 
> you can run `man 5 portage` and read more about the world file in there.
> 
> HTH
> 

Thanks again for your time and patience, it certainly cleared out a lot. 

Though I'm quite puzzled myself how crossdev got missing from my world file. I'll see if I can find out what went wrong on that.
Comment 20 Steven De Bock 2008-01-06 12:51:59 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > i imagine you normally upgrade by doing `emerge world -up` ... this will only
> > look for upgrades to packages listed in the "world" file.  if crossdev is not
> > in that world file, then it would not have been checked.
> > 
> > but every package the user does `emerge` on should be added to the world file
> > automatically, so how you managed to get crossdev installed w/out it being in
> > the world file is a mystery.
> > 
> > you can run `man 5 portage` and read more about the world file in there.
> > 
> > HTH
> > 
> 
> Thanks again for your time and patience, it certainly cleared out a lot. 
> 
> Though I'm quite puzzled myself how crossdev got missing from my world file.
> I'll see if I can find out what went wrong on that.
> 

This is what went wrong: back in the days I firstly emerged avr-libc, however this ebuild emerges crossdev (DEPEND=">=sys-devel/crossdev-0.9.1" from avr-libc-1.4.6 ebuild). So that would explain why crossdev didn't get into my world file.

So what would be the right course of action cleaning this up? Patch the avr-libc-ebuild to 
- DEPEND=">=sys-devel/crossdev-0.9.1"
+ DEPEND=">=sys-devel/crossdev-0.9.18" 
? Or better just to remove the versioning information and make it:
- DEPEND=">=sys-devel/crossdev-0.9.1"
+ DEPEND="sys-devel/crossdev" 
? Wouldn't this automatically get the latest crossdev release? As I always emerge world with the --Deep option: "emerge -Dup world". This option should get the dependencies right if I'm not mistaken? (I overlooked you didn't include the deep flag in the emerge command)

Thanks