debug xulrunner build on mac crashes with illegal instruction

5 views
Skip to first unread message

Axel Hecht

unread,
Oct 20, 2006, 9:01:21 AM10/20/06
to
Here is what I'm doing:

my mozconfig is

. $topsrcdir/xulrunner/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../xr-debug
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --disable-libxul

(No, I haven't tried to --enable-libxul, because that's not what I want.
I want to do development on native libraries).

I installed that xulrunner into /Library/Frameworks via symlinks:

fruit:~/src/trunk/mozilla axel$ find /Library/Frameworks/XUL.framework/
-type l|xargs ls -l
lrwxr-xr-x 1 root admin 64 Oct 14 15:17
/Library/Frameworks/XUL.framework//Versions/1.9a1 ->
/Users/axel/src/trunk/xr-debug/dist/XUL.framework/Versions/1.9a1
lrwxr-xr-x 1 root admin 5 Oct 14 15:18
/Library/Frameworks/XUL.framework//Versions/Current -> 1.9a1
lrwxr-xr-x 1 root admin 20 Feb 3 2006
/Library/Frameworks/XUL.framework//XUL -> Versions/Current/XUL
lrwxr-xr-x 1 root admin 31 Feb 3 2006
/Library/Frameworks/XUL.framework//libxpcom.dylib ->
Versions/Current/libxpcom.dylib
lrwxr-xr-x 1 root admin 30 Feb 3 2006
/Library/Frameworks/XUL.framework//xulrunner-bin ->
Versions/Current/xulrunner-bin

Then I install simple via

/Library/Frameworks/XUL.framework/xulrunner-bin --install-app
../xpi-stage/simple/

and try to run it:

fruit:/Applications/MozillaTest axel$ gdb
./Simple.app/Contents/MacOS/xulrunner
GNU gdb 6.1-20040303 (Apple version gdb-413) (Wed May 18 10:17:02 GMT 2005)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin"...Reading symbols for
shared libraries ... done

(gdb) r
Starting program:
/Applications/MozillaTest/Simple.app/Contents/MacOS/xulrunner
Reading symbols for shared libraries
.................................................................. done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.
0x00016b50 in XRE_CreateAppData ()
(gdb)

Any idea what's going on?

Axel

Benjamin Smedberg

unread,
Oct 20, 2006, 9:12:12 AM10/20/06
to
Axel Hecht wrote:

> Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.
> 0x00016b50 in XRE_CreateAppData ()
> (gdb)
>
> Any idea what's going on?

yes! When you --disable-libxul, the XPCOM glue doesn't have information
about how to load all the dependent libraries like libgfx.dylib. In order to
use XR successfully in --disable-libxul mode, you have to setup
DYLD_LIBRARY_PATH to include /Library/Frameworks/XUL.framework/Versions/1.9a1

--BDS

Axel Hecht

unread,
Oct 20, 2006, 1:25:57 PM10/20/06
to

Works like charm. And to everybody else wondering, doQuitApplication()
is what you need to close your app on mac ;-).

Is there a spot on devmo where this should be gathered?

Axel

Reply all
Reply to author
Forward
0 new messages