Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying install gcc-3.4.4 from source. I download and untar, copy the directory gcc-3.4.4 to the folder /usr/local/src. Then I run ./configure, which finishes without any problem. I then type make, and it shows the following error:
make[1]: bison: Command not found
make[1]: [java/parse.c] Error 127 (ignored)
gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -I. -Ijava -I. -I./java -I./../include java/parse.c -o java/parse.o
gcc: java/parse.c: No such file or directory
gcc: no input files
make[1]: *** [java/parse.o] Error 1
make[1]: Leaving directory `/usr/local/src/gcc-3.4.4/gcc'
make: *** [all-gcc] Error 2
Am I missing packages or is it a different problem?
Please let me know what other information I should post to make it easier for someone to help me.
It says on the first line of your error message
bison: Command not found
You should apt-get install bison and probably flex too. Also, do you need a java compiler? You might want to configure gcc with --enable-languages=c,c++
popotito:/home/ernesto# apt-get install bison
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
bison: Depends: m4 but it is not going to be installed
cpp-3.3: Depends: gcc-3.3-base (< 1:3.3.4) but 1:3.3.5-8 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
popotito:/home/ernesto# apt-get install m4
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
cpp-3.3: Depends: gcc-3.3-base (< 1:3.3.4) but 1:3.3.5-8 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
popotito:/home/ernesto# apt-get install flex
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
cpp-3.3: Depends: gcc-3.3-base (< 1:3.3.4) but 1:3.3.5-8 is to be installed
flex: Depends: m4 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
I think if I try "apt-get -f install" with no packages, I will uninstall many packages that I might need, like x-window-system-core and a bunch from gnome. Do I have to run this command and install those again?
don't have a solution for your apt problem, but running "./configure" on gcc will not get you very far. there are some options you need to include to have a decent compiler. the one you are running now was configured with:
I ran ./configure --enable-languages=c,c++ and everything was going fine with make until the following error appeared.
checking how to run the C++ preprocessor... (cached) /home/ernesto/gcc-3.4.4/gcc/xgcc -shared-libgcc -B/home/ernesto/gcc-3.4.4/gcc/ -nostdinc++ -L/home/ernesto/gcc-3.4.4/i686-pc-linux-gnu/libstdc++-v3/src -L/home/ernesto/gcc-3.4.4/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -E
configure: error: C++ preprocessor " /home/ernesto/gcc-3.4.4/gcc/xgcc -shared-libgcc -B/home/ernesto/gcc-3.4.4/gcc/ -nostdinc++ -L/home/ernesto/gcc-3.4.4/i686-pc-linux-gnu/libstdc++-v3/src -L/home/ernesto/gcc-3.4.4/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include -isystem /usr/local/i686-pc-linux-gnu/sys-include -E" fails sanity check
See `config.log' for more details.
make: *** [configure-target-libstdc++-v3] Error 1
config.log
configure:581: checking host system type
configure:602: checking target system type
configure:620: checking build system type
configure:675: checking for a BSD compatible install
configure:2866: checking for i686-pc-linux-gnu-ar
configure:2899: checking for ar
configure:2938: checking for i686-pc-linux-gnu-as
configure:2971: checking for as
configure:3010: checking for i686-pc-linux-gnu-dlltool
configure:3043: checking for dlltool
configure:3082: checking for i686-pc-linux-gnu-ld
configure:3115: checking for ld
configure:3154: checking for i686-pc-linux-gnu-nm
configure:3187: checking for nm
configure:3226: checking for i686-pc-linux-gnu-ranlib
configure:3259: checking for ranlib
configure:3298: checking for i686-pc-linux-gnu-windres
configure:3331: checking for windres
configure:3370: checking for i686-pc-linux-gnu-objcopy
configure:3403: checking for objcopy
configure:3442: checking for i686-pc-linux-gnu-objdump
configure:3475: checking for objdump
configure:3524: checking for i686-pc-linux-gnu-ar
configure:3557: checking for ar
configure:3596: checking for i686-pc-linux-gnu-as
configure:3629: checking for as
configure:3668: checking for i686-pc-linux-gnu-dlltool
configure:3701: checking for dlltool
configure:3740: checking for i686-pc-linux-gnu-ld
configure:3773: checking for ld
configure:3812: checking for i686-pc-linux-gnu-nm
configure:3845: checking for nm
configure:3884: checking for i686-pc-linux-gnu-ranlib
configure:3917: checking for ranlib
configure:3956: checking for i686-pc-linux-gnu-windres
configure:3989: checking for windres
configure:4056: checking whether to enable maintainer-specific portions of Makefiles
Before posting for help and trying to install gcc under the /usr/local/src directory, I had tried to do it on my home directory. I ran ./configure, make and make install, but things were not working. I ran make clean, erased the gcc-3.4.4 directory that was in my home directory, then copied the .tar.gz to /usr/local/src and tried to do it again. This is when I started posting for help.
I know I should have posted the whole story from the beginning, but just didn't think that it was necessary, since I thought make clean would do the trick. How do I get completely rid of the first install?
Originally posted by __J don't have a solution for your apt problem, but running "./configure" on gcc will not get you very far. there are some options you need to include to have a decent compiler. the one you are running now was configured with:
you should probably stick with that, and make a package of your build when you are done.
you either needed to make a package of the build or keep the source directory, deleting the source directory was not a good idea ( you can cd back into it and "make uninstall", note that not all packages will do this). also note the above configure command, ./configure --enable-languages=c,c++ is not enough, and the compiler produced will not be what you want ( you don't have to do the whole configure command above, for example if you just want the c & c++ front-ends, but you might want to at least throw in --enable-threads=posix, --enable-shared, and --enable-__cxa_atexit).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.