dbTalk Databases Forums  

Re: [BUGS] solaris 10 with gcc 3.3.2

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] solaris 10 with gcc 3.3.2 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] solaris 10 with gcc 3.3.2 - 12-12-2004 , 12:05 AM






"Belbin, Peter" <PBelbin (AT) McLeodUSA (DOT) com> writes:
Quote:
Should I be able to compile with gcc 3.3.2 (from sunfreeware) on solaris 10?
Yes ...

Quote:
gcc -DPOSIX -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels
-fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o
exec.o exec.c
In file included from /usr/include/sys/wait.h:24,
from exec.c:26:
/usr/include/sys/siginfo.h:259: error: parse error before "ctid_t"
/usr/include/sys/siginfo.h:292: error: parse error before '}' token
This looks like your platform's <sys/wait.h> is not designed to be
included free-standing, but requires certain other system headers to be
included first. (This is poor practice, but seen all too often :-()
A fairly likely guess is that the missing header is <sys/types.h>.
You might be able to find out for sure by checking the man page for
waitpid() and related system calls ... or just try hacking exec.c till
it compiles.

It's likely that exec.c is not the only place missing the extra
include(s). Please send a patch after you get it all to build.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] solaris 10 with gcc 3.3.2 - 12-17-2004 , 10:35 PM






"Belbin, Peter" <PBelbin (AT) McLeodUSA (DOT) com> writes:
Quote:
It seems that rather than using the /usr/include/sys/types.h, gcc 3.3.2 is
instead, using a version of the same file, located at
/usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/include/sys, which does
not have a definition for ctid_t
This is standard practice for gcc: it tries to use "cleaned up" versions
of system headers that will not elicit useless warnings from gcc. It's
a good idea, actually, because the degree of insanity in vendor-supplied
system headers is pretty depressing. But if the gcc install process
generated an invalid "cleanup" file then you need to take that up with
the gcc boys, not us.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] solaris 10 with gcc 3.3.2 - 12-18-2004 , 12:01 AM



I wrote:
Quote:
This is standard practice for gcc: it tries to use "cleaned up" versions
of system headers that will not elicit useless warnings from gcc. It's
a good idea, actually, because the degree of insanity in vendor-supplied
system headers is pretty depressing. But if the gcc install process
generated an invalid "cleanup" file then you need to take that up with
the gcc boys, not us.
On rereading this, a nearly-dead neuron fired --- I have seen problems
of this sort arise when someone took a gcc installation generated on
NiftyVendorUnix M.N and copied it verbatim to NiftyVendorUnix M.N+1,
or indeed any release other than M.N. Then you have a situation where
gcc is inserting cleaned-up versions of some system headers but not
others (because it doesn't force the issue when it doesn't have to),
and if the vendor did something like move a typedef from one header
to another, you lose, because the cleaned-up headers are not in sync
with the others.

In short ... where'd you get your gcc installation from?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #4  
Old   
Mike Mascari
 
Posts: n/a

Default Re: [BUGS] solaris 10 with gcc 3.3.2 - 12-18-2004 , 04:59 AM



Tom Lane wrote:

Quote:
I wrote:


This is standard practice for gcc: it tries to use "cleaned up" versions
of system headers that will not elicit useless warnings from gcc. It's
a good idea, actually, because the degree of insanity in vendor-supplied
system headers is pretty depressing. But if the gcc install process
generated an invalid "cleanup" file then you need to take that up with
the gcc boys, not us.



On rereading this, a nearly-dead neuron fired --- I have seen problems
of this sort arise when someone took a gcc installation generated on
NiftyVendorUnix M.N and copied it verbatim to NiftyVendorUnix M.N+1,
or indeed any release other than M.N.


That nearly-dead neuron has value. The problem is that most people are
getting the Solaris 10 beta builds whose headers conflict with the gcc
3.3.2 package's 'adapted' headers they are acquiring from
sunfreeware.com, which, along with distributing other binary packages,
is the place referred to by gcc.gnu.org for pre-built Solaris binaries.
All the original poster needs to do is rebuild the gcc's 'adapted'
headers with:

# cd /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/install-tools
# ./mkheaders

and they should be good to go....

Mike Mascari


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #5  
Old   
Mike Mascari
 
Posts: n/a

Default Re: [BUGS] solaris 10 with gcc 3.3.2 - 12-18-2004 , 05:05 AM



Mike Mascari wrote:

Quote:
Tom Lane wrote:

I wrote:


This is standard practice for gcc: it tries to use "cleaned up"
versions
of system headers that will not elicit useless warnings from gcc. It's
a good idea, actually, because the degree of insanity in
vendor-supplied
system headers is pretty depressing. But if the gcc install process
generated an invalid "cleanup" file then you need to take that up with
the gcc boys, not us.



On rereading this, a nearly-dead neuron fired --- I have seen problems
of this sort arise when someone took a gcc installation generated on
NiftyVendorUnix M.N and copied it verbatim to NiftyVendorUnix M.N+1,
or indeed any release other than M.N.

That nearly-dead neuron has value. The problem is that most people are
getting the Solaris 10 beta builds whose headers conflict with the gcc
3.3.2 package's 'adapted' headers they are acquiring from
sunfreeware.com, which, along with distributing other binary packages,
is the place referred to by gcc.gnu.org for pre-built Solaris
binaries. All the original poster needs to do is rebuild the gcc's
'adapted' headers with:

# cd /usr/local/lib/gcc-lib/i386-pc-solaris2.10/3.3.2/install-tools
# ./mkheaders

and they should be good to go....
Actually, I see the original poster is on SPARC, so the correct path to
the 'mkheaders' utility is probably going to be:

# cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools
# ./mkheaders

Mike Mascari


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.