tmm1 / gdb.rb

gdb hooks for MRI/REE (and some for YARV)
220 stars 18 forks source link

bundle install fails on Debian #10

Open alexis779 opened 10 years ago

alexis779 commented 10 years ago

Trying to debug a memory leak in a Rails app, i could not get the gem installed.

This is my simple Gemfile:

source 'https://rubygems.org'
gem "gdb.rb"

I'm using Debian unstable on Macbook Pro.

$ uname -a
Linux alexis-laptop 3.10-3-amd64 #1 SMP Debian 3.10.11-1 (2013-09-10) x86_64 GNU/Linux

I already have gdb-7.6.1-1 and python-2.7.5-5 installed. I installed libruby1.8-dbg libruby1.9.1-dbg python-dev ncurses-dev packages as recommended but that does not help much. The gem build attempts to install and old version of gdb, version 7.2.

$ bundle install
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
checking for python2.4/Python.h... no
checking for python2.5/Python.h... no
checking for python2.6/Python.h... no
checking for python2.7/Python.h... yes
checking for ncurses.h... yes
(I'm about to compile gdb7.. this will definitely take a while)
  -- tar jxvf gdb-7.2.tar.bz2
  -- patch -p1 < ../../../../patches/gdb-leak.patch
  -- patch -p1 < ../../../../patches/gdb-strings.patch
  -- ./configure --prefix=/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/dst/ --with-python=yes
  -- make
extconf.rb:6:in `sys': make failed, please report to gdb@tmm1.net with pastie.org link to /home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/mkmf.log and /home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/src/gdb-7.2/config.log (RuntimeError)
        from extconf.rb:74:in `block (2 levels) in <main>'
        from extconf.rb:72:in `chdir'
        from extconf.rb:72:in `block in <main>'
        from extconf.rb:52:in `chdir'
        from extconf.rb:52:in `<main>'

Gem files will remain installed in /home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7 for inspection.
Results logged to /home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/gem_make.out
An error occurred while installing gdb.rb (0.1.7), and Bundler cannot continue.
Make sure that `gem install gdb.rb -v '0.1.7'` succeeds before bundling.

This is the build error:

/bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include  -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_i386linux_vec -DHAVE_i386pei_vec -DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec  -DBINDIR='"/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/dst/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfdio.lo -MD -MP -MF .deps/bfdio.Tpo -c -o bfdio.lo bfdio.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_i386linux_vec -DHAVE_i386pei_vec -DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/dst/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfdio.lo -MD -MP -MF .deps/bfdio.Tpo -c bfdio.c -o bfdio.o
bfdio.c: In function ‘memory_bstat’:
bfdio.c:580:30: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
   memset (statbuf, 0, sizeof (statbuf));
                              ^
cc1: all warnings being treated as errors
make[4]: *** [bfdio.lo] Error 1
make[4]: Leaving directory `/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/src/gdb-7.2/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/src/gdb-7.2/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/src/gdb-7.2/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/home/alexis2/.bundler/tmp/24979/gems/gdb.rb-0.1.7/ext/src/gdb-7.2'
make: *** [all] Error 2

Here are the 2 attached files:

Let me know if I can provide more info about my config to help troubleshooting the build ...

rosenfeld commented 7 years ago

I have the same errors while trying to install the gem...

mirelon commented 6 years ago

Exactly the same issue, CentOS 7