public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/14972] New: Building x86_64 Linux gdb with ELF support on MacOS X fails (with MacPorts gettext)
@ 2012-12-18  4:48 thomas.fanghaenel at gmail dot com
  2012-12-18  4:53 ` [Bug build/14972] " thomas.fanghaenel at gmail dot com
  2012-12-18 22:05 ` schwab@linux-m68k.org
  0 siblings, 2 replies; 3+ messages in thread
From: thomas.fanghaenel at gmail dot com @ 2012-12-18  4:48 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug build/14972] Building x86_64 Linux gdb with ELF support on MacOS X fails (with MacPorts gettext)
  2012-12-18  4:48 [Bug build/14972] New: Building x86_64 Linux gdb with ELF support on MacOS X fails (with MacPorts gettext) thomas.fanghaenel at gmail dot com
@ 2012-12-18  4:53 ` thomas.fanghaenel at gmail dot com
  2012-12-18 22:05 ` schwab@linux-m68k.org
  1 sibling, 0 replies; 3+ messages in thread
From: thomas.fanghaenel at gmail dot com @ 2012-12-18  4:53 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Thomas Fanghaenel <thomas.fanghaenel at gmail dot com> 2012-12-18 04:53:15 UTC ---
Created attachment 6783
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6783
Output of the make command

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug build/14972] Building x86_64 Linux gdb with ELF support on MacOS X fails (with MacPorts gettext)
  2012-12-18  4:48 [Bug build/14972] New: Building x86_64 Linux gdb with ELF support on MacOS X fails (with MacPorts gettext) thomas.fanghaenel at gmail dot com
  2012-12-18  4:53 ` [Bug build/14972] " thomas.fanghaenel at gmail dot com
@ 2012-12-18 22:05 ` schwab@linux-m68k.org
  1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2012-12-18 22:05 UTC (permalink / raw)
  To: gdb-prs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> 2012-12-18 22:05:34 UTC ---
--with-build-libsubdir is only used by the gcc build system, and it isn't meant
to be used to find installed libraries anyway.  Passing the include path in
CFLAGS (or CPPFLAGS) is the Right Way to do it.

-- 
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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-18 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-18  4:48 [Bug build/14972] New: Building x86_64 Linux gdb with ELF support on MacOS X fails (with MacPorts gettext) thomas.fanghaenel at gmail dot com
2012-12-18  4:53 ` [Bug build/14972] " thomas.fanghaenel at gmail dot com
2012-12-18 22:05 ` schwab@linux-m68k.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).