0

I am trying to install a gcc-arm version but run into trouble while trying to run the setup shell script.

Following step 2 in the prerequisites I downloaded GNU ARM embedded toolchain v4.9-2015q3. https://github.com/NordicSemiconductor/Nordic-Thingy52-FW

I have now tried to run the setup_sdk.sh file with sh setup_sdk.sh. I get the following message.

robban@:Nordic-Thingy52-FW-master$ sh setup_sdk.sh 
/bin/sh: 1: /usr/local/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc: not found
Cannot find: "/usr/local/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc".
Please set values in: "/home/robban/sommarjobb/Examensarbete/Nordic-Thingy52-FW-master/external/sdk13/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
../../../../components/toolchain/gcc/Makefile.common:25: *** Cannot continue.  Stop.
/bin/sh: 1: /usr/local/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc: not found
Cannot find: "/usr/local/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gcc".
Please set values in: "/home/robban/sommarjobb/Examensarbete/Nordic-Thingy52-FW-master/external/sdk13/components/toolchain/gcc/Makefile.posix"
according to the actual configuration of your system.
../../../../components/toolchain/gcc/Makefile.common:25: *** Cannot continue.  Stop.

Now looking at the path /usr/local/gcc-arm-none-eabi-4_9-2015q3/bin.

robban@:bin$ ls
arm-none-eabi-addr2line  arm-none-eabi-gcc-4.9.3   arm-none-eabi-ld.bfd
arm-none-eabi-ar         arm-none-eabi-gcc-ar      arm-none-eabi-nm
arm-none-eabi-as         arm-none-eabi-gcc-nm      arm-none-eabi-objcopy
arm-none-eabi-c++        arm-none-eabi-gcc-ranlib  arm-none-eabi-objdump
arm-none-eabi-c++filt    arm-none-eabi-gcov        arm-none-eabi-ranlib
arm-none-eabi-cpp        arm-none-eabi-gdb         arm-none-eabi-readelf
arm-none-eabi-elfedit    arm-none-eabi-gdb-py      arm-none-eabi-size
arm-none-eabi-g++        arm-none-eabi-gprof       arm-none-eabi-strings
arm-none-eabi-gcc        arm-none-eabi-ld          arm-none-eabi-strip

The file is clearly there, and I can even do less arm-none-eabi-gcc to read the binary. But I can't do ./arm-none-eabi-gcc, because it tells me that the file is not found.

I also did add the bin directory to my path.

robban@:~$ echo $PATH
/home/robban/bin:/home/robban/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm-none-eabi-4_9-2015q3/bin

robban@:bin$ uname -a Linux robban-K56CB 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
robban@:bin$ file arm-none-eabi-gcc arm-none-eabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 2.6.8, stripped 
user4556274
  • 8,995
  • 2
  • 33
  • 37
Robban
  • 9
  • 1
    What is the architecture of the machine on which you are running this (uname -a), and of the executable (file arm-none-eabi-gcc) ? – user4556274 Jun 14 '19 at 18:54
  • Any chance this might be a permission problem? IOW does the shell running the (install/setup) script have the correct permissions to see these files? Who owns the files the script is looking for? Did you download the archive, and unpack it? If so. Did you examine the permissions of the unpacked files? Are they owned by you, or as group you're in? Is the script itself owned by you, or a group you're in? – somebody Jun 14 '19 at 18:51
  • @somebody I'm not sure actually, how can I check these permissions? I can see that the file has execute permissions for users, and I have also tried running the command with sudo, but no success there either. – Robban Jun 17 '19 at 06:33
  • @user4556274

    robban@:bin$ uname -a Linux robban-K56CB 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

    robban@:bin$ file arm-none-eabi-gcc arm-none-eabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 2.6.8, stripped

    – Robban Jun 17 '19 at 06:36
  • @Robban ls -CGla should provide the necessary information. Basically, you're going to need to know that script you run has the perms to Read, and eXecute all the files concerned -- maybe your permissions? The problem with unpacking tar archives is that they typically maintain the same perms that they had on the packers system when they were packed up. Which may not translate to those of your own system. – somebody Jun 17 '19 at 07:07
  • @user4556274Actually you were right, and I managed to solve that issue I think! Thanks :) – Robban Jun 17 '19 at 08:11

0 Answers0