Bug 12263 - Compiling bfd/compress.c fails on Solaris 8 with included zlib.h
Summary: Compiling bfd/compress.c fails on Solaris 8 with included zlib.h
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 18:33 UTC by Rainer Orth
Modified: 2023-08-15 14:36 UTC (History)
2 users (show)

See Also:
Host: *-*-solaris2.8
Target: *-*-solaris2.8
Build: *-*-solaris2.8
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2010-11-24 18:33:03 UTC
bfd/compress.c fails to compile on Solaris 8 with the included zlib.h/libz.so.1:

cc1: warnings being treated as errors
/vol/src/gnu/binutils/binutils/bfd/compress.c: In function 'bfd_compress_section
_contents':
/vol/src/gnu/binutils/binutils/bfd/compress.c:100: error: implicit declaration o
f function 'compressBound'
make[4]: *** [compress.lo] Error 1

The function is neither declared in <zlib.h> nor present in libz.so.1, so the
zlib configure test needs to be adapted to check for this function as well.

For the time being, I've configured with --without-zlib as a workaround.
Comment 1 H.J. Lu 2010-11-29 15:14:36 UTC
Or we can include zlib in binutils soucre tree.
Comment 2 Tom Tromey 2023-08-13 15:33:21 UTC
Is this still a problem?
I see zlib in the binutils source tree now.
Comment 3 Rainer Orth 2023-08-15 14:36:54 UTC
> --- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
> Is this still a problem?
> I see zlib in the binutils source tree now.

I happen to have a Solaris 8/x86 VM around and gave building binutils
2.41 with gcc 4.7 (the last supported version) a try.  However, that
already fails compiling bfd/doc/chew.c:

/vol/src/gnu/binutils/binutils-2.41/bfd/doc/chew.c: In function 'print':
/vol/src/gnu/binutils/binutils-2.41/bfd/doc/chew.c:1464:60: error: expected ')' before 'PRIdPTR'

TBH, Solaris 8 and 9 are such ancient history by now that I wouldn't
bother with either of them.  They have been obsoleted in GCC and GDB for
years, and even GCC 10 is considered obsolete there.

As such, I'd just close this as WONTFIX (if it even is an issue any
longer).