0

Installing AVR tools on Linspire - apt-get not working
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Installing AVR tools on Linspire - apt-get not working

by dksmall on Thu Jan 17, 2008 12:09 pm

I'm trying to following the AVR totorial on this site and am stuck on step 1. The command "apt-get install flex byacc bison gcc libusb libusb-dev" returns the following error.

# apt-get install flex byacc bison gcc libusb libusb-dev
Reading Package Lists... Done
Building Dependency Tree... Done
Package flex is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package flex has no installation candidate

What can I do to install these utilities on LinSpire 5.0?? Thanks!!!
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

by adafruit on Thu Jan 17, 2008 1:27 pm

you may want to look at your distribution documentation or ask on the forums/mailing list for that distro. the instructions are kinda ubuntu-focused, your distro may have slightly different methods of installing packages..

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by dksmall on Thu Jan 17, 2008 3:00 pm

ladyada wrote:you may want to look at your distribution documentation or ask on the forums/mailing list for that distro. the instructions are kinda ubuntu-focused, your distro may have slightly different methods of installing packages..


Sorry for the wrong forum, I couldn't follow your naming convention. :oops:

Geez I hate to be the total newbie but how do I do what you're describing? What's a distro? Something to do with distribution I'm guessing?

thanks!
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

by adafruit on Thu Jan 17, 2008 3:56 pm

distro is short for distribution
linspire is, i assume, a linux distribution.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by dksmall on Thu Jan 17, 2008 4:09 pm

ladyada wrote:distro is short for distribution
linspire is, i assume, a linux distribution.


Yes, it's Linux based. I can do an install with ./configure, make, make install, but this app-get is what's confusing. I'll post to the LinSpire support and see what they say, thanks!
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

by dksmall on Fri Jan 18, 2008 12:29 pm

Ok I'm making progress. I have the developer tools installed and binutils. When I tried to install GCC as AVRGCC, I ran into a new problem. make CC="cc -no-cpp-precomp" did not work, complaining that the "-no-cpp-precomp" was unknown. So I did "make" without any options, but it still complained about the "-no-cpp-precomp". Tried "make clean", then "make" and still got errors concerning "-no-cpp-precomp". What can I do now??
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

by adafruit on Fri Jan 18, 2008 1:39 pm

please read more carefully, it is --no-cpp-precomp not -no-cpp-precomp

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by dksmall on Fri Jan 18, 2008 1:46 pm

ladyada wrote:please read more carefully, it is --no-cpp-precomp not -no-cpp-precomp


Hmmm, here's a cut&paste right out of your tutorial

Once the configuration is done, compile gcc.
type: make CC="cc -no-cpp-precomp" <return>

Note: It seems like the -no-cpp-precomp may not be a good idea, if you are having problems maybe leave it off
?

I also pasted it into the terminal window when I was executing commands. I don't see two dashes, only one dash. Assuming that's the only difference, I will try that and see what happens. Thanks for your time with this!!!!
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

by adafruit on Fri Jan 18, 2008 2:02 pm

!!!
:oops:
sorry about that, i have fixed it...let me know if it works now

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by dksmall on Fri Jan 18, 2008 4:37 pm

ladyada wrote:!!!
:oops:
sorry about that, i have fixed it...let me know if it works now


Still no go. If I leave off "-no-cpp-precomp" do I simply do "make", or do I still need cc, so it would be make CC="cc" ???????


here's the last part of the run:

cc-4.2.2/gcc/config/avr/avr.opt > tmp-optionlist
/bin/sh ../../gcc-4.2.2/gcc/../move-if-change tmp-optionlist optionlist
echo timestamp > s-options
gawk -f ../../gcc-4.2.2/gcc/opt-functions.awk -f ../../gcc-4.2.2/gcc/opth-gen.awk \
< optionlist > tmp-options.h
/bin/sh ../../gcc-4.2.2/gcc/../move-if-change tmp-options.h options.h
echo timestamp > s-options-h
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="" \
/bin/sh ../../gcc-4.2.2/gcc/mkconfig.sh bconfig.h
gcc -c -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../gcc-4.2.2/gcc -I../../gcc-4.2.2/gcc/build -I../../gcc-4.2.2/gcc/../include -I../../gcc-4.2.2/gcc/../libcpp/include -I../../gcc-4.2.2/gcc/../libdecnumber -I../libdecnumber -o build/errors.o ../../gcc-4.2.2/gcc/errors.c
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory
make[2]: *** [s-modes-h] Error 127
make[2]: Leaving directory `/opt/avrgcc-4.2/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/opt/avrgcc-4.2'
make: *** [all] Error 2
/opt/avrgcc-4.2#
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

by adafruit on Fri Jan 18, 2008 4:58 pm

are you doing
make CC="cc --no-cpp-precomp" <return>

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by dksmall on Fri Jan 18, 2008 5:23 pm

ladyada wrote:are you doing
make CC="cc --no-cpp-precomp" <return>


Yes, also tried

make
make CC="cc"

same results each time. I would also do "make distclean" when I start over.
dksmall
 
Posts: 7
Joined: Thu Jan 17, 2008 12:05 pm

Please be positive and constructive with your questions and comments.