* gcc-3.2 build problem in the java area
@ 2002-10-10 10:07 cyan
2002-10-10 10:21 ` Andrew Haley
0 siblings, 1 reply; 13+ messages in thread
From: cyan @ 2002-10-10 10:07 UTC (permalink / raw)
To: gcc
Hi,
I'm having consistent problem compiling gcc-3.2 on a Solaris 7 box.
The problem seems to be with libjava/java/net/natInetAddress.cc and
the make bombs out with:
./../../../libjava/java/net/natInetAddress.cc: In static member function
`static java::lang::String* java::net::InetAddress::getLocalHostname()':
../../../../libjava/java/net/natInetAddress.cc:338: `MAXHOSTNAMELEN'
undeclared
(first use this function)
../../../../libjava/java/net/natInetAddress.cc:339: `buffer' undeclared
(first use this function)
make[5]: *** [java/net/natInetAddress.lo] Error 1
I'm compiling on an E420R, Solaris 7, kernel Generic_106541-21. I've
tried various things such as trying the build with binutils-2.13, but
it's the same error that occurs.
I noticed in your archives, back in June 1, 2002, a gentleman named
George Goffe had almost the exact same problem I'm having, except
he was trying to compile gcc-3.1 on a Solaris 8 box:
http://gcc.gnu.org/ml/java/2002-06/msg00002.html
Any pointers will be appreciated.
Thanks in advance!
Charlie
----------------------------------------------------------------------
Charlie Yanaitis charles.yanaitis@rochester.edu
Systems Analyst/Programmer (585) 275-4189
Information Technology Services University of Rochester
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* gcc-3.2 build problem in the java area
2002-10-10 10:07 gcc-3.2 build problem in the java area cyan
@ 2002-10-10 10:21 ` Andrew Haley
2002-10-10 10:25 ` cyan
2002-10-11 2:32 ` Russ Allbery
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Haley @ 2002-10-10 10:21 UTC (permalink / raw)
To: charles.yanaitis; +Cc: gcc
cyan@obrien.cc.rochester.edu writes:
> Hi,
>
> I'm having consistent problem compiling gcc-3.2 on a Solaris 7 box.
> The problem seems to be with libjava/java/net/natInetAddress.cc and
> the make bombs out with:
>
> ./../../../libjava/java/net/natInetAddress.cc: In static member function
> `static java::lang::String* java::net::InetAddress::getLocalHostname()':
> ../../../../libjava/java/net/natInetAddress.cc:338: `MAXHOSTNAMELEN'
> undeclared
> (first use this function)
> ../../../../libjava/java/net/natInetAddress.cc:339: `buffer' undeclared
> (first use this function)
> make[5]: *** [java/net/natInetAddress.lo] Error 1
>
> I'm compiling on an E420R, Solaris 7, kernel Generic_106541-21.
You should find this in /usr/include/netdb.h:
#define MAXHOSTNAMELEN 256
Is it there?
Andrew.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-10 10:21 ` Andrew Haley
@ 2002-10-10 10:25 ` cyan
2002-10-11 2:32 ` Russ Allbery
1 sibling, 0 replies; 13+ messages in thread
From: cyan @ 2002-10-10 10:25 UTC (permalink / raw)
To: Andrew Haley; +Cc: charles.yanaitis, gcc
Andrew
On Thu, 10 Oct 2002, Andrew Haley wrote:
> cyan@obrien.cc.rochester.edu writes:
> > Hi,
> >
> > I'm having consistent problem compiling gcc-3.2 on a Solaris 7 box.
> > The problem seems to be with libjava/java/net/natInetAddress.cc and
> > the make bombs out with:
> >
> > ./../../../libjava/java/net/natInetAddress.cc: In static member function
> > `static java::lang::String* java::net::InetAddress::getLocalHostname()':
> > ../../../../libjava/java/net/natInetAddress.cc:338: `MAXHOSTNAMELEN'
> > undeclared
> > (first use this function)
> > ../../../../libjava/java/net/natInetAddress.cc:339: `buffer' undeclared
> > (first use this function)
> > make[5]: *** [java/net/natInetAddress.lo] Error 1
> >
> > I'm compiling on an E420R, Solaris 7, kernel Generic_106541-21.
>
> You should find this in /usr/include/netdb.h:
>
> #define MAXHOSTNAMELEN 256
>
> Is it there?
>
> Andrew.
Yes, that is one of the things I did check. How to I get the make
to recognize this? I tried fooling it by by setting CFLAGS to
-DMAXHOSTNAMELEN=256, but the make still bombed out in the same
place.
Thanks!
----------------------------------------------------------------------
Charlie Yanaitis charles.yanaitis@rochester.edu
Systems Analyst/Programmer (585) 275-4189
Information Technology Services University of Rochester
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-10 10:21 ` Andrew Haley
2002-10-10 10:25 ` cyan
@ 2002-10-11 2:32 ` Russ Allbery
2002-10-11 10:20 ` Tom Tromey
1 sibling, 1 reply; 13+ messages in thread
From: Russ Allbery @ 2002-10-11 2:32 UTC (permalink / raw)
To: gcc
Andrew Haley <aph@redhat.com> writes:
> cyan@obrien.cc.rochester.edu writes:
>> ./../../../libjava/java/net/natInetAddress.cc: In static member function
>> `static java::lang::String* java::net::InetAddress::getLocalHostname()':
>> ../../../../libjava/java/net/natInetAddress.cc:338: `MAXHOSTNAMELEN'
>> undeclared
>> (first use this function)
>> ../../../../libjava/java/net/natInetAddress.cc:339: `buffer' undeclared
>> (first use this function)
>> make[5]: *** [java/net/natInetAddress.lo] Error 1
>>
>> I'm compiling on an E420R, Solaris 7, kernel Generic_106541-21.
> You should find this in /usr/include/netdb.h:
> #define MAXHOSTNAMELEN 256
> Is it there?
Solaris only defines MAXHOSTNAMELEN if:
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
Since this is C++, I'm guessing that it's including the headers in a more
strictly standard-conforming mode, which means that this #define is
omitted.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 2:32 ` Russ Allbery
@ 2002-10-11 10:20 ` Tom Tromey
2002-10-11 10:35 ` Andrew Haley
0 siblings, 1 reply; 13+ messages in thread
From: Tom Tromey @ 2002-10-11 10:20 UTC (permalink / raw)
To: GCC Hackers
>>>>> "Russ" == Russ Allbery <rra@stanford.edu> writes:
Russ> Solaris only defines MAXHOSTNAMELEN if:
Russ> #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
Is there any drawback to simply always defining __EXTENSIONS__?
We could do that in include/posix.h.
Tom
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 10:20 ` Tom Tromey
@ 2002-10-11 10:35 ` Andrew Haley
2002-10-11 10:55 ` David Edelsohn
2002-10-11 11:41 ` Tom Tromey
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Haley @ 2002-10-11 10:35 UTC (permalink / raw)
To: tromey; +Cc: GCC Hackers
Tom Tromey writes:
> >>>>> "Russ" == Russ Allbery <rra@stanford.edu> writes:
>
> Russ> Solaris only defines MAXHOSTNAMELEN if:
> Russ> #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
>
> Is there any drawback to simply always defining __EXTENSIONS__?
> We could do that in include/posix.h.
But who might know what else __EXTENSIONS__ might do? I suppose we
could "#ifdef __solaris" or somesuch.
It might be lees risky to "#ifdef __solaris .. #define MAXHOSTNAMELEN 256
Andrew.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 10:35 ` Andrew Haley
@ 2002-10-11 10:55 ` David Edelsohn
2002-10-11 11:41 ` Tom Tromey
1 sibling, 0 replies; 13+ messages in thread
From: David Edelsohn @ 2002-10-11 10:55 UTC (permalink / raw)
To: Andrew Haley; +Cc: tromey, GCC Hackers
>>>>> Andrew Haley writes:
Andrew> But who might know what else __EXTENSIONS__ might do? I suppose we
Andrew> could "#ifdef __solaris" or somesuch.
Maybe __EXTENSIONS__ needs to be added to CPLUSPLUS_CPP_SPEC for
that target?
David
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 10:35 ` Andrew Haley
2002-10-11 10:55 ` David Edelsohn
@ 2002-10-11 11:41 ` Tom Tromey
2002-10-11 11:49 ` Andrew Haley
1 sibling, 1 reply; 13+ messages in thread
From: Tom Tromey @ 2002-10-11 11:41 UTC (permalink / raw)
To: Andrew Haley; +Cc: GCC Hackers
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> It might be lees risky to "#ifdef __solaris .. #define
Andrew> MAXHOSTNAMELEN 256
Or #ifndef MAXHOSTNAMELEN ...
Tom
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 11:41 ` Tom Tromey
@ 2002-10-11 11:49 ` Andrew Haley
2002-10-11 11:49 ` Tom Tromey
2002-10-11 13:57 ` Jeff Sturm
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Haley @ 2002-10-11 11:49 UTC (permalink / raw)
To: tromey; +Cc: GCC Hackers
Tom Tromey writes:
> >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
>
> Andrew> It might be lees risky to "#ifdef __solaris .. #define
> Andrew> MAXHOSTNAMELEN 256
>
> Or #ifndef MAXHOSTNAMELEN ...
Hell, whatever works gets my vote! All we need is a nice person out
there with a Solaris system to submit a patch...
Andrew.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 11:49 ` Andrew Haley
@ 2002-10-11 11:49 ` Tom Tromey
2002-10-11 12:08 ` Andrew Haley
2002-10-12 10:03 ` Kaveh R. Ghazi
2002-10-11 13:57 ` Jeff Sturm
1 sibling, 2 replies; 13+ messages in thread
From: Tom Tromey @ 2002-10-11 11:49 UTC (permalink / raw)
To: Andrew Haley; +Cc: GCC Hackers
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> Hell, whatever works gets my vote! All we need is a nice person out
Andrew> there with a Solaris system to submit a patch...
Can the original reporter try this?
Andrew, if you know who the original reporter is, could you forward it?
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/net/natInetAddress.cc (MAXHOSTNAMELEN) [!WIN32]: Define if
not defined.
Index: java/net/natInetAddress.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/natInetAddress.cc,v
retrieving revision 1.19
diff -u -r1.19 natInetAddress.cc
--- java/net/natInetAddress.cc 28 Feb 2002 01:03:37 -0000 1.19
+++ java/net/natInetAddress.cc 11 Oct 2002 18:04:13 -0000
@@ -1,6 +1,6 @@
// natInetAddress.cc
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation
This file is part of libgcj.
@@ -42,6 +42,10 @@
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
+
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 256
+#endif /* MAXHOSTNAMELEN */
#endif /* WIN32 */
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 11:49 ` Tom Tromey
@ 2002-10-11 12:08 ` Andrew Haley
2002-10-12 10:03 ` Kaveh R. Ghazi
1 sibling, 0 replies; 13+ messages in thread
From: Andrew Haley @ 2002-10-11 12:08 UTC (permalink / raw)
To: tromey; +Cc: GCC Hackers
Tom Tromey writes:
> >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
>
> Andrew> Hell, whatever works gets my vote! All we need is a nice person out
> Andrew> there with a Solaris system to submit a patch...
>
> Can the original reporter try this?
> Andrew, if you know who the original reporter is, could you forward it?
Done.
Andrew.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 11:49 ` Tom Tromey
2002-10-11 12:08 ` Andrew Haley
@ 2002-10-12 10:03 ` Kaveh R. Ghazi
1 sibling, 0 replies; 13+ messages in thread
From: Kaveh R. Ghazi @ 2002-10-12 10:03 UTC (permalink / raw)
To: gcc; +Cc: aph, jsturm, rra
> Solaris only defines MAXHOSTNAMELEN if:
>
> #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
>
> Since this is C++, I'm guessing that it's including the headers in
> a more strictly standard-conforming mode, which means that this
> #define is omitted.
... or it means that _XPG4_2 is defined. Or something else is wrong.
We should understand what this is first.
I've been testing solaris2 daily (forever it seems) and I've never had
this problem. Heck, there's an autobuild bootstrapping 3.2 on
solaris2 and posted daily too. Look at the gcc-testsuite results
list. Before we start installing patches we should figure out what
this person did differently so we can find the correct remedy. It may
be something properly addressed by a different patch or by fixing the
installation docs or ... ? But IMHO we need to know why this one
person had the problem and numerous others don't.
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: gcc-3.2 build problem in the java area
2002-10-11 11:49 ` Andrew Haley
2002-10-11 11:49 ` Tom Tromey
@ 2002-10-11 13:57 ` Jeff Sturm
1 sibling, 0 replies; 13+ messages in thread
From: Jeff Sturm @ 2002-10-11 13:57 UTC (permalink / raw)
To: Andrew Haley; +Cc: tromey, GCC Hackers
On Fri, 11 Oct 2002, Andrew Haley wrote:
> Hell, whatever works gets my vote! All we need is a nice person out
> there with a Solaris system to submit a patch...
I have Solaris, and I have never seen this failure. Though I haven't done
a Solaris build recently.
Trying now... should know by tomorrow :(
Jeff
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2002-10-12 3:51 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 10:07 gcc-3.2 build problem in the java area cyan
2002-10-10 10:21 ` Andrew Haley
2002-10-10 10:25 ` cyan
2002-10-11 2:32 ` Russ Allbery
2002-10-11 10:20 ` Tom Tromey
2002-10-11 10:35 ` Andrew Haley
2002-10-11 10:55 ` David Edelsohn
2002-10-11 11:41 ` Tom Tromey
2002-10-11 11:49 ` Andrew Haley
2002-10-11 11:49 ` Tom Tromey
2002-10-11 12:08 ` Andrew Haley
2002-10-12 10:03 ` Kaveh R. Ghazi
2002-10-11 13:57 ` Jeff Sturm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).