Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Error 127 when running trying to compile code

Tags:

gcc

This semester I got this new subject where we get to work with Discovery STM32 F4, and we are still in the phase of setting it up. But I have this problem in the beginning.

When I try to compile this "blink" code I get this error:

Error 127

So, as I got it so far, we are using this shortcut command "make" to compile code, and we were given instruction to set it up as it's shown in images below:

Setup]

Can anyone see what's the problem here?

like image 849
Emir Avatar asked Apr 01 '16 20:04

Emir


People also ask

How do I fix Error 127?

The 127 error code indicates “command not found”. This occurs when any given command within your Bash script or on Bash command line is not found in any of the paths defined by PATH system environment variable. The solution is to make sure that the command your are using can be found within your $PATH.

What is error 127?

If you have received this warning on your PC, it means that there was a malfunction in your system operation. Error code "windows error 127" is one of the issues that users may get as a result of incorrect or failed installation or uninstallation of software that may have left invalid entries in system elements.


1 Answers

Error 127 means one of two things:

  1. file not found: the path you're using is incorrect. double check that the program is actually in your $PATH, or in this case, the relative path is correct -- remember that the current working directory for a random terminal might not be the same for the IDE you're using. it might be better to just use an absolute path instead.
  2. ldso is not found: you're using a pre-compiled binary and it wants an interpreter that isn't on your system. maybe you're using an x86_64 (64-bit) distro, but the prebuilt is for x86 (32-bit). you can determine whether this is the answer by opening a terminal and attempting to execute it directly. or by running file -L on /bin/sh (to get your default/native format) and on the compiler itself (to see what format it is).

if the problem is (2), then you can solve it in a few diff ways:

  1. get a better binary. talk to the vendor that gave you the toolchain and ask them for one that doesn't suck.
  2. see if your distro can install the multilib set of files. most x86_64 64-bit distros allow you to install x86 32-bit libraries in parallel.
  3. build your own cross-compiler using something like crosstool-ng.
  4. you could switch between an x86_64 & x86 install, but that seems a bit drastic ;).
like image 174
Mike Frysinger Avatar answered Sep 20 '22 14:09

Mike Frysinger