LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-07-2009, 12:57 PM   #1
ackbar345
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
gnu gcc compile error --no-cpp-precomp


So I am trying to fool around with this AVR Atmel microprocessor chip for kicks and I found a nice tutorial to guide me through installing some of the necessary toolchain. They recommended I install binutils (2.19.1) which I configured and built from source no problem. Then I tried to compile gcc (4.3.3). This is all on Ubuntu Hard Heron 8.04.

configure line for binutils - ./configure --target=avr --program-prefix="avr-"
make
sudo make install

then
I made a directory avrgcc-4.3.3
cd avrgcc-4.3.3
../gcc-4.3.3/configure --target=avr --enable-languages=c --disable-libssp

at this point I think it wanted me to install two pre reqs mpfr and gmp which I downloaded and build from source as well.

then
make CC="cc --no-cpp-precomp"
also tried
make CC="cc"

but I keep getting this error:

make[2]: Entering directory `/home/administrator/Desktop/avrgcc-4.3.3/build-i686-pc-linux-gnu/libiberty'
if [ x"" != x ]; then \
cc -no-cpp-precomp -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc-4.3.3/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../../gcc-4.3.3/libiberty/cplus-dem.c -o pic/cplus-dem.o; \
else true; fi
cc -no-cpp-precomp -c -DHAVE_CONFIG_H -g -O2 -I. -I../../../gcc-4.3.3/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic ../../../gcc-4.3.3/libiberty/cplus-dem.c -o cplus-dem.o
cc: unrecognized option '-no-cpp-precomp'
../../../gcc-4.3.3/libiberty/cplus-dem.c:55: warning: function declaration isn’t a prototype
../../../gcc-4.3.3/libiberty/cplus-dem.c:55: error: conflicting types for ‘malloc’
../../../gcc-4.3.3/libiberty/cplus-dem.c:56: warning: function declaration isn’t a prototype
../../../gcc-4.3.3/libiberty/cplus-dem.c: In function ‘code_for_qualifier’:
../../../gcc-4.3.3/libiberty/cplus-dem.c:582: warning: implicit declaration of function ‘abort’
../../../gcc-4.3.3/libiberty/cplus-dem.c:582: warning: incompatible implicit declaration of built-in function ‘abort’
../../../gcc-4.3.3/libiberty/cplus-dem.c: In function ‘qualifier_string’:
../../../gcc-4.3.3/libiberty/cplus-dem.c:622: warning: incompatible implicit declaration of built-in function ‘abort’
../../../gcc-4.3.3/libiberty/cplus-dem.c: In function ‘squangle_mop_up’:
../../../gcc-4.3.3/libiberty/cplus-dem.c:1082: warning: implicit declaration of function ‘free’
../../../gcc-4.3.3/libiberty/cplus-dem.c: In function ‘demangle_qualified’:
../../../gcc-4.3.3/libiberty/cplus-dem.c:3176: warning: implicit declaration of function ‘atoi’
make[2]: *** [cplus-dem.o] Error 1
make[2]: Leaving directory `/home/administrator/Desktop/avrgcc-4.3.3/build-i686-pc-linux-gnu/libiberty'
make[1]: *** [all-build-libiberty] Error 2
make[1]: Leaving directory `/home/administrator/Desktop/avrgcc-4.3.3'
make: *** [all] Error 2


I want to make this LED flash! Thanks for your help.
 
Old 02-08-2009, 04:06 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,502

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
Welcome to LQ.

--no-cpp-precomp :..is not reckognized by non-Apple gcc build.?
Isn't a gcc option, and why use it ? (Used in Apple before 2003?)

How to make cross tools .. you can of course install to
/usr/local/cross or whatever, but not --prefix=/usr/local,
EDIT.. which is what you get by default, when not specified.
A more used location is probably /home/'user'/crosstools.

So 'binutils' must be installed where noting but "avr-gcc"
can find it. ( And gcc is not at all allowed to see the
system binutils, when building avr-gcc, use an absolute
path to "avr-binutils" = 'export PATH ....' )
... I don't see anything in your method, that will work,
... may be you are not giving all information ?

Miscellaneous cross build methods :
http://www.gnuarm.org/ .. look for the word "here" (link)
http://www.kegel.com/crosstool/ (recommended)
http://www.kegel.com/crosstool/cross...ool-howto.html
....
Another way : learn to build a system, "Linux From Scratch"
http://www.linuxfromscratch.org/lfs/view/6.4/ .. or 6.3
and move on to "Cross Linux From Scratch" (CLFS)
http://cross-lfs.org/view/1.1.0/x86/
....

Good luck.

Last edited by knudfl; 02-10-2009 at 04:54 AM.
 
  


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
GCC fails to compile - Chapter 6.14 - C preprocessor "/lib/cpp" fails sanity check jaydoc Linux From Scratch 1 01-28-2009 06:17 PM
incomplete type error using cpp with gcc aatwell Programming 8 11-04-2007 12:12 PM
compile amarok fails with ktrm.cpp error pwc101 Linux - Software 2 10-28-2006 04:56 AM
Now I have gcc/cpp/cpp, but still can't install sfingerh Linux - Software 2 07-30-2002 04:13 AM

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

All times are GMT -5. The time now is 10:32 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