avr-libc-2.0.0 not compiling - Error gcrt1.o fialed

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello...

 

I was trying to compile avr-libc-2.0.0 on a Debian Jessie machine but I'm getting this output:

 

Quote:

avr-gcc -DHAVE_CONFIG_H -I. -I../../../..  -I../../../../common -I../../../../include -I../../../../include  -I../../../../common -I../../../../include -I../../../../include -x assembler-with-cpp  -mmcu=atmega16hvbrevb  -DIOSYMFILE=\"iosym/atmega16hvbrevb.S\"   -MT gcrt1.o -MD -MP -MF .deps/gcrt1.Tpo -c -o gcrt1.o ../../../../crt1/gcrt1.S
In file included from ../../../../common/macros.inc:39:0,
                 from ../../../../crt1/gcrt1.S:40:
../../../../include/avr/io.h:581:6: warning: #warning "device type not defined" [-Wcpp]
 #    warning "device type not defined"
      ^
../../../../crt1/gcrt1.S: Assembler messages:
../../../../crt1/gcrt1.S:55: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:56: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:57: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:58: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:59: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:60: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:61: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:62: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:63: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:64: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:65: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:66: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:67: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:68: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:69: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:70: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:71: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:72: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:73: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:74: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:75: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:76: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:77: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:78: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:79: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:80: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:81: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:82: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:83: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:84: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:85: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:86: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:87: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:88: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:89: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:90: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:91: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:92: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:93: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:94: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:95: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:96: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:97: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:98: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:99: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:100: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:101: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:102: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:103: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:104: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:105: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:106: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:107: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:108: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:109: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:110: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:111: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:112: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:113: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:114: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:115: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:116: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:117: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:118: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:119: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:120: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:121: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:122: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:123: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:124: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:125: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:126: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:127: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:128: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:129: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:130: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:131: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:132: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:133: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:134: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:135: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:136: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:137: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:138: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:139: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:140: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:141: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:142: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:143: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:144: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:145: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:146: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:147: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:148: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:149: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:150: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:151: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:152: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:153: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:154: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:155: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:156: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:157: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:158: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:159: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:160: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:161: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:162: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:163: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:164: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:165: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:166: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:167: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:168: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:169: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:170: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:171: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:172: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:173: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:174: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:175: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:176: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:177: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:178: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:179: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:180: Error: non-constant expression in ".if" statement
../../../../crt1/gcrt1.S:181: Error: non-constant expression in ".if" statement
Makefile:600: recipe for target 'gcrt1.o' failed
make[5]: *** [gcrt1.o] Error 1
make[5]: Leaving directory '/home/PsySc0rpi0n/programming/c/avr-proj/avr-libc-2.0.0/avr/lib/avr5/atmega16hvbrevb'
Makefile:2026: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/PsySc0rpi0n/programming/c/avr-proj/avr-libc-2.0.0/avr/lib/avr5'
Makefile:371: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/PsySc0rpi0n/programming/c/avr-proj/avr-libc-2.0.0/avr/lib'
Makefile:371: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/PsySc0rpi0n/programming/c/avr-proj/avr-libc-2.0.0/avr'
Makefile:432: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/PsySc0rpi0n/programming/c/avr-proj/avr-libc-2.0.0'
Makefile:371: recipe for target 'all' failed
make: *** [all] Error 2

 

What am I missing?

This topic has a solution.
Last Edited: Fri. Oct 21, 2016 - 12:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

../../../../include/avr/io.h:581:6: warning: #warning "device type not defined" [-Wcpp]
 #    warning "device type not defined"

I'd start there. The fact is that it  builds gcrt1.S for about 200.300 models of AVR. For each one it should be passing a -mmcu= value and that in turn selects the right device header and #defines some constants relevant to that CPU.

 

The gcrt1.S has macros like this:

	.macro	vector name
	.if (. - __vectors < _VECTORS_SIZE)
	.weak	\name
	.set	\name, __bad_interrupt
	XJMP	\name
	.endif
	.endm

and then invokes it more times than expected for any AVR with...

__vectors:
	XJMP	__init
	vector	__vector_1
	vector	__vector_2
	vector	__vector_3
...

	vector	__vector_125
	vector	__vector_126
	vector	__vector_127
	.endfunc

but take something like Atmega16. If you build with -mmcu=atmega16 then io.h selects iom16.h and that:

 

http://svn.savannah.nongnu.org/v...

 

has:

583 : 	arcanum 	619 	#define _VECTORS_SIZE 84

So in this case _VECTORS_SIZE is 84. So when the line:

	vector	__vector_1

is assembled it invokes:

	.macro	vector name
	.if (. - __vectors < _VECTORS_SIZE)
	.weak	\name
	.set	\name, __bad_interrupt
	XJMP	\name
	.endif
	.endm

At this stage the only thing assembled after __vectors so far is "XJMP __init" (4 bytes) so it will test:

	.if (4 < 84)

That is true so it assembles an XJMP __vector_1 and now "." beyond __vectors is 8.

 

These .if() tests work because _VECTORS_SIZE for mega16 was defined when iom16.h was included. But you had:

../../../../include/avr/io.h:581:6: warning: #warning "device type not defined" [-Wcpp]
 #    warning "device type not defined"

So because of the lack of -mmcu= and the inclusion of a .h to define _VECTORS_SIZE when the "vector XX" macro is invoked it cannot resolve the offset calculation and:

../../../../crt1/gcrt1.S:55: Error: non-constant expression in ".if" statement

128 times! So look to the way this code is being built - for some reason -mmcu is not being set correctly.

 

I haven't looked at this in a long time but there's another file in the build that is fed as input and it has the name of all the devices to build for - I'd guess that file has a blank line in it perhaps - did your cat accidentally edit it? (I ask because mine does all the time!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PS forgot to ask - WHY are you trying to build it? Is Atmel's pre-built .tar.gz with 4.9.2 (and libc 2) not good enough for some reason then?

 

http://www.atmel.com/tools/atmel...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson, I have no specific reason not to use the tool chain you recommend. It's just I didn't know about it! I'm new to AVR and Atmel stuff.

 

Thanks a lot for that thorough explanation about the compilation. I don't have enough knowledge to understand all of it!

 

I have just downloaded avr-libc-2.0.0 from savannah site, and tried to compile it... Never edited/deleted any line in any of the files (I don't have cats :p).

 

So, I'm not sure what to do to solve the problem! Should I give any other parameter to the ./configure command? I can try to install the tool chain you recommended too!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Building instructions are in the user manual:

 

http://www.nongnu.org/avr-libc/u...

 

For AVR-LibC:

Warning

You must install avr-binutils, avr-gcc and make sure your path is set properly before installing avr-libc.

Note

If you have obtained the latest avr-libc from cvs, you will have to run the bootstrap script before using either of the build methods described below.

To build and install avr-libc:

$ gunzip -c avr-libc-<version>.tar.gz | tar xf -
$ cd avr-libc-<version>
$ ./configure --prefix=$PREFIX --build=`./config.guess` --host=avr
$ make
$ make install

Optionally, generation of debug information can be requested with:

$ gunzip -c avr-libc-<version>.tar.gz | tar xf -
$ cd avr-libc-<version>
$ ./configure --prefix=$PREFIX --build=`./config.guess` --host=avr \
  --with-debug-info=DEBUG_INFO
$ make
$ make install

where DEBUG_INFO can be one of stabs, dwarf-2, or dwarf-4.

The default is to not generate any debug information, which is suitable for binary distributions of avr-libc, where the user does not have the source code installed the debug information would refer to.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I have downloaded binutils-2.27 and tried to compile it but I also got errors.

 

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ../configure --prefix=/home/PsySc0rpi0n --target=avr --disable-nls

## --------- ##
## Platform. ##
## --------- ##

hostname = PsyVps
uname -m = x86_64
uname -r = 3.16.0-4-amd64
uname -s = Linux
uname -v = #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06)

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /home/PsySc0rpi0n/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2297: checking build system type
configure:2311: result: x86_64-pc-linux-gnu
configure:2358: checking host system type
configure:2371: result: x86_64-pc-linux-gnu
configure:2391: checking target system type
configure:2404: result: avr-unknown-none
configure:2458: checking for a BSD-compatible install
configure:2526: result: /usr/bin/install -c
configure:2537: checking whether ln works
configure:2559: result: yes
configure:2563: checking whether ln -s works
configure:2567: result: yes
configure:2574: checking for a sed that does not truncate output
configure:2638: result: /bin/sed
configure:2647: checking for gawk
configure:2677: result: no
configure:2647: checking for mawk
configure:2663: found /usr/bin/mawk
configure:2674: result: mawk
configure:4121: checking for gcc
configure:4151: result: no
configure:4214: checking for cc
configure:4261: result: no
configure:4317: checking for cl.exe
configure:4347: result: no
configure:4371: error: in `/home/PsySc0rpi0n/programming/c/avr-proj/binutils-2.27/obj-avr':
configure:4374: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GCJ_FOR_TARGET_set=
ac_cv_env_GCJ_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_GOC_FOR_TARGET_set=
ac_cv_env_GOC_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_FOR_TARGET_set=
ac_cv_env_OBJCOPY_FOR_TARGET_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_READELF_FOR_TARGET_set=
ac_cv_env_READELF_FOR_TARGET_value=
ac_cv_env_READELF_set=
ac_cv_env_READELF_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_build_configargs_set=
ac_cv_env_build_configargs_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_host_configargs_set=
ac_cv_env_host_configargs_value=
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=avr
ac_cv_env_target_configargs_set=
ac_cv_env_target_configargs_value=
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_path_SED=/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=mawk
ac_cv_target=avr-unknown-none
acx_cv_prog_LN=ln

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET=''
AS=''
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET=''
AWK='mawk'
BISON=''
BUILD_CONFIG=''
CC=''
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET=''
CFLAGS=''
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET=''
COMPILER_AS_FOR_TARGET=''
COMPILER_LD_FOR_TARGET=''
COMPILER_NM_FOR_TARGET=''
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX=''
CXXFLAGS=''
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET=''
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET=''
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS=''
DLLTOOL=''
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
EXPECT=''
EXTRA_CONFIGARGS_LIBJAVA='--disable-static'
FLAGS_FOR_TARGET=''
FLEX=''
GCC_FOR_TARGET=''
GCC_SHLIB_SUBDIR=''
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET=''
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET=''
GNATBIND=''
GNATMAKE=''
GOC_FOR_BUILD='$(GOC)'
GOC_FOR_TARGET=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD=''
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LDFLAGS_FOR_TARGET=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET=''
LEX=''
LIBOBJS=''
LIBS=''
LIPO=''
LIPO_FOR_TARGET=''
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO=''
NM=''
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET=''
OBJCOPY=''
OBJCOPY_FOR_TARGET=''
OBJDUMP=''
OBJDUMP_FOR_TARGET=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET=''
RAW_CXX_FOR_TARGET=''
READELF=''
READELF_FOR_TARGET=''
RPATH_ENVVAR=''
RUNTEST=''
SED='/bin/sed'
SHELL='/bin/bash'
STRIP=''
STRIP_FOR_TARGET=''
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='../configure --prefix=/home/PsySc0rpi0n --target=avr --disable-nls'
WINDMC=''
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET=''
WINDRES=''
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET=''
YACC=''
ac_ct_CC=''
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias=''
build_configargs=''
build_configdirs='build-libiberty build-libcpp build-texinfo build-flex build-bison build-m4 build-fixincludes'
build_cpu='x86_64'
build_libsubdir='build-x86_64-pc-linux-gnu'
build_noncanonical='x86_64-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-pc-linux-gnu'
build_tooldir=''
build_vendor='pc'
compare_exclusions=''
configdirs='intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl libelf libiconv texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare=''
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
extra_host_libiberty_configure_flags=''
extra_host_zlib_configure_flags=''
extra_isl_gmp_configure_flags=''
extra_liboffloadmic_configure_flags=''
extra_linker_plugin_configure_flags=''
extra_linker_plugin_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc=''
gmplibs=''
host='x86_64-pc-linux-gnu'
host_alias=''
host_configargs=''
host_cpu='x86_64'
host_noncanonical='x86_64-pc-linux-gnu'
host_os='linux-gnu'
host_shared=''
host_subdir='.'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
islinc=''
isllibs=''
islver=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags=''
poststage1_libs=''
prefix='/home/PsySc0rpi0n'
program_transform_name='s&^&avr-&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags=''
stage1_checking=''
stage1_languages=''
stage1_ldflags=''
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='avr-unknown-none'
target_alias='avr'
target_configargs=''
target_configdirs='target-libgcc target-libbacktrace target-libgloss target-newlib target-libgomp target-libcilkrts target-liboffloadmic target-libatomic target-libitm target-libstdc++-v3 target-libsanitizer target-libvtv target-libmpx target-libssp target-libquadmath target-libgfortran target-boehm-gc target-libffi target-zlib target-libjava target-libobjc target-libada target-libgo target-rda'
target_cpu='avr'
target_noncanonical='avr'
target_os='none'
target_subdir='avr'
target_vendor='unknown'
tooldir=''

## ------------------- ##
## File substitutions. ##
## ------------------- ##

alphaieee_frag=''
host_makefile_frag='/dev/null'
ospace_frag=''
serialization_dependencies=''
target_makefile_frag=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 1

 

I think I should add some path to the $PATH but I'm not sure which path to add there!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Forget it!

 

I've just installed the repository avr-libc and it's done. I'm not going to waste time installing all the tools by hand... It would be a pain in the ass!

I would like to mark this thread as [solved] or something like that but I'm not sure if I can do it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PsySc0rpi0n wrote:
I would like to mark this thread as [solved] or something like that but I'm not sure if I can do it!
Just pick any post in it and click the [Mark as Solution]. I', guessing that's probably going to just be #7.

 

Be warned though that repo versions can be quite old depending on your Linux distro. I still recommend the 4.9.2 .tar.gz from Atmel as not only is it a fairly recent version but it has the 100+ extra AVR model support that is not in the "standard" build of avr-gcc

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I'll try to install that one!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson, I have downloaded the AVR Toolchain...

 

As far as I understood, the downloaded and uncompressed file is ready-to-use, right?

Then I should set what paths to $PATH? Only the 'bin' folder? Or should I set anything else?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PsySc0rpi0n wrote:
As far as I understood, the downloaded and uncompressed file is ready-to-use, right? Then I should set what paths to $PATH? Only the 'bin' folder? Or should I set anything else?
Yup, that's all you need to do.

 

Some people soft link it to appear in a location such as /usr/local/bin/avr and then set a PATH to that but it's just as easy to just leave it wherever you "tar xvzf" it and then ensure the ./bin/ under that is added to PATH.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

PsySc0rpi0n wrote:As far as I understood, the downloaded and uncompressed file is ready-to-use, right? Then I should set what paths to $PATH? Only the 'bin' folder? Or should I set anything else?

Yup, that's all you need to do.

 

Some people soft link it to appear in a location such as /usr/local/bin/avr and then set a PATH to that but it's just as easy to just leave it wherever you "tar xvzf" it and then ensure the ./bin/ under that is added to PATH.

 

Ok, the problem is that I think I have installed avr-libc some days ago and when I check of avr-objcopy version, it says a different version than the one that is in avr8 tool chain!

 

If I issue the command:

 

"avr-objcopy --version"

 

I get:

 

GNU objcopy (GNU Binutils) 2.24
Copyright 2013 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

 

and if I issue the same commandbut from within the avr8 folder, I get this:

 

GNU objcopy (AVR_8_bit_GNU_Toolchain_3.5.4_1709) 2.26.20160125
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

 

Not big deal, though, but I'm working with different versions of avr-gcc and avr-objcopy, right?

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Linux command which is a very useful tool. For example on my machine:

$ which avr-objcopy
/usr/bin/avr-objcopy

That's telling me that when bash does a search down PATH to find a command called avr-objcopy the first one it bumps into is the one in /usr/bin. Often it's just a case of re-ordering PATH to ensure that the one you want to use is in a directory that is listed first.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah didn't remembered that! Going to try to change it!