Bug 12089 - build fails on 'make' #1
Summary: build fails on 'make' #1
Status: RESOLVED WORKSFORME
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-03 15:20 UTC by Bert Desmet
Modified: 2010-10-20 18:13 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
patch, now it builds (187 bytes, patch)
2010-10-03 17:25 UTC, Bert Desmet
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bert Desmet 2010-10-03 15:20:36 UTC
make[4]: Entering directory
`/home/bert/sources/binutils-introspector/build/binutils'
gcc -DHAVE_CONFIG_H -I. -I../../binutils  -I. -I../../binutils -I../bfd
-I../../binutils/../bfd -I../../binutils/../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -g -O2 -MT size.o -MD -MP -MF
.deps/size.Tpo -c -o size.o ../../binutils/size.c
cc1: warnings being treated as errors
In file included from ../../binutils/size.c:33:0:
../../binutils/sysdep.h:79:1: error: function declaration isn’t a prototype

system:
Fedora 14 beta
GCC-C++ version: 4.5.1
autoconf: 2.66

complete output: http://www.bdesmet.be/upload/foo
Comment 1 James Michael DuPont 2010-10-03 15:27:35 UTC
../../binutils/sysdep.h:79:1

 #if !HAVE_DECL_STRSTR
 extern char *strstr ();
 #endif

It should look more like this, no?
 extern char *strstr(const char *, const char *) __ATTR_PURE__;

 not ()
Comment 2 Bert Desmet 2010-10-03 17:25:12 UTC
Created attachment 5030 [details]
patch, now it builds
Comment 3 H.J. Lu 2010-10-04 01:51:04 UTC
There are more:

[hjl@gnu-6 binutils]$ grep HAVE_DECL_STRSTR */*.h 
bfd/sysdep.h:#if !HAVE_DECL_STRSTR
binutils/sysdep.h:#if !HAVE_DECL_STRSTR
ld/sysdep.h:#if !HAVE_DECL_STRSTR
[hjl@gnu-6 binutils]$ 

There are more such prototypes for other functions.
I got

[hjl@gnu-6 build-x86_64-linux]$  grep STRSTR */*.h
bfd/config.h:#define HAVE_DECL_STRSTR 1
binutils/config.h:#define HAVE_DECL_STRSTR 1
gas/config.h:/* #undef NEED_DECLARATION_STRSTR */
ld/config.h:#define HAVE_DECL_STRSTR 1
libiberty/config.h:#define HAVE_STRSTR 1
[hjl@gnu-6 build-x86_64-linux]$ 

Why isn't HAVE_DECL_STRSTR defined for you?
Comment 4 James Michael DuPont 2010-10-04 17:34:51 UTC
This occurs on hurd as well.
GNU flubber 0.3 GNU-Mach 1.3.99/Hurd-0.3 i386-AT386 GNU
 gcc -v
Using built-in specs.
Target: i486-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.4-14'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls
--enable-libstdcxx-debug --with-arch=i586 --with-tune=generic
--enable-checking=release --build=i486-gnu --host=i486-gnu --target=i486-gnu
Thread model: posix
gcc version 4.4.5 20100909 (prerelease) (Debian 4.4.4-14)
Comment 5 Thomas Schwinge 2010-10-07 11:55:11 UTC
Building current HEAD on GNU/Hurd without any special configure switches,
this does work fine for me -- I'm getting the exactly same (and expected)
output that H.J. is getting on GNU/Linux.

Bert: according to <http://www.bdesmet.be/upload/foo>, you have 

    [...]
    Configuring in ./libiberty
    [...]
    checking for strstr... yes
    [...]
    Configuring in ./bfd
    [...]
    checking whether strstr is declared... yes
    [...]
    Configuring in ./binutils
    [...]
    checking whether strstr is declared... no
    [...]

Please inspect the respective config.log files for what's going wrong.


Mike: how do you configure / which version exactly?  Also, please inspect
the config.log files.
Comment 6 James Michael DuPont 2010-10-09 17:08:05 UTC
Flubber is down, cannot reproduce. 
http://news.gmane.org/gmane.os.hurd.bugs/cutoff=19821
will try again soon.
mike
Comment 7 Thomas Schwinge 2010-10-20 10:53:37 UTC
Bert, Mike?
Comment 8 James Michael DuPont 2010-10-20 10:57:57 UTC
I am guessing that this has something to do with my branch, I will check now.
mike
Comment 9 James Michael DuPont 2010-10-20 17:47:45 UTC
I have tested this on hurd with the git version of binutils and it is not a problem. It seems to be a problem with the autoconf version I used in my branch. So I guess we can close the bug.
mike
Comment 10 Thomas Schwinge 2010-10-20 17:58:41 UTC
Ack.

Bert, please re-open if this is still an issue for you (and you can
provide the data I asked for).
Comment 11 James Michael DuPont 2010-10-20 18:13:44 UTC
Bert was testing my branch and had the problem.
http://gitorious.org/binutils-introspector/binutils-introspector
I will have to check out the autotools stuff. i suspect it is a problem.
mike

On Wed, Oct 20, 2010 at 7:59 PM, tschwinge at sourceware dot org
<sourceware-bugzilla@sourceware.org> wrote:
> http://sourceware.org/bugzilla/show_bug.cgi?id=12089
>
> Thomas Schwinge <tschwinge at sourceware dot org> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Status|UNCONFIRMED                 |RESOLVED
>         Resolution|                            |WORKSFORME
>
> --- Comment #10 from Thomas Schwinge <tschwinge at sourceware dot org> 2010-10-20 17:58:41 UTC ---
> Ack.
>
> Bert, please re-open if this is still an issue for you (and you can
> provide the data I asked for).
>
> --
> 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.
>