2

I am trying to build 32-bit breakpad on a 64-bit Linux system but I am getting the build error. I did the following as explained here.

./configure CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32

make

In make, I am getting the following error:

src/common/stabs_reader.cc: In member function ‘bool google_breakpad::StabsReader::Process()’:

src/common/stabs_reader.cc:98:35: error: ‘N_UNDF’ was not declared in this scope

 } else if (iterator_->type == N_UNDF && unitized_) {
                               ^

Makefile:4678: recipe for target 'src/common/stabs_reader.o' failed

make: *** [src/common/stabs_reader.o] Error 1

Then I looked into the ./configure output and saw that it could be the problem with a.out.h because of the following output:

checking a.out.h usability... no

checking a.out.h presence... no

checking for a.out.h... no

Anyone else face this problem? Am I missing something?

Arpit
  • 767
  • 7
  • 20
  • sounds like you're missing the linux kernel headers. On my machine they're supplied by the package `linux-libc-dev` – Anya Shenanigans Apr 06 '16 at 09:22
  • even with that, it doesn't build, complaining about: `src/client/linux/crash_generation/crash_generation_client.cc:40:51: fatal error: third_party/lss/linux_syscall_support.h: No such file or directory` - that file is not in the checked out source – Anya Shenanigans Apr 06 '16 at 09:37
  • @Petesh linux-libc-dev is already installed on my system. I am able to build 64 bit breakpad. – Arpit Apr 06 '16 at 09:54
  • I have an `a.out.h`, I don't have a `linux_syscall_support.h`. I can't build breakpad on my system for a reason other than you have. Without knowing what linux version/gcc version/package version you have; we're at a standstill here. – Anya Shenanigans Apr 06 '16 at 13:01
  • @Petesh How did you downloaded the breakpad? Have you used `fetch breakpad` command? Or directly cloned it. There is a problem if you directly clone it. First, download google `dept_tools`. And then run `fetch breakpad`. Check the instructions here at the bottom of the page. https://chromium.googlesource.com/breakpad/breakpad/ – Arpit Apr 06 '16 at 13:26
  • The documentation seems to imply that I didn't need to do that; of course, annoyingly it magically works because the directory in question isn't what you check out. Still doesn't build; however the file is ``, so simply reference that file in the .cc file, and ensure you configure using: `env ac_cv_header_a_out_h=yes CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure` - I can't find `a.out.h` in `/usr/include` – Anya Shenanigans Apr 06 '16 at 14:38
  • I submitted a patch for breakpad to address this - it does seem to be a breakdown in the 32bit support. – Anya Shenanigans Apr 06 '16 at 15:15

1 Answers1

6

Looks like a bug in the 32bit breakpad build.

I've submitted a patch to the project; in the interim, you can simply edit src/common/stabs_reader.h and replace:

#include <a.out.h>

with

#include <linux/a.out.h>

and configuring with:

env ac_cv_header_a_out_h=yes CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure
Anya Shenanigans
  • 91,618
  • 3
  • 107
  • 122