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
Created attachment 139879 [details] cross-avr-info.log added cross-avr-info.log
Created attachment 139880 [details] cross-avr-gcc-stage1.log Added cross-avr-gcc-stage1.log
Created attachment 139882 [details] emerge.info Added emerge.info
run `gcc-config -f` on your existing avr target you're trying to build gcc-3.3.6 ... that is not supported for avr
(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.
(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.
(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?
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
(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?
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/
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(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!
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?
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
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...
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
(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?
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
(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.
(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