Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230343 - avr-libc needs headers-only support
Summary: avr-libc needs headers-only support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 245004 245619 277642 280118 300356 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-01 13:38 UTC by Brian Dolbec
Modified: 2010-01-10 22:22 UTC (History)
13 users (show)

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


Attachments
avr-libc-1.6.2.ebuild (avr-libc-1.6.2.ebuild,1.99 KB, text/plain)
2008-11-04 09:04 UTC, Sven
Details
avr-libc-1.6.2-r1.ebuild (avr-libc-1.6.2-r1.ebuild,1.97 KB, text/plain)
2008-11-04 09:05 UTC, Sven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Dolbec (RETIRED) gentoo-dev 2008-07-01 13:38:56 UTC
this latest version of crossdev is broken due to avr-libc ebuild requiring an avr-gcc version being installed.  crossdev now trys to emerge the cross-avr-libc-headers before gcc so it fails since gcc is not yet installed.

Checking the logs produced it tells you to use "crossdev -t avr" to install the toolchain which was the exact command given in the first place.

And so far trying to manually emerge cross-avr/gcc fails for different reasons for every version I've tried so far.


Reproducible: Always

Steps to Reproduce:
1.crossdev -t avr
2.
3.

Actual Results:  
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...                                                                            [ ok ]
 * Log: /var/log/portage/cross-avr-binutils.log
 * Emerging cross-binutils ...                                                                                                                   [ ok ]
 * Log: /var/log/portage/cross-avr-avr-libc-headers.log
 * Emerging cross-avr-libc-headers ...

 * avr-libc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-avr-info.log
 * /var/log/portage/cross-avr-avr-libc-headers.log
big_squirt portage # 


Expected Results:  
a crossdev toolchain installed

this version of crossdev would only work if a toolchain was already installed.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2008-07-01 23:50:10 UTC
Well a workaround for now is to edit /usr/bin/crossdev and change line 334 and change WITH_DEF_HEADERS="yes" to WITH_DEF_HEADERS="no"

especially since vapier has now hardmasked all the cross-avr/gcc's that need the headers anyway.
Comment 2 hlg 2008-08-23 08:09:18 UTC
Changing WITH_DEF_HEADERS leads me directly to bug #231098, still unresolved.
Comment 4 Sandro Bonazzola 2008-10-28 18:58:18 UTC
It doesn't seems fixed to me for avr-libc:
cat /var/log/portage/cross-avr-avr-libc-headers.log

>>> Emerging (1 of 1) cross-avr/avr-libc-1.6.2
 * avr-libc-1.6.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                [ ok ]
 * avr-libc-manpages-1.6.2.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...       [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * Checking for avr-gcc ...
  [ !! ]
 * 
 * Failed to locate 'avr-gcc' in $PATH. You can install an AVR toolchain using:
 * $ crossdev -t avr
 * 
 * 
 * ERROR: cross-avr/avr-libc-1.6.2 failed.
 * Call stack:
 * ebuild.sh, line   49:  Called pkg_setup
 * avr-libc-1.6.2.ebuild, line   40:  Called die
 * The specific snippet of code:
 * die "AVR toolchain not found"
 * The die message:
 * AVR toolchain not found
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/cross-avr:avr-libc-1.6.2:20081028-185317.log'.
 * The ebuild environment file is located at '/var/tmp/cross/avr/portage/cross-avr/avr-libc-1.6.2/temp/die.env'.
 * This ebuild is from an overlay: '/usr/local/overlays/portage/'
 * 


and it comes from:
# $Header: /var/cvsroot/gentoo-x86/dev-embedded/avr-libc/avr-libc-1.6.2.ebuild,v 1.2 2008/10/27 06:57:47 vapier Exp $
Comment 5 Sven 2008-10-31 14:57:02 UTC
I have the same problem and opened a new bug. It's bug 245004.
Comment 6 Iain Buchanan 2008-11-01 04:57:40 UTC
(In reply to comment #5)
> I have the same problem and opened a new bug. It's bug 245004.

If you have the same issue as this bug, and the fixes posted here don't work for you, then reopen this bug, not a new one!

resync and see if the bug still exists.
Comment 7 SpanKY gentoo-dev 2008-11-01 06:22:16 UTC
*** Bug 245004 has been marked as a duplicate of this bug. ***
Comment 8 Sven 2008-11-01 08:24:55 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I have the same problem and opened a new bug. It's bug 245004.
> 
> If you have the same issue as this bug, and the fixes posted here don't work
> for you, then reopen this bug, not a new one!

I can NOT reopen this bug, because i'm not the reporter.
So that's why i kind of have to report a new bug. Anyway: now the new one is marked as a duplicate, and this one is still closed.

> resync and see if the bug still exists.

i synced multiple times during the last days, no improvement.

And changing WITH_DEF_HEADERS to "no" is just a workaround, for the time things don't work out of the box. It's a real sollution, so i really don't consider this bug as resolved fixed.
Comment 9 Sandro Bonazzola 2008-11-02 11:04:33 UTC
(In reply to comment #8)

> I can NOT reopen this bug, because i'm not the reporter.

Maybe this should be fixed in Gentoo bugzilla if you don't want duplicate bugs.

> So that's why i kind of have to report a new bug. Anyway: now the new one is
> marked as a duplicate, and this one is still closed.

Please Mr. Dolbec or toolchain team reopen this bug. It is not fixed for at least two people here.

> > resync and see if the bug still exists.
> 
> i synced multiple times during the last days, no improvement.

Same here.

> And changing WITH_DEF_HEADERS to "no" is just a workaround, for the time things
> don't work out of the box. It's a real sollution, so i really don't consider
> this bug as resolved fixed.

I agree, this is not fixed.
Comment 10 SpanKY gentoo-dev 2008-11-02 11:08:11 UTC
looks like no one ever added headers support to the avr-libc ebuild.  someone should submit a patch.
Comment 11 Sven 2008-11-02 11:53:30 UTC
(In reply to comment #10)
> looks like no one ever added headers support to the avr-libc ebuild.  someone
> should submit a patch.

I really need a working "crossdev -t avr" so i'll try my very best to do this job.

Anyway: I need some point to start from, because i only have a very rough idea of what is needed. Is there some other libc for some other system that already implements some "headers only" logic?
Comment 12 SpanKY gentoo-dev 2008-11-02 12:50:08 UTC
the ebuild part doesnt matter terribly much.  you have to figure out how to get avr-libc to only install headers and do so with out a cross-compiler.

you figure out that part and i can do the magic glue to work it into crossdev
Comment 13 Sven 2008-11-03 23:05:24 UTC
(In reply to comment #12)
> the ebuild part doesnt matter terribly much.  you have to figure out how to get
> avr-libc to only install headers and do so with out a cross-compiler.
> 
> you figure out that part and i can do the magic glue to work it into crossdev

I asked the developers of avr-libc. Many on the devel-mailinglist argue, that avr-gcc doesn't need any libc headers and that the correct ordner of bootstrapping a avr toolchain is simply:

- binutils
- avr-gcc
- avr-libc

Knowing that, i could modify the avr-libc ebuild so that it installs nothing if crosscompile_opts_headers-only is enabled.

Installing headers only in a clean way is very hard. I'm sure, the avr-libc people won't add support for that and modifying the automake/autoconf-stuff is a hard job.
Actually, the Makefiles in the include subdir only do a little sed magic - nothing else, so it might be easier to do that by hand, but it might break with next release already.

So what to do?
Comment 14 Sven 2008-11-04 09:03:13 UTC
Following the advice of the avr-libc developers, i changed the ebuild of avr-libc to do basically NOTHING if crosscompile_opts_headers-only is enabled.

Then, afterwards, i saw the "--without-headers" parameter of crossdev. So i also fixed the advice in avr-libc's ebuild to
  "please run crossdev --without-headers -t avr"
instead of
  "please run crossdev -t avr".

The parameter --without-headers should do the trick too, but i recommend to patch avr-libc's ebuild anyway, so that it does either:

- nothing, when crosscompile_opts_headers-only is enabled
- tell the user to run "crossdev --without-headers" is crosscompile_opts_headers-only is enabled

I will attach two ebuilds.
Comment 15 Sven 2008-11-04 09:04:25 UTC
Created attachment 170699 [details]
avr-libc-1.6.2.ebuild

ebuild that does nothing when crosscompile_opts_headers-only is enabled.
Comment 16 Sven 2008-11-04 09:05:15 UTC
Created attachment 170701 [details]
avr-libc-1.6.2-r1.ebuild

ebuild that tells the user to run crossdev with --without-headers if crosscompile_opts_headers-only is enabled.
Comment 17 Sven 2008-11-04 09:22:36 UTC
Just tested "crossdev --without-headers -S -s4 -t avr".

Now, I even have an avr-g++. Sweet!
Comment 18 SpanKY gentoo-dev 2008-11-05 08:49:13 UTC
*** Bug 245619 has been marked as a duplicate of this bug. ***
Comment 19 Daniel Willmann 2008-11-25 22:53:23 UTC
It would be great to at least have a heads up on this when emerging avr-libc with crosscompile_opts_headers-only.
Comment 20 Sven 2008-11-25 23:11:47 UTC
(In reply to comment #19)
> It would be great to at least have a heads up on this when emerging avr-libc
> with crosscompile_opts_headers-only.

Use "crossdev --without-headers". That does the trick.

Building an avr toolchain will never require some "headers only" step.
Comment 21 pvint 2009-01-20 19:28:14 UTC
I had this trouble as well with:
crossdev-0.9.18-r10 and cross-avr/avr-libc-1.6.2
Following the notes here I did:
 crossdev --without-headers -t avr
And everything runs without a hitch. 

Thanks all for the info.
Comment 22 Charles Rincheval 2009-02-03 09:19:13 UTC
I had the same problem and now, with --without-headers parameter it's done !
Thanks !

Comment 23 SpanKY gentoo-dev 2009-02-15 23:42:39 UTC
set default to --without-headers for avr targets

http://sources.gentoo.org/sys-devel/crossdev/files/crossdev?r1=1.109&r2=1.110
Comment 24 Federico Ferri (RETIRED) gentoo-dev 2009-08-03 00:13:06 UTC
*** Bug 280118 has been marked as a duplicate of this bug. ***
Comment 25 SpanKY gentoo-dev 2009-12-09 22:53:28 UTC
*** Bug 277642 has been marked as a duplicate of this bug. ***
Comment 26 SpanKY gentoo-dev 2010-01-10 22:22:03 UTC
*** Bug 300356 has been marked as a duplicate of this bug. ***