[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getopt _getopt_internal declaration clash on Solaris 5.10
From: |
Gavin Smith |
Subject: |
getopt _getopt_internal declaration clash on Solaris 5.10 |
Date: |
Sat, 29 Apr 2017 18:11:38 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Sun, Apr 23, 2017 at 08:20:20PM -0400, Assaf Gordon wrote:
> ---
>
> On Solaris 5.10, compilation fails due to a conflict in gnulib's getopt
> module.
> See full build log here:
> https://pretest.housegordon.org/g/4602/logs/make.log?inlined=1
> (search for "getopt_int" to find the error).
> Snippet below:
> ===
> gcc -DHAVE_CONFIG_H -I. -I../.. -D_REENTRANT -g -O2 -MT getopt.o -MD -MP
> -MF $depbase.Tpo -c -o getopt.o getopt.c &&\
> mv -f $depbase.Tpo $depbase.Po
> In file included from getopt.c:80:0:
> getopt_int.h:25:12: error: conflicting types for '_getopt_internal'
> extern int _getopt_internal (int ___argc, char **___argv,
> ^
> In file included from ./getopt.h:34:0,
> from getopt.h:34,
> from getopt.c:24:
> /opt/csw/include/getopt.h:118:12: note: previous declaration of
> '_getopt_internal' was here
> extern int _getopt_internal (int argc, char *const *argv,
> ^
> getopt.c:702:1: error: conflicting types for '_getopt_internal'
> _getopt_internal (int argc, char **argv, const char *optstring,
> ^
> In file included from ./getopt.h:34:0,
> from getopt.h:34,
> from getopt.c:24:
> /opt/csw/include/getopt.h:118:12: note: previous declaration of
> '_getopt_internal' was here
> extern int _getopt_internal (int argc, char *const *argv,
> ^
> *** Error code 1
> make: Fatal error: Command failed for target `getopt.o'
On a Solaris 5.10 system I have access to, /opt/csw/include/getopt.h
is a GNU libc include file from 1997. It is probably the same file that
you are using, as the declaration is on the same line (118).
I know it is possible to compile on this system with the right
environment because it's done successfully on the OpenCSW buildfarm.
(See https://buildfarm.opencsw.org/buildbot/waterfall?category=texinfo
for logs).
I tried compiling Texinfo 6.3 the same way and didn't get the same
error, so it is probably due to a change in Gnulib.
I found in the older gnulib, the _getopt_internal had been redefined
as rpl_getopt_internal after the system header had been read, so the
definition clash did not occur.
I'm copying bug-gnulib into this email to see if the Gnulib developers
can take this any further.
I believe the section that #define's the function names is now in
getopt-pfx-ext.h. _getopt_internal is not redefined there. Formerly,
I believe it was in getopt.h that _getopt_internal was redefined,
like this:
# define _getopt_internal __GETOPT_ID (getopt_internal)
- texinfo-6.3.90 pretest, Gavin Smith, 2017/04/23
- Re: [platform-testers] texinfo-6.3.90 pretest, Assaf Gordon, 2017/04/23
- Re: texinfo-6.3.90 pretest, Eli Zaretskii, 2017/04/27
- Re: texinfo-6.3.90 pretest, Hans-Bernhard Bröker, 2017/04/28
- Re: texinfo-6.3.90 pretest, Eli Zaretskii, 2017/04/29
- Re: texinfo-6.3.90 pretest, Hans-Bernhard Bröker, 2017/04/29
- Re: texinfo-6.3.90 pretest, Eli Zaretskii, 2017/04/29
- Re: texinfo-6.3.90 pretest, Eli Zaretskii, 2017/04/29
- Re: texinfo-6.3.90 pretest, Hans-Bernhard Bröker, 2017/04/29
- Re: texinfo-6.3.90 pretest, Eli Zaretskii, 2017/04/29
- Re: texinfo-6.3.90 pretest, Hans-Bernhard Bröker, 2017/04/30