*BSD News Article 62245


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!uunet!in2.uu.net!news.mathworks.com!news.kei.com!nntp.coast.net!torn!nott!bcarh189.bnr.ca!bcarh8ac.bnr.ca!bmdhh222.bnr.ca!tsbarry
From: tsbarry@bnr.ca (Barry Scott)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Help Installing libg++-2.7.1 on FreeBsd 2.1.0
Date: 16 Feb 1996 16:51:55 GMT
Organization: Bell Northern Research
Lines: 58
Message-ID: <4g2cnb$c21@bmdhh222.bnr.ca>
References: <310F0B6E.41C67EA6@cst.com.au> <4fpvrf$1sv@bmdhh222.bnr.ca> <4fvigu$p2e@helena.MT.net>
NNTP-Posting-Host: bmdhh3ff.bnr.ca
X-Newsreader: TIN [version 1.2 PL2]

Nate Williams (nate@trout.sri.MT.net) wrote:
: You *are* including <unistd.h>, <sys/types.h>, and <sys/stat.h> aren't
: you?

	I just double checked and yes I have all the header files
	you list.

: >	stat() writes beyond the end of its buffer.

: Huh?  This can't happen unless you don't have the correct buffer size set.

	I use code like

		struct stat a_buffer;

		int status = stat( filename, &a_buffer );

	how could that get me a buffer that is two small?

: >	lseek() reports EINVAL for good values of the 3rd
: >	parameter.

: The 2nd parameter has changed, did you pick up the correct prototype so
: that your program would warn you of this change (which is required to
: support files > 2GB).  'off_t' is now a 'long long'.

	I will  look  very  closely at the prototype and look for
	the  long  long  and  the definition of off_t.  Maybe the
	wrong set of .h files are being used.

: >	Not to mention that G++ 2.7.2 SEGV's on a lot of
: >	C++ code that compiles under 2.7.2. on HPUX.

: When a program SEGV's, it's almost always a hardware problem.  Don't blame
: FreeBSD for programmatic errors.

	Assuming I  have  not  named  the wrong signal I hope you
	mean  "its  always  a  SOFTWARE problem".  The bugs would
	appear  to  be  in  the  i386  code  generate.  Certainly
	nothing to do with the FreeBSD operating system.

	I have  verified  that  the  code  fragment  fails on two
	FReeBSD  machines.   Mine  in  the  U.K.   and another in
	Austrialia  that  I  have  not  configured.  Thats strong
	evidence  that  the  bug  is real and not a problem in my
	configuring the GCC G++ software.


: Nate
: -- 

	Can anyone  compile  the code fragment under FreeBSD with
	G++ 2.7.2?

	Has anyone  built  a program that uses lseek or stat that
	works with 2.7.2 g++ and 2.7.2 libg++?

			BArry