wukenaihe / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

32-bit build fails on a 64-bit Linux system #190

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I build a 32-bit version of Firefox under a 64-bit Linux operating
system (2.6.18-1.2869.fc6 x86_64) using the 32-bit build tools ('gcc -m32',
'c++ -m32', etc.).  This used to work until linux breakpad was enabled. 
The build now fails here:

c++ -o exception_handler.o -c
-I../../../../../../../dist/include/system_wrappers -include
/home/wag/mozilla/trunk/config/gcc_hidden.h -DOSTYPE=\"Linux2.6.18-1.2869\"
-DOSARCH=Linux -DBUILD_ID=2007062214
-I/home/wag/mozilla/trunk/toolkit/airbag/airbag/src/client/linux/handler/../../.
.
 -I../../../../../../../dist/include  
-I../../../../../../../dist/include/handler
-I../../../../../../../dist/include/nspr  -DMOZ_PNG_READ -DMOZ_PNG_WRITE 
-I../../../../../../../dist/sdk/include    -fPIC   -fno-rtti
-fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
-Wno-long-long -pedantic -m32 -fshort-wchar -pthread -pipe  -DNDEBUG
-DTRIMMED -Os -freorder-blocks -fno-reorder-functions -gstabs+  
-DMOZILLA_CLIENT -include ../../../../../../../mozilla-config.h
-Wp,-MD,.deps/exception_handler.pp
/home/wag/mozilla/trunk/toolkit/airbag/airbag/src/client/linux/handler/exception
_handler.cc
/usr/include/bits/sigcontext.h:28: error: redefinition of ‘struct _fpreg’
/usr/include/asm-i386/sigcontext.h:19: error: previous definition of
‘struct _fpreg’
/usr/include/bits/sigcontext.h:34: error: redefinition of ‘struct _fpxreg’
/usr/include/asm-i386/sigcontext.h:24: error: previous definition of
‘struct _fpxreg’
/usr/include/bits/sigcontext.h:41: error: redefinition of ‘struct _xmmreg’
/usr/include/asm-i386/sigcontext.h:30: error: previous definition of
‘struct _xmmreg’
/usr/include/bits/sigcontext.h:50: error: redefinition of ‘struct _fpstate’
/usr/include/asm-i386/sigcontext.h:34: error: previous definition of
‘struct _fpstate’
/usr/include/bits/sigcontext.h:81: error: redefinition of ‘struct 
sigcontext’
/usr/include/asm-i386/sigcontext.h:58: error: previous definition of
‘struct sigcontext’
gmake[6]: *** [exception_handler.o] Error 1
gmake[6]: Leaving directory
`/home/wag/mozilla/trunk/fx32-obj/toolkit/airbag/airbag/src/client/linux/handler
'
gmake[5]: *** [libs] Error 2
gmake[5]: Leaving directory `/home/wag/mozilla/trunk/fx32-obj/toolkit/airbag'
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory `/home/wag/mozilla/trunk/fx32-obj/toolkit'
gmake[3]: *** [libs_tier_toolkit] Error 2
gmake[3]: Leaving directory `/home/wag/mozilla/trunk/fx32-obj'
gmake[2]: *** [tier_toolkit] Error 2
gmake[2]: Leaving directory `/home/wag/mozilla/trunk/fx32-obj'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/wag/mozilla/trunk/fx32-obj'
make: *** [build] Error 2

Please provide any additional information below.

The issue is that exception_handler.cc includes signal.h and
asm/sigcontext.h.  signal.h already includes bits/sigcontext.h. 
Documentation seems to indicate that if you need the definitions in
sigcontext.h, you are supposed to include signal.h and not sigcontext.h.

The attached patch makes this change in both exception_handler.cc an
minidump_generator.cc.

Unfortunately, I have no system to use to test if this builds on a 32 bit
OS, nor do I have any way to test if it builds correctly on anything other
than Fedora Core 6.

I also do not know how to get a home made build to launch breakpad upon
crashing. or how to check what it produces to see if it is working
correctly.  I will be happy to test it if you someone can point me to
directions on how.

Original issue reported on code.google.com by wgianopo...@gmail.com on 23 Jun 2007 at 2:46

Attachments:

GoogleCodeExporter commented 9 years ago
Checked in, r=me.

Original comment by ted.mielczarek on 2 Jul 2007 at 6:13