andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.

Home Page:https://wiki.mozilla.org/B2G

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

source load-config.sh fails on mac

bgirard opened this issue · comments

Trying to run 'make attach-gdb' I get this error:

/Volumes/MacintoshHD/Users/benoitgirard/mozilla/b2g/tree> make adb-attach
GNUmakefile:2: *** Must source setup.sh or build/envsetup.sh to use make directly. Stop.

after 'source build/envsetup.sh ' I still get the same error above.

When I run 'source load-config.sh' I get the following error:
dirname: illegal option -- b

This is because '$0' when sourcing on mac is '-bash' giving 'dirname -bash'.
B2G_DIR=$(cd dirname $0; pwd)

You're using the new build system, so

  1. This issue is filed in the wrong place since the new build system is checked out from https://github.com/mozilla-b2g/B2G
  2. All the old commands from the old build system do not work. Forget them. If you want to attach gdb, use ./run-gdb.sh attach

I've seen that now. The problem is I was following the setup in 'https://wiki.mozilla.org/B2G/gdb' which are wrong instead of 'https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Debugging_on_Boot_to_Gecko'. The problem is there's inconsistent information which made me lost a bunch of time.