How to install cross-compiler on Ubuntu 18.04?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
My proc info:
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Stepping: 9
CPU MHz: 1036.788
CPU max MHz: 3500,0000
CPU min MHz: 800,0000
BogoMIPS: 6000.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-3
I tried:
sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
If I go for:
arm-linux-gcc
arm-linux-gcc: command not found
How to install cross-compiler?
ubuntu cross-compilation
add a comment |
My proc info:
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Stepping: 9
CPU MHz: 1036.788
CPU max MHz: 3500,0000
CPU min MHz: 800,0000
BogoMIPS: 6000.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-3
I tried:
sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
If I go for:
arm-linux-gcc
arm-linux-gcc: command not found
How to install cross-compiler?
ubuntu cross-compilation
5
According to the filelist, the compiler executable name isarm-linux-gnueabi-gcc
– steeldriver
Apr 2 at 9:36
add a comment |
My proc info:
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Stepping: 9
CPU MHz: 1036.788
CPU max MHz: 3500,0000
CPU min MHz: 800,0000
BogoMIPS: 6000.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-3
I tried:
sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
If I go for:
arm-linux-gcc
arm-linux-gcc: command not found
How to install cross-compiler?
ubuntu cross-compilation
My proc info:
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 158
Model name: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Stepping: 9
CPU MHz: 1036.788
CPU max MHz: 3500,0000
CPU min MHz: 800,0000
BogoMIPS: 6000.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 6144K
NUMA node0 CPU(s): 0-3
I tried:
sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
If I go for:
arm-linux-gcc
arm-linux-gcc: command not found
How to install cross-compiler?
ubuntu cross-compilation
ubuntu cross-compilation
edited Apr 2 at 9:50
GAD3R
28k1958114
28k1958114
asked Apr 2 at 9:19
MikiBelavistaMikiBelavista
4332819
4332819
5
According to the filelist, the compiler executable name isarm-linux-gnueabi-gcc
– steeldriver
Apr 2 at 9:36
add a comment |
5
According to the filelist, the compiler executable name isarm-linux-gnueabi-gcc
– steeldriver
Apr 2 at 9:36
5
5
According to the filelist, the compiler executable name is
arm-linux-gnueabi-gcc
– steeldriver
Apr 2 at 9:36
According to the filelist, the compiler executable name is
arm-linux-gnueabi-gcc
– steeldriver
Apr 2 at 9:36
add a comment |
2 Answers
2
active
oldest
votes
TLDR
you need to call arm-linux-gnueabi-gcc
not arm-linux-gcc
.
It looks like you've just got the wrong file name. For reference apt-file
is a useful tool.
sudo apt-get install apt-file
sudo apt-file update
apt-file search -x 'gcc$' | grep 'gcc-arm-linux-gnueabi'
This searches any file ending gcc
in any package with gcc-arm-linux-gnueabi
in the name. The result is:
gcc-arm-linux-gnueabi: /usr/bin/arm-linux-gnueabi-gcc
So if you have installed gcc-arm-linux-gnueabi
you should have a file /usr/bin/arm-linux-gnueabi-gcc
.
3
Knowing to search forarm-linux-gnueabi
means knowing the answer already ;-).apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.
– Stephen Kitt
Apr 2 at 9:48
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed andgcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..
– Philip Couling
Apr 2 at 9:55
I guess I just find it surprising to useapt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containingarm-linux-gnueabi
”) whenapt-file search
only searches package contents (which also incidentally finds package names, thanks to/usr/share/doc/<package>/copyright
).
– Stephen Kitt
Apr 2 at 10:56
|
show 3 more comments
As steeldriver suggests, you already have installed the cross-compiler; the problem is that you’re using the wrong command to invoke it, you need to use the arm-linux-gnueabi-
prefix in general. So run
arm-linux-gnueabi-gcc
or
arm-linux-gnueabi-g++
and it should work fine.
To figure this out yourself, you can use dpkg -L
to list the contents of the packages you’ve installed:
dpkg -L gcc-arm-linux-gnueabi
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f510031%2fhow-to-install-cross-compiler-on-ubuntu-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
TLDR
you need to call arm-linux-gnueabi-gcc
not arm-linux-gcc
.
It looks like you've just got the wrong file name. For reference apt-file
is a useful tool.
sudo apt-get install apt-file
sudo apt-file update
apt-file search -x 'gcc$' | grep 'gcc-arm-linux-gnueabi'
This searches any file ending gcc
in any package with gcc-arm-linux-gnueabi
in the name. The result is:
gcc-arm-linux-gnueabi: /usr/bin/arm-linux-gnueabi-gcc
So if you have installed gcc-arm-linux-gnueabi
you should have a file /usr/bin/arm-linux-gnueabi-gcc
.
3
Knowing to search forarm-linux-gnueabi
means knowing the answer already ;-).apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.
– Stephen Kitt
Apr 2 at 9:48
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed andgcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..
– Philip Couling
Apr 2 at 9:55
I guess I just find it surprising to useapt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containingarm-linux-gnueabi
”) whenapt-file search
only searches package contents (which also incidentally finds package names, thanks to/usr/share/doc/<package>/copyright
).
– Stephen Kitt
Apr 2 at 10:56
|
show 3 more comments
TLDR
you need to call arm-linux-gnueabi-gcc
not arm-linux-gcc
.
It looks like you've just got the wrong file name. For reference apt-file
is a useful tool.
sudo apt-get install apt-file
sudo apt-file update
apt-file search -x 'gcc$' | grep 'gcc-arm-linux-gnueabi'
This searches any file ending gcc
in any package with gcc-arm-linux-gnueabi
in the name. The result is:
gcc-arm-linux-gnueabi: /usr/bin/arm-linux-gnueabi-gcc
So if you have installed gcc-arm-linux-gnueabi
you should have a file /usr/bin/arm-linux-gnueabi-gcc
.
3
Knowing to search forarm-linux-gnueabi
means knowing the answer already ;-).apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.
– Stephen Kitt
Apr 2 at 9:48
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed andgcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..
– Philip Couling
Apr 2 at 9:55
I guess I just find it surprising to useapt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containingarm-linux-gnueabi
”) whenapt-file search
only searches package contents (which also incidentally finds package names, thanks to/usr/share/doc/<package>/copyright
).
– Stephen Kitt
Apr 2 at 10:56
|
show 3 more comments
TLDR
you need to call arm-linux-gnueabi-gcc
not arm-linux-gcc
.
It looks like you've just got the wrong file name. For reference apt-file
is a useful tool.
sudo apt-get install apt-file
sudo apt-file update
apt-file search -x 'gcc$' | grep 'gcc-arm-linux-gnueabi'
This searches any file ending gcc
in any package with gcc-arm-linux-gnueabi
in the name. The result is:
gcc-arm-linux-gnueabi: /usr/bin/arm-linux-gnueabi-gcc
So if you have installed gcc-arm-linux-gnueabi
you should have a file /usr/bin/arm-linux-gnueabi-gcc
.
TLDR
you need to call arm-linux-gnueabi-gcc
not arm-linux-gcc
.
It looks like you've just got the wrong file name. For reference apt-file
is a useful tool.
sudo apt-get install apt-file
sudo apt-file update
apt-file search -x 'gcc$' | grep 'gcc-arm-linux-gnueabi'
This searches any file ending gcc
in any package with gcc-arm-linux-gnueabi
in the name. The result is:
gcc-arm-linux-gnueabi: /usr/bin/arm-linux-gnueabi-gcc
So if you have installed gcc-arm-linux-gnueabi
you should have a file /usr/bin/arm-linux-gnueabi-gcc
.
edited Apr 2 at 11:13
answered Apr 2 at 9:42
Philip CoulingPhilip Couling
2,5211123
2,5211123
3
Knowing to search forarm-linux-gnueabi
means knowing the answer already ;-).apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.
– Stephen Kitt
Apr 2 at 9:48
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed andgcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..
– Philip Couling
Apr 2 at 9:55
I guess I just find it surprising to useapt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containingarm-linux-gnueabi
”) whenapt-file search
only searches package contents (which also incidentally finds package names, thanks to/usr/share/doc/<package>/copyright
).
– Stephen Kitt
Apr 2 at 10:56
|
show 3 more comments
3
Knowing to search forarm-linux-gnueabi
means knowing the answer already ;-).apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.
– Stephen Kitt
Apr 2 at 9:48
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed andgcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..
– Philip Couling
Apr 2 at 9:55
I guess I just find it surprising to useapt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containingarm-linux-gnueabi
”) whenapt-file search
only searches package contents (which also incidentally finds package names, thanks to/usr/share/doc/<package>/copyright
).
– Stephen Kitt
Apr 2 at 10:56
3
3
Knowing to search for
arm-linux-gnueabi
means knowing the answer already ;-). apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.– Stephen Kitt
Apr 2 at 9:48
Knowing to search for
arm-linux-gnueabi
means knowing the answer already ;-). apt-file search -x 'arm-linux.*gcc$'
would be more discoverable.– Stephen Kitt
Apr 2 at 9:48
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
True. It was in the OP's question under "I tried..." but as you say, if you don't know, good knowledge of regular expressions is also helpful.
– Philip Couling
Apr 2 at 9:50
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
My point is that the OP didn’t know what command to run, so couldn’t know what to search for in package contents (as opposed to package names).
– Stephen Kitt
Apr 2 at 9:51
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed and
gcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..– Philip Couling
Apr 2 at 9:55
I had no prior knowledge of any of this before attempting to find it myself. The search in my answer is constructed of the package they already installed and
gcc
at the end of the command name - a generalisation of what they were already trying (arm-linux-gcc
) - It was the first thing I tried..– Philip Couling
Apr 2 at 9:55
I guess I just find it surprising to use
apt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containing arm-linux-gnueabi
”) when apt-file search
only searches package contents (which also incidentally finds package names, thanks to /usr/share/doc/<package>/copyright
).– Stephen Kitt
Apr 2 at 10:56
I guess I just find it surprising to use
apt-file search
to look for a package name (as you put it, “This searches all packages for a file or package containing arm-linux-gnueabi
”) when apt-file search
only searches package contents (which also incidentally finds package names, thanks to /usr/share/doc/<package>/copyright
).– Stephen Kitt
Apr 2 at 10:56
|
show 3 more comments
As steeldriver suggests, you already have installed the cross-compiler; the problem is that you’re using the wrong command to invoke it, you need to use the arm-linux-gnueabi-
prefix in general. So run
arm-linux-gnueabi-gcc
or
arm-linux-gnueabi-g++
and it should work fine.
To figure this out yourself, you can use dpkg -L
to list the contents of the packages you’ve installed:
dpkg -L gcc-arm-linux-gnueabi
add a comment |
As steeldriver suggests, you already have installed the cross-compiler; the problem is that you’re using the wrong command to invoke it, you need to use the arm-linux-gnueabi-
prefix in general. So run
arm-linux-gnueabi-gcc
or
arm-linux-gnueabi-g++
and it should work fine.
To figure this out yourself, you can use dpkg -L
to list the contents of the packages you’ve installed:
dpkg -L gcc-arm-linux-gnueabi
add a comment |
As steeldriver suggests, you already have installed the cross-compiler; the problem is that you’re using the wrong command to invoke it, you need to use the arm-linux-gnueabi-
prefix in general. So run
arm-linux-gnueabi-gcc
or
arm-linux-gnueabi-g++
and it should work fine.
To figure this out yourself, you can use dpkg -L
to list the contents of the packages you’ve installed:
dpkg -L gcc-arm-linux-gnueabi
As steeldriver suggests, you already have installed the cross-compiler; the problem is that you’re using the wrong command to invoke it, you need to use the arm-linux-gnueabi-
prefix in general. So run
arm-linux-gnueabi-gcc
or
arm-linux-gnueabi-g++
and it should work fine.
To figure this out yourself, you can use dpkg -L
to list the contents of the packages you’ve installed:
dpkg -L gcc-arm-linux-gnueabi
edited Apr 2 at 10:56
answered Apr 2 at 9:42
Stephen KittStephen Kitt
180k25411491
180k25411491
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f510031%2fhow-to-install-cross-compiler-on-ubuntu-18-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
5
According to the filelist, the compiler executable name is
arm-linux-gnueabi-gcc
– steeldriver
Apr 2 at 9:36