andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
https://wiki.mozilla.org/B2G
909 stars 158 forks source link

source load-config.sh fails on mac #307

Closed bgirard closed 12 years ago

bgirard commented 12 years ago

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)

michaelwu commented 12 years ago

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
bgirard commented 12 years ago

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.