Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Problems with g++ and netdb functions
@ 1998-09-08 11:33 Jerry Feldman
  1998-09-08 21:39 ` Brian Wood
  1998-09-08 22:36 ` Wes Bauske
  0 siblings, 2 replies; 6+ messages in thread
From: Jerry Feldman @ 1998-09-08 11:33 UTC (permalink / raw)
  To: axp-list

I have an application that I am working on which runs on multiple 
platforms including Linux Intel, Solaris, NT, Windoz 9x. When calling 
any function in netdb, I get a seg fault on Linux Alpha (Red Hat 5.0 
with updated libraries).
The following example code core dumps when compiled as a C++ 
program, but runs when compiled as a C program:
#if defined (__cplusplus)
extern "C" {
#endif
	void setservent(int);
#if defined (__cplusplus)
}
#endif
int main(int argc, char **argv) 
{
	setservent(1);
}
My gcc(g++) and glibc versions are:
gcc version 2.7.2.3
glibc-devel-2.0.7-19
Kernel:2.0.30
Platform:UDB 233MHz. (EV45 chip).

If anyone can suggest a viable solution, I would like to be able to 
continue working on this application on Alpha Linux. 

+----------------------------------------------+
Gerald Feldman <gaf@mediaone.net>
Boston Computer Solutions and Consulting
ICQ#156300


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with g++ and netdb functions
  1998-09-08 11:33 Problems with g++ and netdb functions Jerry Feldman
@ 1998-09-08 21:39 ` Brian Wood
  1998-09-09 14:46   ` Charl Botha
  1998-09-08 22:36 ` Wes Bauske
  1 sibling, 1 reply; 6+ messages in thread
From: Brian Wood @ 1998-09-08 21:39 UTC (permalink / raw)
  To: axp-list

Jerry Feldman wrote:
> 
> I have an application that I am working on which runs on multiple
> platforms including Linux Intel, Solaris, NT, Windoz 9x. When calling
> any function in netdb, I get a seg fault on Linux Alpha (Red Hat 5.0
> with updated libraries).
> The following example code core dumps when compiled as a C++
> program, but runs when compiled as a C program:

<snip>

C++ problems with RedHat 5.0 Alpha are well known. The best bet IMHO is
to go with EGCS 1.0.3a instead of g++.

-- 
Brian E.W. Wood - beww@intac.com
"Very Funny Scotty, Now BEAM DOWN MY CLOTHES"


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with g++ and netdb functions
  1998-09-08 11:33 Problems with g++ and netdb functions Jerry Feldman
  1998-09-08 21:39 ` Brian Wood
@ 1998-09-08 22:36 ` Wes Bauske
  1 sibling, 0 replies; 6+ messages in thread
From: Wes Bauske @ 1998-09-08 22:36 UTC (permalink / raw)
  To: axp-list

Jerry Feldman wrote:
> 
> I have an application that I am working on which runs on multiple
> platforms including Linux Intel, Solaris, NT, Windoz 9x. When calling
> any function in netdb, I get a seg fault on Linux Alpha (Red Hat 5.0
> with updated libraries).
> The following example code core dumps when compiled as a C++
> program, but runs when compiled as a C program:
> #if defined (__cplusplus)
> extern "C" {
> #endif
>         void setservent(int);
> #if defined (__cplusplus)
> }
> #endif
> int main(int argc, char **argv)
> {
>         setservent(1);
> }
> My gcc(g++) and glibc versions are:
> gcc version 2.7.2.3
> glibc-devel-2.0.7-19
> Kernel:2.0.30
> Platform:UDB 233MHz. (EV45 chip).
> 
> If anyone can suggest a viable solution, I would like to be able to
> continue working on this application on Alpha Linux.
> 

Works fine on RH5.0 w/egcs1.03a.


Wes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with g++ and netdb functions
@ 1998-09-08 23:23 Greg Lindahl
  1998-09-11  1:17 ` Jerry Feldman
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Lindahl @ 1998-09-08 23:23 UTC (permalink / raw)
  To: axp-list

> The following example code core dumps when compiled as a C++ 
> program, but runs when compiled as a C program:
> #if defined (__cplusplus)
> extern "C" {
> #endif
> 	void setservent(int);
> #if defined (__cplusplus)
> }
> #endif
> int main(int argc, char **argv) 
> {
> 	setservent(1);
> }

Lord only knows if the RedHat 5.0 C++ stuff was ever really
fixed. You're much better off installing 5.1 or egcs.

-- g


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with g++ and netdb functions
  1998-09-08 21:39 ` Brian Wood
@ 1998-09-09 14:46   ` Charl Botha
  0 siblings, 0 replies; 6+ messages in thread
From: Charl Botha @ 1998-09-09 14:46 UTC (permalink / raw)
  To: axp-list

On Tue, 8 Sep 1998, Brian Wood wrote:

> Jerry Feldman wrote:
> > I have an application that I am working on which runs on multiple
> > platforms including Linux Intel, Solaris, NT, Windoz 9x. When calling
> > any function in netdb, I get a seg fault on Linux Alpha (Red Hat 5.0
> > with updated libraries).
> <snip>
> 
> C++ problems with RedHat 5.0 Alpha are well known. The best bet IMHO is
> to go with EGCS 1.0.3a instead of g++.
> 
<snip>

Or just go with the new egcs-1.1, it's been giving me *very* good mileage
on the alpha.  There are egcs-1.1b rpms on redhat contrib, you might have
to rebuild the srpms for alpha though.

Charl

---------------------------------------------------------------------------
Charl Botha

E-Mail cpbotha@sun.ac.za

Image Processing and Pattern Recognition
Digital Signal Processing Group <http://dsp.ee.sun.ac.za>
Department of Electronic Engineering
University of Stellenbosch
South Africa



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Problems with g++ and netdb functions
  1998-09-08 23:23 Greg Lindahl
@ 1998-09-11  1:17 ` Jerry Feldman
  0 siblings, 0 replies; 6+ messages in thread
From: Jerry Feldman @ 1998-09-11  1:17 UTC (permalink / raw)
  To: Greg Lindahl

On 8 Sep 98, at 19:23, Greg Lindahl <axp-list@redhat.com> wrote:

> Lord only knows if the RedHat 5.0 C++ stuff was ever really
> fixed. You're much better off installing 5.1 or egcs.
Thanks Greg. I downloaded EGCS, but don't have enough disk space 
on the Alpha. Just bought an 8.4 GB for my PC so I can install Linux 
on it. I'll also upgrade the Alpha. 
+----------------------------------------------+
Gerald Feldman <gaf@mediaone.net>
Boston Computer Solutions and Consulting
ICQ#156300


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-09-11  1:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-09-08 11:33 Problems with g++ and netdb functions Jerry Feldman
1998-09-08 21:39 ` Brian Wood
1998-09-09 14:46   ` Charl Botha
1998-09-08 22:36 ` Wes Bauske
  -- strict thread matches above, loose matches on Subject: below --
1998-09-08 23:23 Greg Lindahl
1998-09-11  1:17 ` Jerry Feldman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox