This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug build/14972] New: Building x86_64 Linux gdb with ELF support onMacOS X fails (with MacPorts gettext)


http://sourceware.org/bugzilla/show_bug.cgi?id=14972

             Bug #: 14972
           Summary: Building x86_64 Linux gdb with ELF support on MacOS X
                    fails (with MacPorts gettext)
           Product: gdb
           Version: 7.5
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
        AssignedTo: unassigned@sourceware.org
        ReportedBy: thomas.fanghaenel@gmail.com
    Classification: Unclassified


Created attachment 6782
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6782
Output of the configure command

I'm trying to build gdb 7.5 on MacOS X 10.7.5, for x86_64 Linux targets with
ELF support, basically for remote debugging.  I've run into the build issue I'm
describing below, which I'm working around in a rather crude way by specifying
âhe missing include directory via CFLAGS.

I'm using Xcode 4.5.2 and the gcc and make versions that got installed with
Xcode's command line tools.  I also have a couple of libraries installed from
MacPorts (the relevant being gettext).  Building gdb fails in gdb-7.5/bfd and
gdb-7.5/opcodes, both times with flavors of the same error (full configure and
make output can be found in the attachment):

==============================
/bin/sh ./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_bfd_elf32_x86_64_vec -DHAVE_i386linux_vec -DHAVE_i386pei_vec
-DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_k1om_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='"/opt/local/bin"'  -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wshadow -Werror -g -O2 -MT archures.lo -MD -MP -MF .deps/archures.Tpo -c -o
archures.lo -DDEFAULT_VECTOR=bfd_elf64_x86_64_vec
-DSELECT_VECS='&bfd_elf64_x86_64_vec,&bfd_elf32_i386_vec,&bfd_elf32_x86_64_vec,&i386linux_vec,&i386pei_vec,&x86_64pei_vec,&bfd_elf64_l1om_vec,&bfd_elf64_k1om_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec'
-DSELECT_ARCHITECTURES='&bfd_i386_arch,&bfd_l1om_arch,&bfd_k1om_arch'
./archures.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include
-DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_vec
-DHAVE_bfd_elf32_x86_64_vec -DHAVE_i386linux_vec -DHAVE_i386pei_vec
-DHAVE_x86_64pei_vec -DHAVE_bfd_elf64_l1om_vec -DHAVE_bfd_elf64_k1om_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=\"/opt/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wshadow -Werror -g -O2 -MT archures.lo -MD -MP -MF .deps/archures.Tpo -c
-DDEFAULT_VECTOR=bfd_elf64_x86_64_vec
"-DSELECT_VECS=&bfd_elf64_x86_64_vec,&bfd_elf32_i386_vec,&bfd_elf32_x86_64_vec,&i386linux_vec,&i386pei_vec,&x86_64pei_vec,&bfd_elf64_l1om_vec,&bfd_elf64_k1om_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_elf32_big_generic_vec"
"-DSELECT_ARCHITECTURES=&bfd_i386_arch,&bfd_l1om_arch,&bfd_k1om_arch"
./archures.c -o archures.o
In file included from ./archures.c:24:
./sysdep.h:177:21: error: libintl.h: No such file or directory
make[2]: *** [archures.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
==============================

Here's how to reproduce the error:

  Environment
  --------------
    - Install XCode command line tools
    - Install MacPorts
    - sudo port install gettext
    - sudo port install gmp
    - sudo port install libelf

  Configuration of gdb
  --------------------
    - ./configure --prefix=/opt/local --program-suffix=-linux-x86_64
--target=x86_64-linux-gnu --with-gmp=/opt/local --with-libelf=/opt/local
--with-build-libsubdir=/opt/local

A subsequent make will produce the aforementioned problem.

The problem is that the custom build_libsubdir that is specified in the call to
configure doesn't get passed down to the libtool calls in the bfd and opcodes
directories.

I'm working around this by doing the following, prior to running ./configure:

   export CFLAGS="-I/opt/local/include"

Not pretty, but it makes it compile.  There's gotta be a more elegant way to
pass the necessary include to the bfd and opcode configure scripts.  I'm just
having a hard time reading the configure scripts and makefiles.  If anybody can
point me in the right direction, that would be much appreciated.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]