bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/13558] New: binutils 2.22 v. AIX 6.1 -- build fails with l


From: sms at antinode dot info
Subject: [Bug binutils/13558] New: binutils 2.22 v. AIX 6.1 -- build fails with large-file support problems (and mkdtemp confusion)
Date: Wed, 04 Jan 2012 06:30:07 +0000

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

             Bug #: 13558
           Summary: binutils 2.22 v. AIX 6.1 -- build fails with
                    large-file support problems (and mkdtemp confusion)
           Product: binutils
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


I was recently trying to build 2.22 on my AIX (6.1) system when I ran
into a problem.  Instance 1:

[...]
In file included from syslex.c:549:
/usr/include/unistd.h:171: error: conflicting types for 'lseek64'
/usr/include/unistd.h:169: error: previous declaration of 'lseek64' was here
In file included from /usr/include/unistd.h:746,
                 from syslex.c:549:
/usr/include/sys/lockf.h:64: error: conflicting types for 'lockf64'
/usr/include/sys/lockf.h:62: error: previous declaration of 'lockf64' was here
[and a host of others ...]

   The cause seems to be sub-optimal handling of the large-file support
macros, which need to be defined before the affected system header files
are processed.

   My manual fix to binutils/syslex.c was this:

blue# diff binutils/syslex.c_orig binutils/syslex.c

blue# diff binutils/syslex.c_orig binutils/syslex.c
1c1
<
---
> #include "config.h"

>From the looks of it, I suspect that this thing is generated, and so the
change would need to be made elsewhere, but the essence is to get
"config.h" processed before the system header files.

   Similarly, instance 2:

[...]
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include
-DLOCALEDIR=
"\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_aix_emulation  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT od-xcoff.o
-MD -MP -MF .deps/od-xcoff.Tpo -c -o od-xcoff.o od-xcoff.c
In file included from sysdep.h:27,
                 from od-xcoff.c:24:
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/stdio.h:511: error:
c
onflicting types for 'fgetpos64'
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/stdio.h:310: error:
p
revious declaration of 'fgetpos64' was here
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/stdio.h:514: error:
c
onflicting types for 'fseeko64'
/opt/freeware/lib/gcc/powerpc-ibm-aix6.1.0.0/4.2.0/include/stdio.h:454: error:
p
revious declaration of 'fseeko64' was here
[...]

   My fix:

blue# diff binutils/od-xcoff.c_orig binutils/od-xcoff.c
21a22,23
> #include "config.h"
>



   Also, the "configure" test for 'mkdtemp' gets a result which might
best be described as unfortunate:

[...]
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include
-DLOCALEDIR=
"\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_aix_emulation  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bucomm.o
-M
D -MP -MF .deps/bucomm.Tpo -c -o bucomm.o bucomm.c
cc1: warnings being treated as errors
bucomm.c: In function 'make_tempdir':
bucomm.c:531: warning: implicit declaration of function 'mkdtemp'
bucomm.c:531: warning: return makes pointer from integer without a cast
gmake[4]: *** [bucomm.o] Error 1
[...]

   My manual fix:

blue# diff binutils/config.h_orig binutils/config.h
93c93
< #define HAVE_MKDTEMP 1
---
> /* #define HAVE_MKDTEMP 1 */

   I didn't look at the details, but I'm guessing that "configure" did
some less-than-thorough test for "mkdtemp".  Perhaps "mkdtemp" is in
some run-time library, so a link-only test might work, but it appears
not to be in any of the system header files, so an actual compilation
(with "warnings being treated as errors") will fail this way.  For my
purposes, the (sleazy) manual edit of "binutils/config.h" was good
enough, but a more realistic test in "configure" would be more
satisfying.

   Around here:

blue# uname -a
AIX blue 1 6 000F1F6E4C00

blue# gcc --version
gcc (GCC) 4.2.0
[...]

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]