LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-29-2010, 01:55 AM   #1
ruzvay
LQ Newbie
 
Registered: May 2004
Location: Dhaka,Bangladesh
Distribution: Slackware
Posts: 24

Rep: Reputation: 15
AVR development toolchai


Hi,
I am trying to install the toolchain for atmel's microcontrollers
I am following this link http://www.nongnu.org/avr-libc/user-...nstall_avr_gcc to install the softwares.

But i am having difficulty installing AVR LIBC,
Quote:
bash-3.1# ./configure --build='./config.guess' --host=avr --prefix=/usr/local/avr
checking build system type... Invalid configuration `./config.guess': machine `./config.guess' not recognized
configure: error: /bin/sh ./config.sub ./config.guess failed
BTW: I have already installed BINUTILS and AVR GCC
 
Old 03-29-2010, 04:03 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,391

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
Quote:
bash-3.1# ./configure
Two things are totally different from the instructions.
1) The sign $ means building as an unprivileged user.
Using root ( # ) is asking for trouble.
The only allowed root command is # make install.

Recommended directory for building software is /home/'name'/<dir>
e.g. /home/ruzvay/tmp/

2) A build directory is required for binutils, gcc, glibc.
Preferrable outside the application.
Hence the two periods : ../configure --<option>
( The instructions use the name 'avr-obj' for build-directory.)

Starting with an empty /home/ruzvay/tmp/ :
a) cd tmp/
b) mkdir build-binutils
c) tar xvf <path-to> binutils-<version>
d) cd build-binutils/ ( which is empty.)
e) ../binutils-<version>/configure --<option> --<option>

Better delete, what you have done so far. If no build-directory
was used for binutils, gcc. Binutils may work or may not.
GCC will not be usable for anything.
.....

P.S. : The only recommended tool chain, I know, is crosstool-NG
http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool
http://ymorin.is-a-geek.org/dokuwiki...load_and_usage
hg clone http://ymorin.is-a-geek.org/hg/crosstool-ng
The package 'mercurial' providing /usr/bin/hg is required.
'crosstool-NG' is continiously maintained.
Last update : two weeks ago.
http://www.linuxquestions.org/questi...12-a-798457/#2
> > post # 2, @ theNbomr is a crosstool expert.
.....

Last edited by knudfl; 03-29-2010 at 04:18 AM.
 
Old 03-29-2010, 12:35 PM   #3
ruzvay
LQ Newbie
 
Registered: May 2004
Location: Dhaka,Bangladesh
Distribution: Slackware
Posts: 24

Original Poster
Rep: Reputation: 15
thanx knudfl!!!

however I am unable to uninstall the previous installation of binutils and avr-gcc!!
I used make uninstall in the compiling folders which did not work.

later i tried the following in AVR Libc folder
Quote:
bash-3.1# ./config.guess
i686-pc-linux-gnu
bash-3.1# ./configure --build=i686-pc-linux-gnu --host=avr --prefix=/usr/local/avr
checking build system type... i686-pc-linux-gnu
checking host system type... avr-unknown-none
checking if configuring for cross compile... yes
checking if target host is avr... yes
checking for a BSD-compatible install... /bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for avr-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for avr-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for avr-as... no
checking for as... as
checking dependency style of gcc... gcc3
checking for avr-ranlib... no
checking for ranlib... ranlib
checking for avr-ar... no
checking for ar... ar
configure: error: Wrong C compiler found; check the PATH!
bash-3.1#
I then pasted the Avr-Libc folder to gcc source folder!! and tried to reconfigure it from /gcc-4.4.3/obj-avr folder.
Quote:
bash-3.1# ../configure --build=i686-pc-linux-gnu --host=avr --prefix=/usr/local/avr
checking build system type... i686-pc-linux-gnu
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking for a BSD-compatible install... /bin/ginstall -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for avr-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for avr-g++... no
checking for avr-c++... no
checking for avr-gpp... no
checking for avr-aCC... no
checking for avr-CC... no
checking for avr-cxx... no
checking for avr-cc++... no
checking for avr-cl... no
checking for avr-FCC... no
checking for avr-KCC... no
checking for avr-RCC... no
checking for avr-xlC_r... no
checking for avr-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for avr-gnatbind... no
checking for gnatbind... gnatbind
checking for avr-gnatmake... no
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... yes
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... buggy but acceptable
checking for version 0.10 of PPL... no
checking for correct version of CLooG... no
The following languages will be built: c,c++,fortran,java,objc
*** This configuration is not supported in the following subdirectories:
target-libmudflap target-libgomp target-libiberty target-libstdc++-v3 target-libffi target-zlib target-libjava target-libssp target-libada gnattools target-boehm-gc
(Any other directories should still work fine.)
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for avr-ar... no
checking for avr-as... no
checking for avr-dlltool... no
checking for ld... (cached) /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld
checking for avr-ld... (cached) /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld
checking for avr-lipo... no
checking for avr-nm... no
checking for avr-ranlib... no
checking for avr-strip... no
checking for avr-windres... no
checking for avr-windmc... no
checking for avr-objcopy... no
checking for avr-objdump... no
checking where to find the target ar... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target as... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target objdump... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target ranlib... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target strip... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile
bash-3.1# make
make[1]: Entering directory `/home/ruzvay/gcc-4.4.3/obj-avr'
Configuring in ./fixincludes
configure: loading cache ./config.cache
configure: error: `host_alias' has changed since the previous run:
configure: former value: `i686-pc-linux-gnu'
configure: current value: `avr'
configure: error: in `/home/ruzvay/gcc-4.4.3/obj-avr/fixincludes':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-fixincludes] Error 1
make[1]: Leaving directory `/home/ruzvay/gcc-4.4.3/obj-avr'
make: *** [all] Error 2
bash-3.1#
I tried configuring everything with non root user mode!! but the permission was denied.
 
Old 03-29-2010, 04:44 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,391

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
The source files used for some earlier or unsuccessful
builds cannot be reused. You will have to delete everything.
Files that were handled by root, must be deleted as root.
And then start from scratch.

Some packages have no uninstall function ( # make uninstall ).
You must find where you installed the files, if you want them removed.
And then just delete them.

About ../configure not finding avr-gcc, avr-g++, etc.
http://www.nongnu.org/avr-libc/user-...ools.html#path
You are probable forgetting to set or export the path to e.g.
/usr/local/avr/gcc/ . ( ../configure CC=avr-gcc CXX=avr-g++ , can also
be used if you include the full path.)
.....
.....
Still : The only recommended toolchain is 'crosstool-NG',
which includes avr.
.....

Last edited by knudfl; 03-30-2010 at 05:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Undefined reference to main error in winavr gcc plugin in avr studio zack670303 Programming 1 02-26-2009 12:52 PM
gcc for avr jani_fedora Programming 2 03-31-2008 03:12 PM
avr-ranlib: Command not found oguzhana Linux - Software 2 01-12-2008 11:05 AM
nut and belkin F6C550-AVR arobinson74 Linux - Hardware 4 11-25-2007 08:24 AM
LXer: Atmel offer $500 AVR dev kit with Linux and GNU debugger LXer Syndicated Linux News 0 06-27-2006 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration