Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 398817 - dev-embedded/avr-libc-1.8.0 - configure: cc1: error: unrecognized command line option '-m64'
Summary: dev-embedded/avr-libc-1.8.0 - configure: cc1: error: unrecognized command lin...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Embedded Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-13 22:35 UTC by Lukas Sandström
Modified: 2012-04-11 04:25 UTC (History)
2 users (show)

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


Attachments
config.log from failed emerge (config.log,19.84 KB, text/plain)
2012-01-13 22:36 UTC, Lukas Sandström
Details
failed build log (build.log,3.26 KB, text/plain)
2012-01-13 22:38 UTC, Lukas Sandström
Details
environment from failed emerge (environment,94.39 KB, text/plain)
2012-01-13 22:38 UTC, Lukas Sandström
Details
config.log from succsesful manual run with the same options (good.log,95.65 KB, text/plain)
2012-01-13 22:40 UTC, Lukas Sandström
Details
avr-libc-1.8.0-r1.ebuild (avr-libc-1.8.0-r1.ebuild,1.89 KB, text/plain)
2012-01-22 16:10 UTC, Lukas Sandström
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Sandström 2012-01-13 22:35:19 UTC
"emerge dev-embedded/avr-libc" fails complaining:

checking for suffix of object files... configure: error: in `/var/tmp/portage/dev-embedded/avr-libc-1.8.0/work/avr-libc-1.8.0':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

Running "./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=avr --target=avr --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking" manually in the ebuild work dir works. The error only happens when configure is run from the ebuild environment.


Reproducible: Always
Comment 1 Lukas Sandström 2012-01-13 22:36:52 UTC
Created attachment 298883 [details]
config.log from failed emerge
Comment 2 Lukas Sandström 2012-01-13 22:38:18 UTC
Created attachment 298885 [details]
failed build log
Comment 3 Lukas Sandström 2012-01-13 22:38:56 UTC
Created attachment 298889 [details]
environment from failed emerge
Comment 4 Lukas Sandström 2012-01-13 22:40:58 UTC
Created attachment 298891 [details]
config.log from succsesful manual run with the same options
Comment 5 Richard Kenney 2012-01-20 22:19:33 UTC
I can confirm that I have exactly the same issue.

This appears to be the -m64 compiler directive from the amd64 portage environment getting to the avr compiler.  Unsurprisingly the avr compiler is very confused by this.

I get the same error on previous versions (1.7.0, 1.7.1) which have previously built correctly.  It therefore seems to be due to a change in portage, not the avr-libc package.

the avr-libc package merges correctly on an x86 machine - which doesn't have the -m64 directive, and I can build manually from the portage compilation directory on the amd64 machine which has the problem.
Comment 6 Lukas Sandström 2012-01-22 16:10:49 UTC
Created attachment 299549 [details]
avr-libc-1.8.0-r1.ebuild

When ABI is set to amd64 portage will unconditionally append -m64 to
CFLAGS, which avr-gcc doesn't recognize as a valid option. Solve the
problem by setting ABI=avr in the ebuild.

I pushed the updated ebuild to git://gitorious.org/~luksan/gentoo-arduino/luksans-arduino.git
Comment 7 Richard Kenney 2012-01-22 17:57:03 UTC
Thanks very much, that works very well for me, the package now merges correctly and a couple of trial avr compiles were OK :-)

I don't know enough about the internals of portage (or gcc come to that) to have fixed it despite some trawling over the last couple of weeks.

Hopefully this is clear enough to get fixed by the package maintainer...
Comment 8 SpanKY gentoo-dev 2012-04-11 04:25:20 UTC
`crossdev avr` would set up your env correctly