Riot: objcopy: command not found

Created on 17 Oct 2016  路  16Comments  路  Source: RIOT-OS/RIOT

Hi,

I'm trying to setup RIOT shell on MAC OSX using this guide: http://riot-os.org/api/index.html#the-quickest-start

While trying 'make all' I'm getting an error:

__TEXT __DATA __OBJC others dec hex
90112 1220608 0 24576 1335296 146000
bash: objcopy: command not found
make: *** [all] Error 127

And there's an error after using the command: 'git checkout '
Error: -bash: syntax error near unexpected token `newline'

I installed binutils but the package name is gobjcopy rather than objcopy. I'm unable to use it.
I also added alias in ~/.profile as:

alias objcopy="gobjcopy"
alias objdump="gobjdump"

This also didn't work and I got the same error that objdump command is not found.

Please let me know how to proceed from here

build system Mac OS X native question

Most helpful comment

Type mdfind -name objcopy to locate where the objcopy is installed.

If you don't have a file named objcopy but gobjcopy, make a symlink to it and add it to your PATH:

mkdir -p ~/bin
ln -s /path/to/gobjcopy ~/bin/objcopy
ln -s /path/to/gobjdump ~/bin/objdump
...
 PATH=$PATH:~/bin/ make BOARD=native

All 16 comments

If you are using MacPorts, setting PATH will work.
PATH=$PATH:/opt/local/x86_64-apple-darwin15.6.0/bin/ make BOARD=native

I tried, and still I get the same error. ):
screen shot 2016-10-18 at 12 21 05

Type mdfind -name objcopy to locate where the objcopy is installed.

If you don't have a file named objcopy but gobjcopy, make a symlink to it and add it to your PATH:

mkdir -p ~/bin
ln -s /path/to/gobjcopy ~/bin/objcopy
ln -s /path/to/gobjdump ~/bin/objdump
...
 PATH=$PATH:~/bin/ make BOARD=native

I have installed objcopy. what should i do next? (Below is the path)
screen shot 2016-10-18 at 12 33 12

mkdir -p ~/bin
ln -s /usr/local/Cellar/binutils/2.27/bin/gobjcopy ~/bin/objcopy
PATH=$PATH:~/bin make BOARD=native

To other maintainers:
BTW, boards/native/Makefile.include will use gobjcopy if it is available, but cpu/Makefile.include.llvm just try to use objcopy. I guess that is the cause of this issue (not confimed yet). If so, we should update cpu/Makefile.include.llvm to use gobjcopy if objcopy is not available.

After following above instructions, again when i tried running "make all" i still got the same error. :! (or after following above instruction, I don't need to run "make all" ? )

I confirm the issue, I didn't provide a patch for that since I don't use a lot the native port but I think we should work on it, even if there are no "a lot" of Mac OS X users I think is important.

@kYc0o would it be possible to provide this patch for the release?

@sinkarharshad
What is displayed with the following commands?

ls -l ~/bin
export PATH=$PATH:~/bin
type objcopy

@miri64 @kYc0o I made a PR #5965.

@Yonezawa-T2 "make all" no error, for "make term" I am getting this following error.
screen shot 2016-10-19 at 05 40 56

@sinkarharshad Install http://tuntaposx.sourceforge.net/.

After installing tunetap, and I tried again .. and got following error.
screen shot 2016-10-19 at 06 00 18

Try sudo make term.

Tips: if you get resource busy error on tap interface, find a process named *.elf, then kill it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kaspar030 picture kaspar030  路  6Comments

silkeh picture silkeh  路  5Comments

OlegHahm picture OlegHahm  路  4Comments

kaspar030 picture kaspar030  路  3Comments

jcarrano picture jcarrano  路  7Comments