[Bug ld/12451] --build-id doesn't work

2012-06-14 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12451

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #6 from Alan Modra  2012-06-15 03:40:28 
UTC ---
For anyone rummaging through bugzilla, please note the followup:
http://sourceware.org/ml/binutils-cvs/2011-12/msg00074.html

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14243] software that includes bfd.h fails to build with "#error config.h must be included before this header"

2012-06-14 Thread vapier at gentoo dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=14243

Mike Frysinger  changed:

   What|Removed |Added

 CC||vapier at gentoo dot org

--- Comment #3 from Mike Frysinger  2012-06-15 
03:08:30 UTC ---
we do compile with HAVE_CONFIG_H which many files respect, but last time i
tried to increase usage of this define, i was shot down ...

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems

2012-06-14 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14072

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #11 from Alan Modra  2012-06-15 02:19:24 
UTC ---
See #14243 re oprofile.

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14243] software that includes bfd.h fails to build with "#error config.h must be included before this header"

2012-06-14 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14243

--- Comment #2 from Alan Modra  2012-06-15 02:14:04 
UTC ---
A further comment.  I see HAVE_STRINGIZE is obsolescent according to the
autoconf docs.  So my argument for config.h being included before the current
version of bfd.h isn't really that strong.  However, it is a really good idea
to always include config.h (or sysdep.h or alloca-conf.h that include config.h)
before any other files, including system headers.  See bug #13558.

Beside all that, I can't see the binutils project reverting this change.  Yes,
it causes some initial pain (and I grumbled about the change myself), but
overall the change is a good one.  If you (oprofile project) want to insulate
yourself from a change like this one, then you really should be distributing
your own copy of bfd along with oprofile sources.  That would allow you to
resolve these issues at your leisure.

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14243] software that includes bfd.h fails to build with "#error config.h must be included before this header"

2012-06-14 Thread amodra at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14243

Alan Modra  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||amodra at gmail dot com
 Resolution||WONTFIX

--- Comment #1 from Alan Modra  2012-06-15 00:33:54 
UTC ---
This is a correctness issue.  bfd.h and the headers that bfd.h #include test at
least one HAVE_* macro.  So you need to include the file that defines those
HAVE_* macros before bfd.h.  You may argue that the use of HAVE_STRINGSIZE will
never affect any host that builds oprofile.  While that may be true, it's still
a correctness issue.  Future versions of bfd.h may test other HAVE_* macros.

This isn't about requiring any of the various binutils config.h files, but
rather *an* autoconf generated config.h.  It's completely irrelevant that
opagent.c itself does not need config.h.  opagent.c *and its headers* needs
config.h.

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14243] New: software that includes bfd.h fails to build with "#error config.h must be included before this header"

2012-06-14 Thread maynardj at us dot ibm.com
http://sourceware.org/bugzilla/show_bug.cgi?id=14243

 Bug #: 14243
   Summary: software that includes bfd.h fails to build with
"#error config.h must be included before this header"
   Product: binutils
   Version: 2.23 (HEAD)
Status: NEW
  Severity: critical
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: mayna...@us.ibm.com
Classification: Unclassified


A build of the oprofile package against a June 12, 2012 CVS snapshot of
binutils fails with the following:


make[2]: Entering directory `/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent'
/bin/sh ../libtool --tag=CC   --mode=compile /opt/at5.0-5-rc1/bin/gcc
-DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent   
-fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I
/home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo
-MD -MP -MF .deps/libopagent_la-opagent.Tpo -c -o libopagent_la-opagent.lo
`test -f 'opagent.c' || echo
'/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent/'`opagent.c
libtool: compile:  /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I..
-I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I
/home/cseo/at5.0/at5.0-5/src/oprofile/libop -I
/home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo
-MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c  -fPIC -DPIC -o
.libs/libopagent_la-opagent.o
In file included from opagent.c:63:0:
/opt/at5.0-5-rc1/include/bfd.h:37:2: error: #error config.h must be included
before this header
make[2]: Entering directory `/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent'
/bin/sh ../libtool --tag=CC   --mode=compile /opt/at5.0-5-rc1/bin/gcc
-DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent   
-fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I
/home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo
-MD -MP -MF .deps/libopagent_la-opagent.Tpo -c -o libopagent_la-opagent.lo
`test -f 'opagent.c' || echo
'/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent/'`opagent.c
libtool: compile:  /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I..
-I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I
/home/cseo/at5.0/at5.0-5/src/oprofile/libop -I
/home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo
-MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c  -fPIC -DPIC -o
.libs/libopagent_la-opagent.o
In file included from opagent.c:63:0:
/opt/at5.0-5-rc1/include/bfd.h:37:2: error: #error config.h must be included
before this header


This failure is apparently related to the binutils change that went in via bug
# 14072.  This change apparently enforces that any file that includes "bfd.h"
also includes "config.h".  As I understand it, this change was intended for
binutils source files only since the "config.h" file being required is
binutils' config.h.  Yet the change is improperly requiring external software
to also include a "config.h" before including bfd.h.  For the case in question,
oprofile's opagent.c does not include the oprofile's config.h and does not
require it.  While we *could* hack opagent.c (and several other oprofile files
that include bfd.h) to unnecessarily include oprofile's config.h, this seems to
be the wrong fix to this problem.

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/14072] Incorrect handling of config.h and/or sysdep.h causing problems

2012-06-14 Thread pluto at agmk dot net
http://sourceware.org/bugzilla/show_bug.cgi?id=14072

Pawel Sikora  changed:

   What|Removed |Added

 CC||pluto at agmk dot net

--- Comment #10 from Pawel Sikora  2012-06-14 18:25:35 
UTC ---
include guard in  breaks e.g. oprofile build.

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14234] /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status

2012-06-14 Thread ppluzhnikov at google dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14234

Paul Pluzhnikov  changed:

   What|Removed |Added

 Status|SUSPENDED   |RESOLVED
 CC||ppluzhnikov at google dot
   ||com
 Resolution||INVALID

--- Comment #2 from Paul Pluzhnikov  2012-06-14 
14:25:36 UTC ---
User error.

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14234] /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status

2012-06-14 Thread pdemil+bug at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14234

pdemil+bug at gmail dot com changed:

   What|Removed |Added

 Status|NEW |SUSPENDED

--- Comment #1 from pdemil+bug at gmail dot com 2012-06-14 13:08:44 UTC ---
 apt-get install libghc-zlib-dev 
did the trick

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/14234] New: /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status

2012-06-14 Thread pdemil+bug at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=14234

 Bug #: 14234
   Summary: /usr/bin/ld: cannot find -lz  collect2: ld returned 1
exit status
   Product: binutils
   Version: 2.22
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassig...@sourceware.org
ReportedBy: pdemil+...@gmail.com
Classification: Unclassified


I'm want to use
http://sourceforge.net/projects/mspgcc/files/mspgcc/DEVEL-4.7.x/
mspgcc-20120606

I have patched and compiled binutils and gcc succesfully (bin in
/usr/local/msp430/bin but the msp430-ld is not used in the compilation of gdb)


Next, I have to patch, configure and compile gdb.
Following the instructions in msp430-gdb-7.2a-20111205.patch

  tar xjf gdb-7.2a.tar.bz2
  ( cd gdb-7.2 ; patch -p1 < ../msp430-gdb-7.2a-20111205.patch )
  mkdir -p BUILD/gdb
  cd BUILD/gdb
  ../../gdb-7.2/configure \
--target=msp430 \
--prefix=/usr/local/msp430 \
  2>&1 | tee co
  make 2>&1 | tee mo

output make:
...
make[2]: Entering directory `/root/downloads/BUILD/gdb/sim'
make[3]: Entering directory `/root/downloads/BUILD/gdb/sim/msp430'
gcc ../../../../gdb-7.2/sim/msp430/../common/gentmap.c -o gentmap -g -O -I.
-I../../../../gdb-7.2/sim/msp430 -I../common
-I../../../../gdb-7.2/sim/msp430/../common -I../../include
-I../../../../gdb-7.2/sim/msp430/../../include -I../../bfd
-I../../../../gdb-7.2/sim/msp430/../../bfd -I../../opcodes
-I../../../../gdb-7.2/sim/msp430/../../opcodes 
rm -f tmp-tvals.h tmp-tmap.c
./gentmap -h >tmp-tvals.h
/bin/bash ../../../../gdb-7.2/sim/msp430/../../move-if-change tmp-tvals.h
targ-vals.h
./gentmap -c >tmp-tmap.c
/bin/bash ../../../../gdb-7.2/sim/msp430/../../move-if-change tmp-tmap.c
targ-map.c
touch stamp-tvals
rm -f version.c-tmp version.c
echo '#include "version.h"' >> version.c-tmp
echo 'const char version[] = "'"`sed q
../../../../gdb-7.2/sim/msp430/../../gdb/version.in`"'";' >> version.c-tmp
mv version.c-tmp version.c
gcc -c -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 
-DDEFAULT_INLINE=0  -I. -I../../../../gdb-7.2/sim/msp430
-I../common -I../../../../gdb-7.2/sim/msp430/../common -I../../include
-I../../../../gdb-7.2/sim/msp430/../../include -I../../bfd
-I../../../../gdb-7.2/sim/msp430/../../bfd -I../../opcodes
-I../../../../gdb-7.2/sim/msp430/../../opcodes  -g -O2 version.c
rm -f libsim.a
ar rc libsim.a callback.o syscall.o targ-map.o version.o interp.o sim-load.o
ranlib libsim.a
gcc -DHAVE_CONFIG_H -DPROFILE=1 -DWITH_PROFILE=-1 
-DDEFAULT_INLINE=0  -I. -I../../../../gdb-7.2/sim/msp430
-I../common -I../../../../gdb-7.2/sim/msp430/../common -I../../include
-I../../../../gdb-7.2/sim/msp430/../../include -I../../bfd
-I../../../../gdb-7.2/sim/msp430/../../bfd -I../../opcodes
-I../../../../gdb-7.2/sim/msp430/../../opcodes  -g -O2  -o run \
  run.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a 
../../libiberty/libiberty.a -lnsl  -lm -lz
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[3]: *** [run] Error 1
make[3]: Leaving directory `/root/downloads/BUILD/gdb/sim/msp430'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/root/downloads/BUILD/gdb/sim'
make[1]: *** [all-sim] Error 2
make[1]: Leaving directory `/root/downloads/BUILD/gdb'
make: *** [all] Error 2


Extra info:

OS: ubuntu 12.04
Linux ubuntu 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux


root@ubuntu:~/downloads/BUILD/gdb# /usr/bin/ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

I don't think that msp430-ld should be used for compiling the patched gdb.
root@ubuntu:~/downloads/BUILD/gdb# msp430-ld --version
GNU ld (GNU Binutils) 2.22 (mspgcc dev 20120606)
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
root@ubuntu:~/downloads/BUILD/gdb#

root@ubuntu:~/downloads/BUILD/gdb# env $PATH
env:
/usr/gcc_4_7/bin:/usr/local/msp430/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:
No such file or directory
root@ubuntu:~/downloads/BUILD/gdb#

Any hints?

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils