Bug 10974 - Bootstrap failure
Summary: Bootstrap failure
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-25 15:56 UTC by The Written Word
Modified: 2003-06-09 05:41 UTC (History)
2 users (show)

See Also:
Host: powerpc-ibm-aix4.3.2.0
Target: powerpc-ibm-aix4.3.2.0
Build: powerpc-ibm-aix4.3.2.0
Known to work:
Known to fail:
Last reconfirmed: 2003-06-09 03:19:41


Attachments
Patch to correctly set HAVE__SYSTEM_CONFIGURATION if physmem member exists (963 bytes, patch)
2003-05-25 15:58 UTC, The Written Word
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description The Written Word 2003-05-25 15:56:29 UTC
/usr/vac/bin/cc -c -DHAVE_CONFIG_H -g -I.
-I/opt/build/gcc-3.3/libiberty/../include
/opt/build/gcc-3.3/libiberty/physmem.c -o physmem.o
"/opt/build/gcc-3.3/libiberty/physmem.c", line 149.32: 1506-022 (S)
"physmem" is not a member of "struct {...}".
gmake[1]: *** [physmem.o] Error 1
gmake[1]: Leaving directory `/opt/build/gcc-3.3-objdir/libiberty'

On AIX 5.1, the _system_configuration struct in <sys/systemcfg.h> does
have the physmem member:
        long long physmem;      /* bytes of OS available memory */

However, on 4.3.2, it doesn't exist (it exists on AIX 4.3.3 and above). And, I
don't see anything else in _system_configuration to get physical memory.
Comment 1 The Written Word 2003-05-25 15:58:34 UTC
Created attachment 4071 [details]
Patch to correctly set HAVE__SYSTEM_CONFIGURATION if physmem member exists
Comment 2 Dara Hazeghi 2003-05-26 17:46:58 UTC
David,

I believe this is you area of expertise. Would it be possible for you to take a look at the patch here 
and check whether this is a correct fix to the problem? Thanks,

Dara
Comment 3 Andrew Pinski 2003-05-26 18:04:19 UTC
You should sent your patch to gcc-patches@gcc.gnu.org, with a descripition of the bug.
Comment 4 David Edelsohn 2003-05-26 18:17:53 UTC
Subject: Re: [Bug bootstrap/10974] Bootstrap failure 

Kaveh,

	Would you plesae consider updating the libiberty physical memory
check on AIX with this patch?

David
Comment 5 Kaveh Ghazi 2003-06-01 13:56:39 UTC
Subject: Re:  Bootstrap failure

 > From: David Edelsohn <dje@watson.ibm.com>
 > 
 > Kaveh,
 > 	Would you plesae consider updating the libiberty physical memory
 > check on AIX with this patch?
 > David

Sure.  Though I don't have any AIX boxes at all for testing it.  Can I
assume that you verified physmem is still correctly activated on
AIX4.3.3 and AIX5?

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu
Comment 6 David Edelsohn 2003-06-02 03:38:35 UTC
Subject: Re:  Bootstrap failure 

>>>>> Kaveh R Ghazi writes:

Kaveh> Sure.  Though I don't have any AIX boxes at all for testing it.  Can I
Kaveh> assume that you verified physmem is still correctly activated on
Kaveh> AIX4.3.3 and AIX5?

	The patch tests for the existence of the structure member, not a
specific AIX version.  Why are you asking about AIX version numbers?

David
Comment 7 Kaveh Ghazi 2003-06-02 11:48:19 UTC
Subject: Re:  Bootstrap failure

 > From: David Edelsohn <dje@watson.ibm.com>
 > 
 > >>>>> Kaveh R Ghazi writes:
 > 
 > Kaveh> Sure.  Though I don't have any AIX boxes at all for testing it.  Can I
 > Kaveh> assume that you verified physmem is still correctly activated on
 > Kaveh> AIX4.3.3 and AIX5?
 > 
 > 	The patch tests for the existence of the structure member, not a
 > specific AIX version.  Why are you asking about AIX version numbers?
 > David

I want to know if someone had tested the patch in both the negative
*and* the positive case of whether the structure member exists.  I
assume albert checked the negative case on his 4.3.2 box.  I listed
the AIX version numbers of where I thought the positive case lies.

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu
Comment 8 The Written Word 2003-06-02 11:52:59 UTC
I tested on AIX 5.1 but not 4.3.3.
Comment 9 David Edelsohn 2003-06-02 18:16:30 UTC
Subject: Re:  Bootstrap failure 

>>>>> ghazi@caip rutgers edu writes:

ghazi> I want to know if someone had tested the patch in both the negative
ghazi> *and* the positive case of whether the structure member exists.  I
ghazi> assume albert checked the negative case on his 4.3.2 box.  I listed
ghazi> the AIX version numbers of where I thought the positive case lies.

	The patch looks correct to me.  It tests assigning the structure
member to a double instead of a "long long", but that is what the function
in libiberty/physmem.c returns.

David

Comment 10 Dara Hazeghi 2003-06-08 03:43:47 UTC
Hello,

the patch for this doesn't yet seem to have been committed yet. Is the problem that nobody has 
tested it yet on AIX 4.3.3? Thanks,

Dara
Comment 11 David Edelsohn 2003-06-08 03:53:38 UTC
Subject: Re:  Bootstrap failure 

>>>>> dhazeghi@yahoo com writes:

Dara> the patch for this doesn't yet seem to have been committed yet. Is the problem that nobody has 
Dara> tested it yet on AIX 4.3.3?

	I do not know why Kaveh has not merged the patch yet.

David
Comment 12 Kaveh Ghazi 2003-06-08 05:27:14 UTC
Subject: Re:  Bootstrap failure

 > From: David Edelsohn <dje@watson.ibm.com>
 > 
 > >>>>> dhazeghi@yahoo com writes:
 > 
 > Dara> the patch for this doesn't yet seem to have been committed yet. Is the problem that nobody has 
 > Dara> tested it yet on AIX 4.3.3?
 > 
 > 	I do not know why Kaveh has not merged the patch yet.
 > David

For some reason, the followups to my question about testing didn't get
cc'ed to me directly.  So I never saw the replies until I checked the
PR audit trail just now.

I'm convinced by the replies, so I'll check in the patch tomorrow
(Sunday) on mainline and 3.3 branch.

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu
Comment 13 Andrew Pinski 2003-06-09 03:19:41 UTC
Waiting on Kaveh Ghazi to check it in.
Comment 14 GCC Commits 2003-06-09 05:20:05 UTC
Subject: Bug 10974

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	ghazi@gcc.gnu.org	2003-06-09 05:20:02

Modified files:
	libiberty      : ChangeLog physmem.c configure.in config.in 
	                 configure 

Log message:
	PR bootstrap/10974
	* physmem.c: Update comment.
	* configure.in: Modify test for _system_configuration for older
	AIX systems.
	
	* config.in, configure: Regenerated.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libiberty/ChangeLog.diff?cvsroot=gcc&r1=1.446&r2=1.447
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libiberty/physmem.c.diff?cvsroot=gcc&r1=1.10&r2=1.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libiberty/configure.in.diff?cvsroot=gcc&r1=1.68&r2=1.69
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libiberty/config.in.diff?cvsroot=gcc&r1=1.30&r2=1.31
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libiberty/configure.diff?cvsroot=gcc&r1=1.68&r2=1.69

Comment 15 Kaveh Ghazi 2003-06-09 05:41:18 UTC
fix installed