[Bug bootstrap/45872] New: [4.5 Regression] java/net/natVMInetAddress.cc:42:52: error: declaration of C function 'int gethostname(char*, int)' conflicts

dominiq at lps dot ens.fr gcc-bugzilla@gcc.gnu.org
Sun Oct 3 15:18:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45872

           Summary: [4.5 Regression] java/net/natVMInetAddress.cc:42:52:
                    error: declaration of C function 'int
                    gethostname(char*, int)' conflicts
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
              Host: x86_64-apple-darwin10.4
            Target: x86_64-apple-darwin10.4
             Build: x86_64-apple-darwin10.4


Bootstrapping 4.5 revision 164915 on x86_64-apple-darwin10.4 fails with

libtool: compile:  /opt/gcc/4.5_build/./gcc/xgcc -shared-libgcc
-B/opt/gcc/4.5_build/./gcc -nostdinc++
-L/opt/gcc/4.5_build/x86_64-apple-darwin10/libstdc++-v3/src
-L/opt/gcc/4.5_build/x86_64-apple-darwin10/libstdc++-v3/src/.libs
-B/opt/gcc/gcc4.5/x86_64-apple-darwin10/bin/
-B/opt/gcc/gcc4.5/x86_64-apple-darwin10/lib/ -isystem
/opt/gcc/gcc4.5/x86_64-apple-darwin10/include -isystem
/opt/gcc/gcc4.5/x86_64-apple-darwin10/sys-include -DHAVE_CONFIG_H -I.
-I../../../4.5_work/libjava -I./include -I./gcj -I../../../4.5_work/libjava
-Iinclude -I../../../4.5_work/libjava/include
-I../../../4.5_work/libjava/classpath/include -Iclasspath/include
-I../../../4.5_work/libjava/classpath/native/fdlibm
-I../../../4.5_work/libjava/../boehm-gc/include -I../boehm-gc/include
-I../../../4.5_work/libjava/libltdl -I../../../4.5_work/libjava/libltdl
-I../../../4.5_work/libjava/.././libjava/../gcc
-I../../../4.5_work/libjava/../libffi/include -I../libffi/include
-I/opt/sw64/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers
-Wswitch-enum -D_FILE_OFFSET_BITS=64 -fomit-frame-pointer -Wextra -Wall
-D_GNU_SOURCE -DPREFIX=\"/opt/gcc/gcc4.5\"
-DTOOLEXECLIBDIR=\"/opt/gcc/gcc4.5/lib\" -DJAVA_HOME=\"/opt/gcc/gcc4.5\"
-DBOOT_CLASS_PATH=\"/opt/gcc/gcc4.5/share/java/libgcj-4.5.2.jar\"
-DJAVA_EXT_DIRS=\"/opt/gcc/gcc4.5/share/java/ext\"
-DGCJ_ENDORSED_DIRS=\"/opt/gcc/gcc4.5/share/java/gcj-endorsed\"
-DGCJ_VERSIONED_LIBDIR=\"/opt/gcc/gcc4.5/lib/gcj-4.5.2-11\"
-DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\"
-DLIBGCJ_DEFAULT_DATABASE=\"/opt/gcc/gcc4.5/lib/gcj-4.5.2-11/classmap.db\"
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.5.2-11/classmap.db\" -g -O2 -MT
java/net/natVMInetAddress.lo -MD -MP -MF java/net/.deps/natVMInetAddress.Tpo -c
java/net/natVMInetAddress.cc  -fno-common -DPIC -o
java/net/.libs/natVMInetAddress.o
java/net/natVMInetAddress.cc:42:52: error: declaration of C function 'int
gethostname(char*, int)' conflicts with
/usr/include/unistd.h:455:6: error: previous declaration 'int
gethostname(char*, size_t)' here
make[3]: *** [java/net/natVMInetAddress.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-target-libjava] Error 2
make: *** [all] Error 2

Note that this step passes with -m32.



More information about the Gcc-bugs mailing list