Fatal error with arm-none-eabi-gcc execution

Asked by Corentin

Hello,

I'm trying to execute "arm-none-eabi-gcc" like it's explained on the ReadMe document (from the package gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2).

My OS is the last version of Ubuntu 18.04.

Firstly I followed the "readme.txt" :

$ $install_dir/gcc-arm-none-eabi-*/bin/arm-none-eabi-gcc
bash : /gcc-arm-none-eabi-*/bin/arm-none-eabi-gcc: Aucun fichier ou dossier de ce type

$ $install_dir && ./arm-none-eabi-gcc
arm-none-eabi-gcc: fatal error: no input files

I've seen theat I need to install gcc-arm-none-eabi to managed it.

$ sudo apt install gcc-arm-none-eabi

I've decided to try again the execution. But I've always got the same error "arm-none-eabi-gcc: fatal error: no input files".

 To show you what happens, this is the result of "strace" command :

corentin@corentin-HP-Z2-Mini-G3-Workstation:~/Téléchargements/gcc-arm-none-eabi-9-2019-q4-major/bin$ strace ./arm-none-eabi-gcc
execve("./arm-none-eabi-gcc", ["./arm-none-eabi-gcc"], 0x7fff881642f0 /* 53 vars */) = 0
brk(NULL) = 0x1af5000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=84783, ...}) = 0
mmap(NULL, 84783, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4f508b1000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2030544, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4f508af000
mmap(NULL, 4131552, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4f502ae000
mprotect(0x7f4f50495000, 2097152, PROT_NONE) = 0
mmap(0x7f4f50695000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7f4f50695000
mmap(0x7f4f5069b000, 15072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4f5069b000
close(3) = 0
arch_prctl(ARCH_SET_FS, 0x7f4f508b0580) = 0
mprotect(0x7f4f50695000, 16384, PROT_READ) = 0
mprotect(0x715000, 8192, PROT_READ) = 0
mprotect(0x7f4f508c6000, 4096, PROT_READ) = 0
munmap(0x7f4f508b1000, 84783) = 0
brk(NULL) = 0x1af5000
brk(0x1b16000) = 0x1b16000
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=46, ws_col=153, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=46, ws_col=153, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_IGN, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)= 0
rt_sigaction(SIGINT, {sa_handler=0x4069b0, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_IGN, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, 8)= 0
rt_sigaction(SIGHUP, {sa_handler=SIG_IGN, sa_mask=[HUP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)= 0
rt_sigaction(SIGHUP, {sa_handler=0x4069b0, sa_mask=[HUP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_IGN, sa_mask=[HUP], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, 8)= 0
rt_sigaction(SIGTERM, {sa_handler=SIG_IGN, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)= 0
rt_sigaction(SIGTERM, {sa_handler=0x4069b0, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_IGN, sa_mask=[TERM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, 8)= 0
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)= 0
rt_sigaction(SIGPIPE, {sa_handler=0x4069b0, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, 8)= 0
rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[CHLD], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4f502ecf20}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)= 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
prlimit64(0, RLIMIT_STACK, {rlim_cur=65536*1024, rlim_max=RLIM64_INFINITY}, NULL) = 0
getcwd("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin", 4096) = 71
lstat("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc", {st_mode=S_IFREG|0755, st_size=1149560, ...}) = 0
getcwd("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin", 4096) = 71
lstat("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc", {st_mode=S_IFREG|0755, st_size=1149560, ...}) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/", X_OK) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/", X_OK) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/", X_OK) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/", X_OK) = 0
getcwd("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin", 4096) = 71
lstat("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc", {st_mode=S_IFREG|0755, st_size=1149560, ...}) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../arm-none-eabi", F_OK) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/specs", R_OK) = -1 ENOENT (No such file or directory)
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/specs", R_OK) = -1 ENOENT (No such file or directory)
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/arm-none-eabi/9.2.1/specs", R_OK) = -1 ENOENT (No such file or directory)
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib/specs", R_OK) = -1 ENOENT (No such file or directory)
access("/mnt/workspace/workspace/GCC-9-pipeline/jenkins-GCC-9-pipeline-100_20191030_1572397542/install-native/lib/gcc/arm-none-eabi/specs", R_OK) = -1 ENOENT (No such file or directory)
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/", X_OK) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/", X_OK) = 0
brk(0x1b37000) = 0x1b37000
stat("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/lto-wrapper", {st_mode=S_IFREG|0755, st_size=1044560, ...}) = 0
access("/home/corentin/T\303\251l\303\251chargements/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/lto-wrapper", X_OK) = 0
write(2, "\33[01m\33[Karm-none-eabi-gcc:\33[m\33[K"..., 78arm-none-eabi-gcc: fatal error: no input files
) = 78
write(2, "compilation terminated.\n", 24compilation terminated.
) = 24
exit_group(1) = ?
+++ exited with 1 +++

Thanks for your help,

Regards,
Corentin.

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Joey Ye
Solved:
Last query:
Last reply:
Revision history for this message
Best Joey Ye (jinyun-ye) said :
#1

Corentin,

Your gcc is running as expected. It just complains that you are giving it a source file to compile. To resolve it, please give it a hello.c like arm-none-eabi-gcc hello.c -c to compiler.

To start a meaningful project please follow the sample projects under the samples directory.

Thanks,
Joey

Revision history for this message
Corentin (corentinfodip) said :
#2

Thanks Joey Ye, that solved my question.