Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crossdev fails with target as avr [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Sun Aug 10, 2008 4:03 pm    Post subject: crossdev fails with target as avr [SOLVED] Reply with quote

Hello Everyone,

I seem to have run into a snag with crossdev and avr. I set up PORTDIR_OVERLAY="/usr/local/portage" in /etc/make.conf and ran command:
Code:
crossdev --without-headers -t avr

But it fails on cross-gcc-stage1, here is a snippet of the error log:
Code:
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/build/./gcc/xgcc -B/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/build/./gcc/ -B/usr/avr/bin/ -B/usr/avr/lib/ -isystem /usr/avr/include -isystem /usr/avr/sys-include -O2 -g -O2 -pipe -mmcu=avr35 -O2  -O2 -g -O2 -pipe   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -DDF=SF -Dinhibit_libc -mcall-prologues -Os -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc  -I. -I. -I../../.././gcc -I/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc -I/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/. -I/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc -I/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../include   -o _udivmodhi4.o -MT _udivmodhi4.o -MD -MP -MF _udivmodhi4.dep -DL_udivmodhi4 -xassembler-with-cpp \
     -c /var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S: Assembler messages:
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:281: Error: illegal opcode movw for mcu avr3
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal opcode movw for mcu avr3
make[4]: *** [_mulsi3.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S: Assembler messages:
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:403: Error: illegal opcode movw for mcu avr3
/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:405: Error: illegal opcode movw for mcu avr3
make[4]: *** [_udivmodhi4.o] Error 1
make[4]: Leaving directory `/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/build/avr/avr35/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/build/avr/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/build/avr/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/build'
make: *** [all] Error 2
 *
 * ERROR: cross-avr/gcc-4.3.1-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4574:  Called toolchain_src_compile
 *             environment, line 5089:  Called gcc_src_compile
 *             environment, line 2933:  Called gcc_do_make
 *             environment, line 2763:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 *  The die message:
 *   emake failed with all
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 *

 * Messages for package cross-avr/gcc-4.3.1-r1:

 *
 * ERROR: cross-avr/gcc-4.3.1-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4574:  Called toolchain_src_compile
 *             environment, line 5089:  Called gcc_src_compile
 *             environment, line 2933:  Called gcc_do_make
 *             environment, line 2763:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 *  The die message:
 *   emake failed with all
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/avr/portage/cross-avr/gcc-4.3.1-r1/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 *

If you need more information please ask,the forum wouldn't let me post the entire log file as it was huge...I am not sure why it is failing, all I know is that I have version gcc 4.1.2 on my main system. Any help is greatly appreciated and thanks in advanced!


Last edited by roguetech on Fri Aug 29, 2008 5:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
roguetech
Tux's lil' helper
Tux's lil' helper


Joined: 13 Jan 2005
Posts: 82
Location: Canada

PostPosted: Sun Aug 10, 2008 5:30 pm    Post subject: Reply with quote

Well I tried setting gcc to the version that was installed on my system and that seemed to work:
Code:
crossdev --without-headers -t avr --g 4.1.2

I will have to test out the compiler later but I think it should work. Hope this helps anyone else who may have problems

PS:

I had to set a symlink as ldscripts for the avr target were not pointing to th correct location and the result error occured:
Code:
/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr4.x: No such file or directory

To fix the problem which seems to work, as stated in the gentoo bugs was to do the following:
Code:
ln -s /usr/i686-pc-linux-gnu/avr/lib/ldscripts/ /usr/libexec/gcc/avr/ldscripts
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum