How can I build and install gcc-5.4.0 on Ubuntu 18.04?












0















I have tried several methods for build and install gcc-5.4.0 on my PC;



I ran this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


which did not work; telling me that I should disable multi-lib.



I did it using this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
--disable-multilib
&& make
&& make install


which was running for almost half an hour and made a directory as big as 1 GB. So I doubted the source file and interrupted it.



Then I tried downloading gcc-5.4.0 from another source.



Compiled with the following command:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--disable-multilib
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


Again I got an error, do you know any direct way that I can do that?










share|improve this question









New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • What is your Ubuntu version? It is unclear why do you not want to install the gcc-5 package from official repository? Do you plan to use it as cross-compiler?

    – N0rbert
    yesterday











  • My Ubuntu is 18.04 for which gcc 5.4 is not available through apt.

    – Mohammad Nezhadali
    9 hours ago
















0















I have tried several methods for build and install gcc-5.4.0 on my PC;



I ran this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


which did not work; telling me that I should disable multi-lib.



I did it using this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
--disable-multilib
&& make
&& make install


which was running for almost half an hour and made a directory as big as 1 GB. So I doubted the source file and interrupted it.



Then I tried downloading gcc-5.4.0 from another source.



Compiled with the following command:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--disable-multilib
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


Again I got an error, do you know any direct way that I can do that?










share|improve this question









New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • What is your Ubuntu version? It is unclear why do you not want to install the gcc-5 package from official repository? Do you plan to use it as cross-compiler?

    – N0rbert
    yesterday











  • My Ubuntu is 18.04 for which gcc 5.4 is not available through apt.

    – Mohammad Nezhadali
    9 hours ago














0












0








0








I have tried several methods for build and install gcc-5.4.0 on my PC;



I ran this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


which did not work; telling me that I should disable multi-lib.



I did it using this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
--disable-multilib
&& make
&& make install


which was running for almost half an hour and made a directory as big as 1 GB. So I doubted the source file and interrupted it.



Then I tried downloading gcc-5.4.0 from another source.



Compiled with the following command:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--disable-multilib
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


Again I got an error, do you know any direct way that I can do that?










share|improve this question









New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have tried several methods for build and install gcc-5.4.0 on my PC;



I ran this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


which did not work; telling me that I should disable multi-lib.



I did it using this code:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://www.netgull.com/gcc/releases/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
--disable-multilib
&& make
&& make install


which was running for almost half an hour and made a directory as big as 1 GB. So I doubted the source file and interrupted it.



Then I tried downloading gcc-5.4.0 from another source.



Compiled with the following command:



GCC_VERSION="5.4.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"

cd $WORKDIR
wget http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar -xf gcc-${GCC_VERSION}.tar.bz2

cd gcc-${GCC_VERSION}
./contrib/download_prerequisites

cd ..
mkdir gcc-build
cd gcc-build

../gcc-${GCC_VERSION}/configure
--prefix=${INSTALLDIR}
--disable-multilib
--enable-shared
--enable-threads=posix
--enable-__cxa_atexit
--enable-clocale=gnu
--enable-languages=all
&& make
&& make install


Again I got an error, do you know any direct way that I can do that?







gcc






share|improve this question









New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 9 hours ago







Mohammad Nezhadali













New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Mohammad NezhadaliMohammad Nezhadali

61




61




New contributor




Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Mohammad Nezhadali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • What is your Ubuntu version? It is unclear why do you not want to install the gcc-5 package from official repository? Do you plan to use it as cross-compiler?

    – N0rbert
    yesterday











  • My Ubuntu is 18.04 for which gcc 5.4 is not available through apt.

    – Mohammad Nezhadali
    9 hours ago



















  • What is your Ubuntu version? It is unclear why do you not want to install the gcc-5 package from official repository? Do you plan to use it as cross-compiler?

    – N0rbert
    yesterday











  • My Ubuntu is 18.04 for which gcc 5.4 is not available through apt.

    – Mohammad Nezhadali
    9 hours ago

















What is your Ubuntu version? It is unclear why do you not want to install the gcc-5 package from official repository? Do you plan to use it as cross-compiler?

– N0rbert
yesterday





What is your Ubuntu version? It is unclear why do you not want to install the gcc-5 package from official repository? Do you plan to use it as cross-compiler?

– N0rbert
yesterday













My Ubuntu is 18.04 for which gcc 5.4 is not available through apt.

– Mohammad Nezhadali
9 hours ago





My Ubuntu is 18.04 for which gcc 5.4 is not available through apt.

– Mohammad Nezhadali
9 hours ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Mohammad Nezhadali is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109933%2fhow-can-i-build-and-install-gcc-5-4-0-on-ubuntu-18-04%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Mohammad Nezhadali is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Mohammad Nezhadali is a new contributor. Be nice, and check out our Code of Conduct.













Mohammad Nezhadali is a new contributor. Be nice, and check out our Code of Conduct.












Mohammad Nezhadali is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1109933%2fhow-can-i-build-and-install-gcc-5-4-0-on-ubuntu-18-04%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

GameSpot

日野市

Tu-95轟炸機