How do I install gcc-5.3 on Ubuntu 16.04
I'm currently running Ubuntu 16.04 and want to install gcc-5.3 from source, without disrupting thegcc-5.4 and gcc-4.9 that I have already installed using Synaptic package manager.
The reason I want gcc-5.3 is I'm using CUDA 8.0 RC, which doesn't support gcc versions after 5.3. Rather than downgrading to 4.9, I'd like to install (or at least know how to install) 5.3. I already have the code for gcc-5.3 and only need to go through the configure/make/make install ritual.
Now, I need to understand the various configure options before running make and make install. I particularly want to be certain that I install gcc-5.3 in the right place and don't interfere with my existing gcc-5.4 and gcc-4.9.
I found one account of how to configure 5.3, that was as follows:
./gcc-5.3.0/configure --disable-checking --program-suffix=-5.3 --enable-languages=c,c++,go,objc --disable-multilib --with-system-zlib prefix=/usr/local/gcc-5.3
Some of these options make sense, others don't. Specifically, the options I think I understand well enough to not mess myself up are:
--disable-checking: Will make the installation quicker, but at the risk
of missing errors. Since I'm paranoid, I'll probably
omit this option.
--disable-multilib: I don't understand this. I gather it has something
to do with variations on the compiler's target machine,
but that's all I can gather.
At worst, if I omit this option, I think I'll just
end up with some extra libraries, which doesn't seem
so bad. Why do/don't I want to use this?
--with-system-zlib: Use the zlib that I already have with my system,
rather than gcc's version. This seems reasonable to
me.
--enable-languages=c,c++,go,objc: AFAIK, I'm really just interested in c & c++,
so this option seems pretty harmless, although I might
just use --enable-lnguages=all, since it can't hurt.
The options that do worry me are:
--program-suffix=-5.3: This seems just to add a -5.3 suffix
at the end of the installation path,
which is probably a good idea if I get the
path right
prefix=/usr/local/gcc-5.3: This just seems to specify the
installation directory and to make the
--program-suffix=-5.3 specification
redundant. However, it is the option that
makes me the most uneasy.
When I do a find . -name gcc, the only relevant paths I see are /usr/lib/gcc and /usr/bin/gcc
In /usr/lib/gcc, there are two sub-directories - i686-linux-gnu and x86_64-linux-gnu, since I have a 64-bit machine, I looked in the x64 directory.
There, I saw a soft-link - 4.9.3, that linked to a directory called 4.9, that had files for gcc-4.9. Similarly, I saw a softlink called 5.4.0 that linked to a directory called 5, that had files for gcc-5.4. So, I expect that I want to use prefix=/usr/lib/gcc/5.3 and not use the --program-suffix option. Is this correct?
At this point, I'm just assuming that when I run make & make install that the .a & .so files will get placed in /usr/lib/gcc/5.3 and that the executable will end up as /usr/bin/gcc-5.3 and that I'll be able to use Ubuntu's update-alternatives to move among gcc-5.4, gcc-5.3 and gcc-4.9
(Note: the reason I'm not using Synaptic is that it only provides gcc-5.4, which it calls gcc-5. Similarly, the ppa ppa:ubuntu-toolchain-r/test refers to all versions of gcc-5.X as gcc-5, which also seems dangerous to use. I suspect the decision to refer to all minor versions of gcc-5.x as gcc-5 is the root of my problems)
apt 16.04 ppa gcc
add a comment |
I'm currently running Ubuntu 16.04 and want to install gcc-5.3 from source, without disrupting thegcc-5.4 and gcc-4.9 that I have already installed using Synaptic package manager.
The reason I want gcc-5.3 is I'm using CUDA 8.0 RC, which doesn't support gcc versions after 5.3. Rather than downgrading to 4.9, I'd like to install (or at least know how to install) 5.3. I already have the code for gcc-5.3 and only need to go through the configure/make/make install ritual.
Now, I need to understand the various configure options before running make and make install. I particularly want to be certain that I install gcc-5.3 in the right place and don't interfere with my existing gcc-5.4 and gcc-4.9.
I found one account of how to configure 5.3, that was as follows:
./gcc-5.3.0/configure --disable-checking --program-suffix=-5.3 --enable-languages=c,c++,go,objc --disable-multilib --with-system-zlib prefix=/usr/local/gcc-5.3
Some of these options make sense, others don't. Specifically, the options I think I understand well enough to not mess myself up are:
--disable-checking: Will make the installation quicker, but at the risk
of missing errors. Since I'm paranoid, I'll probably
omit this option.
--disable-multilib: I don't understand this. I gather it has something
to do with variations on the compiler's target machine,
but that's all I can gather.
At worst, if I omit this option, I think I'll just
end up with some extra libraries, which doesn't seem
so bad. Why do/don't I want to use this?
--with-system-zlib: Use the zlib that I already have with my system,
rather than gcc's version. This seems reasonable to
me.
--enable-languages=c,c++,go,objc: AFAIK, I'm really just interested in c & c++,
so this option seems pretty harmless, although I might
just use --enable-lnguages=all, since it can't hurt.
The options that do worry me are:
--program-suffix=-5.3: This seems just to add a -5.3 suffix
at the end of the installation path,
which is probably a good idea if I get the
path right
prefix=/usr/local/gcc-5.3: This just seems to specify the
installation directory and to make the
--program-suffix=-5.3 specification
redundant. However, it is the option that
makes me the most uneasy.
When I do a find . -name gcc, the only relevant paths I see are /usr/lib/gcc and /usr/bin/gcc
In /usr/lib/gcc, there are two sub-directories - i686-linux-gnu and x86_64-linux-gnu, since I have a 64-bit machine, I looked in the x64 directory.
There, I saw a soft-link - 4.9.3, that linked to a directory called 4.9, that had files for gcc-4.9. Similarly, I saw a softlink called 5.4.0 that linked to a directory called 5, that had files for gcc-5.4. So, I expect that I want to use prefix=/usr/lib/gcc/5.3 and not use the --program-suffix option. Is this correct?
At this point, I'm just assuming that when I run make & make install that the .a & .so files will get placed in /usr/lib/gcc/5.3 and that the executable will end up as /usr/bin/gcc-5.3 and that I'll be able to use Ubuntu's update-alternatives to move among gcc-5.4, gcc-5.3 and gcc-4.9
(Note: the reason I'm not using Synaptic is that it only provides gcc-5.4, which it calls gcc-5. Similarly, the ppa ppa:ubuntu-toolchain-r/test refers to all versions of gcc-5.X as gcc-5, which also seems dangerous to use. I suspect the decision to refer to all minor versions of gcc-5.x as gcc-5 is the root of my problems)
apt 16.04 ppa gcc
2
my strong recommendation is to use docker or LXD container for such different "compiler environments". Makes it much easier to run different compiler setups and versions and you avoid to create a dirty host system.
– 0x0C4
Aug 12 '16 at 16:27
I agree with @malo. Especially, I'm againstppa:ubuntu-toolchain-r/test. That can cause a lot of headache
– Anwar
Aug 14 '16 at 8:41
add a comment |
I'm currently running Ubuntu 16.04 and want to install gcc-5.3 from source, without disrupting thegcc-5.4 and gcc-4.9 that I have already installed using Synaptic package manager.
The reason I want gcc-5.3 is I'm using CUDA 8.0 RC, which doesn't support gcc versions after 5.3. Rather than downgrading to 4.9, I'd like to install (or at least know how to install) 5.3. I already have the code for gcc-5.3 and only need to go through the configure/make/make install ritual.
Now, I need to understand the various configure options before running make and make install. I particularly want to be certain that I install gcc-5.3 in the right place and don't interfere with my existing gcc-5.4 and gcc-4.9.
I found one account of how to configure 5.3, that was as follows:
./gcc-5.3.0/configure --disable-checking --program-suffix=-5.3 --enable-languages=c,c++,go,objc --disable-multilib --with-system-zlib prefix=/usr/local/gcc-5.3
Some of these options make sense, others don't. Specifically, the options I think I understand well enough to not mess myself up are:
--disable-checking: Will make the installation quicker, but at the risk
of missing errors. Since I'm paranoid, I'll probably
omit this option.
--disable-multilib: I don't understand this. I gather it has something
to do with variations on the compiler's target machine,
but that's all I can gather.
At worst, if I omit this option, I think I'll just
end up with some extra libraries, which doesn't seem
so bad. Why do/don't I want to use this?
--with-system-zlib: Use the zlib that I already have with my system,
rather than gcc's version. This seems reasonable to
me.
--enable-languages=c,c++,go,objc: AFAIK, I'm really just interested in c & c++,
so this option seems pretty harmless, although I might
just use --enable-lnguages=all, since it can't hurt.
The options that do worry me are:
--program-suffix=-5.3: This seems just to add a -5.3 suffix
at the end of the installation path,
which is probably a good idea if I get the
path right
prefix=/usr/local/gcc-5.3: This just seems to specify the
installation directory and to make the
--program-suffix=-5.3 specification
redundant. However, it is the option that
makes me the most uneasy.
When I do a find . -name gcc, the only relevant paths I see are /usr/lib/gcc and /usr/bin/gcc
In /usr/lib/gcc, there are two sub-directories - i686-linux-gnu and x86_64-linux-gnu, since I have a 64-bit machine, I looked in the x64 directory.
There, I saw a soft-link - 4.9.3, that linked to a directory called 4.9, that had files for gcc-4.9. Similarly, I saw a softlink called 5.4.0 that linked to a directory called 5, that had files for gcc-5.4. So, I expect that I want to use prefix=/usr/lib/gcc/5.3 and not use the --program-suffix option. Is this correct?
At this point, I'm just assuming that when I run make & make install that the .a & .so files will get placed in /usr/lib/gcc/5.3 and that the executable will end up as /usr/bin/gcc-5.3 and that I'll be able to use Ubuntu's update-alternatives to move among gcc-5.4, gcc-5.3 and gcc-4.9
(Note: the reason I'm not using Synaptic is that it only provides gcc-5.4, which it calls gcc-5. Similarly, the ppa ppa:ubuntu-toolchain-r/test refers to all versions of gcc-5.X as gcc-5, which also seems dangerous to use. I suspect the decision to refer to all minor versions of gcc-5.x as gcc-5 is the root of my problems)
apt 16.04 ppa gcc
I'm currently running Ubuntu 16.04 and want to install gcc-5.3 from source, without disrupting thegcc-5.4 and gcc-4.9 that I have already installed using Synaptic package manager.
The reason I want gcc-5.3 is I'm using CUDA 8.0 RC, which doesn't support gcc versions after 5.3. Rather than downgrading to 4.9, I'd like to install (or at least know how to install) 5.3. I already have the code for gcc-5.3 and only need to go through the configure/make/make install ritual.
Now, I need to understand the various configure options before running make and make install. I particularly want to be certain that I install gcc-5.3 in the right place and don't interfere with my existing gcc-5.4 and gcc-4.9.
I found one account of how to configure 5.3, that was as follows:
./gcc-5.3.0/configure --disable-checking --program-suffix=-5.3 --enable-languages=c,c++,go,objc --disable-multilib --with-system-zlib prefix=/usr/local/gcc-5.3
Some of these options make sense, others don't. Specifically, the options I think I understand well enough to not mess myself up are:
--disable-checking: Will make the installation quicker, but at the risk
of missing errors. Since I'm paranoid, I'll probably
omit this option.
--disable-multilib: I don't understand this. I gather it has something
to do with variations on the compiler's target machine,
but that's all I can gather.
At worst, if I omit this option, I think I'll just
end up with some extra libraries, which doesn't seem
so bad. Why do/don't I want to use this?
--with-system-zlib: Use the zlib that I already have with my system,
rather than gcc's version. This seems reasonable to
me.
--enable-languages=c,c++,go,objc: AFAIK, I'm really just interested in c & c++,
so this option seems pretty harmless, although I might
just use --enable-lnguages=all, since it can't hurt.
The options that do worry me are:
--program-suffix=-5.3: This seems just to add a -5.3 suffix
at the end of the installation path,
which is probably a good idea if I get the
path right
prefix=/usr/local/gcc-5.3: This just seems to specify the
installation directory and to make the
--program-suffix=-5.3 specification
redundant. However, it is the option that
makes me the most uneasy.
When I do a find . -name gcc, the only relevant paths I see are /usr/lib/gcc and /usr/bin/gcc
In /usr/lib/gcc, there are two sub-directories - i686-linux-gnu and x86_64-linux-gnu, since I have a 64-bit machine, I looked in the x64 directory.
There, I saw a soft-link - 4.9.3, that linked to a directory called 4.9, that had files for gcc-4.9. Similarly, I saw a softlink called 5.4.0 that linked to a directory called 5, that had files for gcc-5.4. So, I expect that I want to use prefix=/usr/lib/gcc/5.3 and not use the --program-suffix option. Is this correct?
At this point, I'm just assuming that when I run make & make install that the .a & .so files will get placed in /usr/lib/gcc/5.3 and that the executable will end up as /usr/bin/gcc-5.3 and that I'll be able to use Ubuntu's update-alternatives to move among gcc-5.4, gcc-5.3 and gcc-4.9
(Note: the reason I'm not using Synaptic is that it only provides gcc-5.4, which it calls gcc-5. Similarly, the ppa ppa:ubuntu-toolchain-r/test refers to all versions of gcc-5.X as gcc-5, which also seems dangerous to use. I suspect the decision to refer to all minor versions of gcc-5.x as gcc-5 is the root of my problems)
apt 16.04 ppa gcc
apt 16.04 ppa gcc
asked Aug 12 '16 at 16:19
user1245262
15618
15618
2
my strong recommendation is to use docker or LXD container for such different "compiler environments". Makes it much easier to run different compiler setups and versions and you avoid to create a dirty host system.
– 0x0C4
Aug 12 '16 at 16:27
I agree with @malo. Especially, I'm againstppa:ubuntu-toolchain-r/test. That can cause a lot of headache
– Anwar
Aug 14 '16 at 8:41
add a comment |
2
my strong recommendation is to use docker or LXD container for such different "compiler environments". Makes it much easier to run different compiler setups and versions and you avoid to create a dirty host system.
– 0x0C4
Aug 12 '16 at 16:27
I agree with @malo. Especially, I'm againstppa:ubuntu-toolchain-r/test. That can cause a lot of headache
– Anwar
Aug 14 '16 at 8:41
2
2
my strong recommendation is to use docker or LXD container for such different "compiler environments". Makes it much easier to run different compiler setups and versions and you avoid to create a dirty host system.
– 0x0C4
Aug 12 '16 at 16:27
my strong recommendation is to use docker or LXD container for such different "compiler environments". Makes it much easier to run different compiler setups and versions and you avoid to create a dirty host system.
– 0x0C4
Aug 12 '16 at 16:27
I agree with @malo. Especially, I'm against
ppa:ubuntu-toolchain-r/test. That can cause a lot of headache– Anwar
Aug 14 '16 at 8:41
I agree with @malo. Especially, I'm against
ppa:ubuntu-toolchain-r/test. That can cause a lot of headache– Anwar
Aug 14 '16 at 8:41
add a comment |
1 Answer
1
active
oldest
votes
You don't need to install gcc=5.3 from source in that case. You can use a conda environment (install Miniconda or Anaconda) and install gcc_linux-64=5.3.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f811530%2fhow-do-i-install-gcc-5-3-on-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You don't need to install gcc=5.3 from source in that case. You can use a conda environment (install Miniconda or Anaconda) and install gcc_linux-64=5.3.
add a comment |
You don't need to install gcc=5.3 from source in that case. You can use a conda environment (install Miniconda or Anaconda) and install gcc_linux-64=5.3.
add a comment |
You don't need to install gcc=5.3 from source in that case. You can use a conda environment (install Miniconda or Anaconda) and install gcc_linux-64=5.3.
You don't need to install gcc=5.3 from source in that case. You can use a conda environment (install Miniconda or Anaconda) and install gcc_linux-64=5.3.
answered Aug 16 at 2:32
cosmoscalibur
662617
662617
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f811530%2fhow-do-i-install-gcc-5-3-on-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
my strong recommendation is to use docker or LXD container for such different "compiler environments". Makes it much easier to run different compiler setups and versions and you avoid to create a dirty host system.
– 0x0C4
Aug 12 '16 at 16:27
I agree with @malo. Especially, I'm against
ppa:ubuntu-toolchain-r/test. That can cause a lot of headache– Anwar
Aug 14 '16 at 8:41