Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
[QUOTE=knudfl;5698481]GCC requires a build folder outside gcc-5.3.0/ [QUOTE]
>yup now gmp, mpfr, mpc are in path /opt/src
>gcc5.3.0 is placed in the same path and follwing commands are executed
mkdir /opt/gcc-5.3.00(renamed as there is already a folder named gcc-5.3.0)
mkdir objdir
cd objdir
../gcc-5.3.0/configure --prefix=/opt/gcc-5.3.0 --enable-languages=c,c++ --with-gmp=/opt/gmp-6.1.0 --with-mpfr=/opt/mpfr-3.1.4 --with-mpc=/opt/mpc-1.0.3 --disable-multilib
Now I get the following error
configure: error: building out of tree but ../gcc-5.3.0 contains host-x86_64-unknown-linux-gnu.
Use a pristine source tree when building in a separate tree
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517
Rep:
Re #2.
More information : gcc-5.3.x can be built with => gcc-4.7. I used gcc-4.9.3.
Same procedure with mpfr, gmp, mpc , etc.
../gcc-4.9.3/configure --prefix=/usr/local/gcc493 --program-suffix=49 --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --with-system-zlib
Remember that you can't simply "start over in another directory" having attempted the job in the wrong place. You have already messed it up and must perhaps make distclean.
As complicated as possible is usually wrong. Doesn't look like an experienced gcc builder.
And the links will overwrite the system files. ( /usr/bin/gcc, g++ ). Bad idea.
Don't do. Use a '--program-suffix'.
When compiling a program with gcc-5.3, use the compilers with, examples :
1. export CC=gcc53 CXX=g++53 && ./configure && make
2. (cmake) : CC=gcc53 CXX=g++53 cmake ..
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517
Rep:
Re #14.
The procedure is post #2.
When the configuring has been done : make && make install
The important thing is also : Use a valid => gcc-4.7, e.g. gcc-4.9.3
And :
cd /usr/bin/
ln -s /usr/local/gcc53/bin/gcc53
ln -s /usr/local/gcc53/bin/g++53
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.