Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by anon » Sat, 13 Mar 2004 13:25:19



I'm trying to compile apache on Solaris 10 and been unable to do so --
I keep getting Pthread.h parse errors during make. Since i'm using the
SunFreeware Solaris 9 gcc 3.3.2 package on it, I think the problem is
that compiler is linked against Solaris 9 specific libraries, headers,
etc and won't work on Solaris 10. I tried compiling gcc 3.3.3 on it
using this compiler (my only option) which of course failed.

I need to know where I can get a compiler for Solaris 10. Is there
anyone out there that can help me?

JF
St. Louis, MO

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by anon » Sat, 13 Mar 2004 13:31:26


Also I am trying this on Solaris 10 x86, but I expect I will have the
same problem on Sparc (I'll find out soon enough)

JF
St. Loius, MO


>I'm trying to compile apache on Solaris 10 and been unable to do so --
>I keep getting Pthread.h parse errors during make. Since i'm using the
>SunFreeware Solaris 9 gcc 3.3.2 package on it, I think the problem is
>that compiler is linked against Solaris 9 specific libraries, headers,
>etc and won't work on Solaris 10. I tried compiling gcc 3.3.3 on it
>using this compiler (my only option) which of course failed.

>I need to know where I can get a compiler for Solaris 10. Is there
>anyone out there that can help me?

>JF
>St. Louis, MO


 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Markus Gyg » Sat, 13 Mar 2004 13:32:30



> I need to know where I can get a compiler for Solaris 10.

You might want to try Sun Studio 9 Early Access:
http://developers.sun.com/prodtech/cc/ea/ss9/

Markus

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Dennis Clark » Sat, 13 Mar 2004 14:02:13




>> I need to know where I can get a compiler for Solaris 10.

>You might want to try Sun Studio 9 Early Access:
>http://developers.sun.com/prodtech/cc/ea/ss9/

If the OP needs the compiler to actually be built with Solaris 10 then he may
need to bootstrap gcc 3.3.2 himself.  I have created a native GCC 3.3.2 on
Solaris 10 by using GCC 2.95 for Solaris 8 and 9.  This seems to be a
successful approach.  Other than that, I have to wonder why it needs to be
built with Solaris 10 specifically.

Dennis Clarke

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Dennis Clark » Sat, 13 Mar 2004 14:11:35


After further thought I can let you know that I have already ran into problems
with GCC 3.3.2 on Solaris 10 Sparc due to a dependency on the SUNWcslx
package.  The Solaris 10 install only has SUNWcsl as the x is redundant on
Solaris 10.

Sun Microsystems Inc.   SunOS 5.10      s10_51  May 2004
$ pkginfo | grep SUNWcsl
system      SUNWcsl                          Core Solaris, (Shared Libs)
system      SUNWcslr                         Core Solaris Libraries (Root)

Sun Microsystems Inc.   SunOS 5.9       Generic May 2002
$ pkginfo | grep SUNWcsl
system      SUNWcsl                          Core Solaris, (Shared Libs)
system      SUNWcslx                         Core Solaris Libraries (64-bit)

I was able to install GCC 2.95 from blastwave.org and then bootstrap
 GCC 3.3.2 with success.  Sorry .. no package from blastwave.org yet!

I also have the Studio 9 EA packages but have not yet had time to use them
much.  I am sure that they would work well provided that you have the disk
space and RAM.  No promises though :)

Dennis Clarke               Director and Admin for Blastwave.org
                               Home of Community Software Packages

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Christer Solskoge » Sat, 13 Mar 2004 16:55:54





>>>I need to know where I can get a compiler for Solaris 10.

>>You might want to try Sun Studio 9 Early Access:
>>http://developers.sun.com/prodtech/cc/ea/ss9/

> If the OP needs the compiler to actually be built with Solaris 10 then he may
> need to bootstrap gcc 3.3.2 himself.  I have created a native GCC 3.3.2 on
> Solaris 10 by using GCC 2.95 for Solaris 8 and 9.  This seems to be a
> successful approach.  Other than that, I have to wonder why it needs to be
> built with Solaris 10 specifically.

Just a quick one;
Can you build gcc-3.3.2 with gcc-3.3.2 (built by gcc-2.95) ?

--
Med vennlig hilsen / Best regards
Christer Solskogen / dizzy tun3Z
http://dtz.cjb.net - http://carebears.mine.nu

"Cheap, but not as cheap as your girlfriend!"
-Spider Jerusalem

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Markus Gyg » Sat, 13 Mar 2004 18:17:52



> I also have the Studio 9 EA packages but have not yet had time to use them
> much.  I am sure that they would work well provided that you have the disk
> space and RAM.

If you only use the command line tools then RAM is no issue.
Since it is a C99 compiler and S10 has the appropriate header
files you might get an (intentional) #error if your application
defines e.g. _POSIX_SOURCE or _XOPEN_SOURCE to certain values
(see man standards(5)). So you might need cc -xc99=%none.

Markus

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by joe durusa » Sat, 13 Mar 2004 22:57:53



> Also I am trying this on Solaris 10 x86, but I expect I will have the
> same problem on Sparc (I'll find out soon enough)

> JF
> St. Loius, MO


> >I'm trying to compile apache on Solaris 10 and been unable to do so --
> >I keep getting Pthread.h parse errors during make. Since i'm using the
> >SunFreeware Solaris 9 gcc 3.3.2 package on it, I think the problem is
> >that compiler is linked against Solaris 9 specific libraries, headers,
> >etc and won't work on Solaris 10. I tried compiling gcc 3.3.3 on it
> >using this compiler (my only option) which of course failed.

> >I need to know where I can get a compiler for Solaris 10. Is there
> >anyone out there that can help me?

> >JF
> >St. Louis, MO

It seems extremely unlikely that the libs with which the compiler
was built have anything to do with your problem.  Sun guarantees that
executables for a like processor on 9 will run on 10 without change.

Parse errors in a header file generally indicate some problem with the
source, usually an option that the source used that is not available in
the compiler as such, or maybe the headers that come as part of
sol 10 have or don't have a feature that apache wants.

If you posted a _SHORT_ example, maybe somebody could guess
at what the problem is.  (I suggest 10 lines or less).

Speaking only for myself,

Joe Durusau

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Dennis Clark » Sun, 14 Mar 2004 02:23:04


Quote:>Just a quick one;
>Can you build gcc-3.3.2 with gcc-3.3.2 (built by gcc-2.95) ?

quick answer : yes

long answer : the stage 3 phase of the bootstrap does this.  That is why
              gcc -v reports that it is built with itself.

longer answer :

  I am in the process of doing this ( again ) as I would like a better test
 result from the testsuite. I'll let people know when it seems to be working.

Dennis

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Jonathan Ada » Sun, 14 Mar 2004 03:57:18



> I'm trying to compile apache on Solaris 10 and been unable to do so --
> I keep getting Pthread.h parse errors during make. Since i'm using the
> SunFreeware Solaris 9 gcc 3.3.2 package on it, I think the problem is
> that compiler is linked against Solaris 9 specific libraries, headers,
> etc and won't work on Solaris 10. I tried compiling gcc 3.3.3 on it
> using this compiler (my only option) which of course failed.

It's not a linking problem -- Sun pays a lot of attention to binary
compatibility.

This is almost certainly a side-effect of gcc's fixincludes madness --
it squirrels away slightly modified copied of a bunch of system
headers.  In particular, you are probably getting errors relating to
pthread_spinlock_t or pthread_barrier_t, which were recently added to
<sys/types.h> in S10.

fixincludes *always* mucks with <sys/types.h>, so you are probably
getting the S9 version of the header. (or whatever version the GCC
package you are using picked up)

Unfortunately, I have no idea how to update the headers without
re-doing the entire gcc installation.  Any GCC gurus in the house?

- jonathan

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Dragan Cvetkovi » Sun, 14 Mar 2004 04:06:27




>> I'm trying to compile apache on Solaris 10 and been unable to do so --
>> I keep getting Pthread.h parse errors during make. Since i'm using the
>> SunFreeware Solaris 9 gcc 3.3.2 package on it, I think the problem is
>> that compiler is linked against Solaris 9 specific libraries, headers,
>> etc and won't work on Solaris 10. I tried compiling gcc 3.3.3 on it
>> using this compiler (my only option) which of course failed.

> It's not a linking problem -- Sun pays a lot of attention to binary
> compatibility.

> This is almost certainly a side-effect of gcc's fixincludes madness --
> it squirrels away slightly modified copied of a bunch of system
> headers.  In particular, you are probably getting errors relating to
> pthread_spinlock_t or pthread_barrier_t, which were recently added to
> <sys/types.h> in S10.

> fixincludes *always* mucks with <sys/types.h>, so you are probably
> getting the S9 version of the header. (or whatever version the GCC
> package you are using picked up)

> Unfortunately, I have no idea how to update the headers without
> re-doing the entire gcc installation.  Any GCC gurus in the house?

I had to do something similar when I was compiling some programs dealing
with processes (check http://groups.google.ca/groups?th=c7dd731392085b94)
and was given the following advise by a Sun engineer (thanks Mike!):

"you might have to rebuild gcc or rerun fixincludes. It has a munged copy of
sys/types.h and that needs to be updated to work with the system headers
it didn't munge :)"

So I rerun fixincludes and everything worked fine afterwards. I don't know
if I had to get fixincludes from the source distribution of gcc though.

HTH, Dragan

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole      No it isn't.  L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Rich Tee » Sun, 14 Mar 2004 05:25:44



> So I rerun fixincludes and everything worked fine afterwards. I don't know
> if I had to get fixincludes from the source distribution of gcc though.

Hmm.  SOunds like "fixincludes" should be renamed "breakincludes".
Just out of curiosity, what does gcc fsck with system headers in
the first place?

--
Rich Teer, SCNA, SCSA

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Dragan Cvetkovi » Sun, 14 Mar 2004 05:44:13




>> So I rerun fixincludes and everything worked fine afterwards. I don't know
>> if I had to get fixincludes from the source distribution of gcc though.

> Hmm.  SOunds like "fixincludes" should be renamed "breakincludes".
> Just out of curiosity, what does gcc fsck with system headers in
> the first place?

When I diff gcc specific sys/types.h and /usr/include/sys/types.h I don't
see much difference _after_ running fixincludes. The problem with gcc ones
are that they don't change with Solaris version and therefore break after
Sun adds new interfaces (I think they did quite a few changes in /proc back
in s10_b48).

For example, the difference between fixed sys/types.h back in s10_b48 and a
new one (in s10_b51) is that the new one contains definition of
pthread_barrier_t (sounds interesting!) and related stuff. My problem in
compiling gdb back in s10_b48 was that gcc specific <sys/types.h> didn't
contain upad128_t (after running fixincl it did compile).

On the other hand, I don't remember having many problems with gcc fixed
Solaris 9 headers until s10_b48.

Now, why does gcc need to do this is another question. I guess it is not
easy to fit all these different UNIX and non-UNIX platforms into a single
compile framework...

Bye, Dragan

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole      No it isn't.  L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by Rich Tee » Sun, 14 Mar 2004 07:30:52



> On the other hand, I don't remember having many problems with gcc fixed
> Solaris 9 headers until s10_b48.

I don't recall having ANY problems, and I don't think I've ever
ran fixincludes.  Mind you, I don't use gcc in anger (so to speak),
so maybe I'm just hitting problems that are waiting to bite me.
That's using gcc 2.95.2 on Solaris 2.5 -> Solaris 10 (same install
image on an NFS server).

Oh, how uncomplicated life is in my insular, SPARC/Solaris/Sun
compiler world!  :-)

--
Rich Teer, SCNA, SCSA

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net

 
 
 

Solaris 10 -- Where to get gcc (or other compiler) built on Solaris 10?

Post by John Edward Scot » Sun, 14 Mar 2004 10:07:47


I went through the same troubles, make SURE you read this -

http://www.sunfreeware.com/gcc.html

follow the instructions and gcc compiles perfectly.


Quote:> I'm trying to compile apache on Solaris 10 and been unable to do so --
> I keep getting Pthread.h parse errors during make. Since i'm using the
> SunFreeware Solaris 9 gcc 3.3.2 package on it, I think the problem is
> that compiler is linked against Solaris 9 specific libraries, headers,
> etc and won't work on Solaris 10. I tried compiling gcc 3.3.3 on it
> using this compiler (my only option) which of course failed.

> I need to know where I can get a compiler for Solaris 10. Is there
> anyone out there that can help me?

> JF
> St. Louis, MO

 
 
 

1. gcc 4.1.1 build under Intel Solaris 10 does not build gcc

This is strange. gcc compiled fine (i did it yesterday on Sparc, and
today on Intel).

While a call to "g++ -v" tells me that 4.1.1 is invoked (using the
standard prefix /usr/local/bin)
the "gcc" executable is not installed. It is still the 3.3 that i
installed as a package from sunfreeware.com

Any ideas where i can find the gcc ?

I did a simple "configure ; make ; make install" without any parameters.

2. DIP Problems

3. Solaris 10 (build 63) upgrade fails on Solaris 8 as well as Solaris 9 sparcs

4. Best way to get 2 sound inputs? 2 cards?

5. Jumpstart solaris 10 b69 and solaris 10 b72 on an Ultra 30

6. USB camera's

7. Live upgrade failure: Solaris 10 -> Solaris 10 update 1.

8. Terminfo entry for Wyse 370s?

9. lsof 4.70D for Solaris 10 [was Re: Lsof on Solaris 10 x86?]

10. Cross Compiler for Solaris 10 x86 on Solaris 8 Sparc.

11. Solaris 10 1/06 OK, but Solaris Express Build 33 and 36 fail

12. Solaris 10, built new disk, now cannot boot off solaris 8 disk???

13. Oracle 10 (RAC) & Solaris 10 & Sun Cluster 3