Subject: Re: The correct way to use gcc from pkgsrc?
To: Frederick Bruckman <fredb@immanent.net>
From: Andy Ruhl <acruhl@gmail.com>
List: netbsd-help
Date: 11/14/2005 16:08:49
On 11/14/05, Frederick Bruckman <fredb@immanent.net> wrote:
> In article <78a2305a0511071223j243d70e3ve086d4d12f436b36@mail.gmail.com>,
>         Andy Ruhl <acruhl@gmail.com> writes:
> > On 11/7/05, John R. Shannon <john@johnrshannon.com> wrote:
> >> >>
> >> >>insert a line saying:
> >> >>
> >> >>GCC_REQD=3D3.4
> >> >>
> >> >>into /etc/mk.conf
>
> >> > When the package got done installing, I noticed that it says it
> >> > required gcc34, but it didn't fail in the beginning because of this,
> >> > and I didn't know this, I just upgraded thinking it was worth a try.
> >>
> >> I'm not sure that I understand what your saying. Fo you have gcc34
> >> installed on your system?
> > Sorry, I'll explain.
> > Originally I desired to install postgresql80 from pkgsrc on my
> > 3.0_BETA cobalt qube2.
> > So I did make package, and after some time it failed with "internal
> > compiler error". The client part built, but the server part did not.
> > I know there have been some gcc enhancements and fixes recently, so I
> > decided to install gcc34 from pkgsrc and try that before I open any
> > pr's.
> > So I did that, and postgresql80 built successfully. However, at the
> > end of the build where it registers dependencies, gcc34 was listed.
> > I'm thinking I should have failed on that dependency to start with
> > instead of building with the built in gcc 3.3.3 compiler?
>
> I guess the package requires gcc34 because you built it against gcc34.
> Any executables that are built by gcc "c++" will need the "libstdc++"
> that ships with the compiler to run, so the package system represents
> that by adding the dependency.
>
> By the way, from the description in "mk/compiler.mk", it looks as if
> GCC_REQD is intended to be set in the packages's "Makefile", not in
> the user's "/etc/mk.conf". I expect, that if it were set that way to
> start with, the package system would have built gcc34, and used it.

That was my concern as well, but I *think* this might have been fixed
recently, where the package builds the compiler it wants then uses it.

Andy