Re: gcc versions following upgrade 6.3 >7.0

2008-07-22 Thread David Southwell
On Tuesday 22 July 2008 08:16:38 Garrett Cooper wrote:
> On Tue, Jul 22, 2008 at 1:16 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > On Tue, Jul 22, 2008 at 01:07:53AM -0700, David Southwell wrote:
> >
> > The "base system" does not add anything to the ports/pkg database.  The
> > reason you have gcc 4.1.3 and gcc 4.2.5 on your machine is because some
> > other port/package depended/depends on them.  pkg_info -R will solve
> > that mystery.
> >
> > As I said before: some ports/packages may require a newer (or older)
> > version of GCC, in which case, you'll end up with two (or more) versions
> > of gcc on your system -- one in the base and one (or more) managed via
> > ports.
> >
> > Regardless of what Garrett and others say about how multiple compilers
> > on a system "works great", I do not advocate it.  There are many catches
> > which can/will surprise you down the road, especially with regards to
> > library linking order, symbol versioning, and a couple other things.
> > I'm sorry, but in my eyes it's risky behaviour.  We've been down this
> > road before back when perl was in the base system, for similar reasons.
>
> The complication and mess stems from the fact that you'll need to
> compile components using an absolute prefix to the compiler or have a
> script which manages gcc and the binutils as a series of symlinks
> (Gentoo Linux does that).
>
> Not all projects unfortunately have wizened up to the fact that
> keeping something cross-compile safe is the best way to go so things
> may fail unless you have robust compile tools scripts to help manage
> everything.
>
> Cheers,
> -Garrett

Thanks guys this has been very interesting discussion. I have learnt quite a 
bit.

David
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-22 Thread Garrett Cooper
On Tue, Jul 22, 2008 at 1:16 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 22, 2008 at 01:07:53AM -0700, David Southwell wrote:
>
> The "base system" does not add anything to the ports/pkg database.  The
> reason you have gcc 4.1.3 and gcc 4.2.5 on your machine is because some
> other port/package depended/depends on them.  pkg_info -R will solve
> that mystery.
>
> As I said before: some ports/packages may require a newer (or older)
> version of GCC, in which case, you'll end up with two (or more) versions
> of gcc on your system -- one in the base and one (or more) managed via
> ports.
>
> Regardless of what Garrett and others say about how multiple compilers
> on a system "works great", I do not advocate it.  There are many catches
> which can/will surprise you down the road, especially with regards to
> library linking order, symbol versioning, and a couple other things.
> I'm sorry, but in my eyes it's risky behaviour.  We've been down this
> road before back when perl was in the base system, for similar reasons.

The complication and mess stems from the fact that you'll need to
compile components using an absolute prefix to the compiler or have a
script which manages gcc and the binutils as a series of symlinks
(Gentoo Linux does that).

Not all projects unfortunately have wizened up to the fact that
keeping something cross-compile safe is the best way to go so things
may fail unless you have robust compile tools scripts to help manage
everything.

Cheers,
-Garrett
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-22 Thread David Southwell
On Tuesday 22 July 2008 01:16:30 Jeremy Chadwick wrote:
> On Tue, Jul 22, 2008 at 01:07:53AM -0700, David Southwell wrote:
> > On Monday 21 July 2008 23:27:49 Garrett Cooper wrote:
> > > On Mon, Jul 21, 2008 at 4:09 AM, Jeremy Chadwick <[EMAIL PROTECTED]> 
wrote:
> > > > On Mon, Jul 21, 2008 at 03:11:25AM -0700, [EMAIL PROTECTED] wrote:
> > > >> FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul
> > > >> 16 09:27:38 PDT 2008
> > > >> @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC amd64 # pkg_info
> > > >> |grep gcc
> > > >> gcc-4.1.3_20080630  GNU Compiler Collection 4.1
> > > >> gcc-4.2.5_20080702  GNU Compiler Collection 4.2
> > > >> gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'
> > > >>
> > > >> Should both versions be installed?
> > > >
> > > > That depends.  Are you using any ports which depend on specific
> > > > versions of GCC?  The base system version comes with gcc 4.2.1. 
> > > > There may be ports which require older or newer GCC, however.
> > > >
> > > > "pkg_info -R" should help you determine what ports are dependant upon
> > > > those two GCC ports.
> > >
> > > There isn't anything wrong with having multiple compilers installed on
> > > a given system, insomuch as they install within separate directories
> > > or are prefixed differently. The sym-/hard-links for the compiler last
> > > installed may be the one that gets used though (not sure because I
> > > don't have any experience installing gcc from ports on FreeBSD)...
> > >
> > > >> Do they not place files in same place?
> > > >
> > > > No.
> > >
> > > This ties into the reply above, but if you have a compiler provided by
> > > the base system and a compiler provided by ports, they won't install
> > > in the same location, as ${PREFIX} dictates in ports.
> > >
> > > -Garrett
> >
> > What happens, as in this instance, the system was originally on 6.1 then
> > 6.3 & subsequently upgraded to 7.0?
> >
> > How can I tell whether the versions were installed by the base system or
> > via ports?
>
> The "base system" does not add anything to the ports/pkg database.  The
> reason you have gcc 4.1.3 and gcc 4.2.5 on your machine is because some
> other port/package depended/depends on them.  pkg_info -R will solve
> that mystery.
>
> As I said before: some ports/packages may require a newer (or older)
> version of GCC, in which case, you'll end up with two (or more) versions
> of gcc on your system -- one in the base and one (or more) managed via
> ports.
>
> Regardless of what Garrett and others say about how multiple compilers
> on a system "works great", I do not advocate it.  There are many catches
> which can/will surprise you down the road, especially with regards to
> library linking order, symbol versioning, and a couple other things.
> I'm sorry, but in my eyes it's risky behaviour.  We've been down this
> road before back when perl was in the base system, for similar reasons.
>
> This spawns the whole base vs. ports discussion.  For the record, I am
> one of the minority who wants to do away with the entire "base system"
> concept.  I do not want this thread to start discussing that, though;
> let's stay on topic.  I just wanted to point it out so that you have
> some idea of *why* I say what I do.
>
> > I am not clear about how the system distinguishes between gcc installed
> > via ports and via base system. Indcidentally when did gcc become part of
> > the base system?
>
> It always has been part of the base system, since at least FreeBSD 2.x
> days.  I can't speak for 1.x because I wasn't using FreeBSD then.
>
> Use "pkg_info -R gcc-4.1.3_20080630" to see what ports are reliant upon
> gcc 4.1.3, and rebuild those ports now that you've upgraded to FreeBSD 7
> (which includes gcc 4.2.1 in the base system).  FreeBSD 6 had gcc 3.4.6,
> which is why some ports might have wanted something newr.
>
> Does all of this now make sense?

Makes a very great deal of sense. During a portupgrade -frR ruby* 
(necessitated following a power out during a portupgrade!!!) I had a consol 
message about the two versions of gcc causing a conflict. The conflict was 
resolved by the upgrades. It was that message that started my enquiry. The 
dependencies in 4.1_3 have now been removed from pkgdb following the 
portupgrade and that version deinstalled.

Thank you, and everyone else, for taking the time to answer my question.

David
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-22 Thread Erik Trulsson
On Tue, Jul 22, 2008 at 01:07:53AM -0700, David Southwell wrote:
> On Monday 21 July 2008 23:27:49 Garrett Cooper wrote:
> > On Mon, Jul 21, 2008 at 4:09 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > > On Mon, Jul 21, 2008 at 03:11:25AM -0700, [EMAIL PROTECTED] wrote:
> > >> FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 16
> > >> 09:27:38 PDT 2008 @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC 
> > >> amd64 # pkg_info |grep gcc
> > >> gcc-4.1.3_20080630  GNU Compiler Collection 4.1
> > >> gcc-4.2.5_20080702  GNU Compiler Collection 4.2
> > >> gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'
> > >>
> > >> Should both versions be installed?
> > >
> > > That depends.  Are you using any ports which depend on specific versions
> > > of GCC?  The base system version comes with gcc 4.2.1.  There may be
> > > ports which require older or newer GCC, however.
> > >
> > > "pkg_info -R" should help you determine what ports are dependant upon
> > > those two GCC ports.
> >
> > There isn't anything wrong with having multiple compilers installed on
> > a given system, insomuch as they install within separate directories
> > or are prefixed differently. The sym-/hard-links for the compiler last
> > installed may be the one that gets used though (not sure because I
> > don't have any experience installing gcc from ports on FreeBSD)...
> >
> > >> Do they not place files in same place?
> > >
> > > No.
> >
> > This ties into the reply above, but if you have a compiler provided by
> > the base system and a compiler provided by ports, they won't install
> > in the same location, as ${PREFIX} dictates in ports.
> >
> > -Garrett
> What happens, as in this instance, the system was originally on 6.1 then 6.3 
> & 
> subsequently upgraded to 7.0?

The version of gcc shipped with 6.3 is 3.4.6.
What probably happened was that you installed some port that required
gcc 4.1 or newer to build, and thus gcc-4.1 was installed automatically as
part of the dependencies for that port.
Later you installed some port that needed gcc 4.2 or later, at which point
gcc-4.2 was installed for you.

If you had been running 7.0 from start, then the gcc ports would not have
been needed, since (as has been noted) FreeBSD 7.0 includes gcc 4.2.

> 
> How can I tell whether the versions were installed by the base system or via 
> ports?

If they show up with pkg_info, then they were installed via the ports
system.


> 
> I am not clear about how the system distinguishes between gcc installed via 
> ports and via base system.

Installed in different places:  Just about everything installed from ports
(or packages) will end up under /usr/local/ (or on older systems under
/usr/X11R6/)  Files that are part of the base system will not be installed
there.

> Indcidentally when did gcc become part of the base 
> system?

gcc has always been part of the base system. (Otherwise it would have been
difficult to recompile the base system, or to compile any ports.)


-- 

Erik Trulsson
[EMAIL PROTECTED]
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-22 Thread Jeremy Chadwick
On Tue, Jul 22, 2008 at 01:07:53AM -0700, David Southwell wrote:
> On Monday 21 July 2008 23:27:49 Garrett Cooper wrote:
> > On Mon, Jul 21, 2008 at 4:09 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > > On Mon, Jul 21, 2008 at 03:11:25AM -0700, [EMAIL PROTECTED] wrote:
> > >> FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 16
> > >> 09:27:38 PDT 2008 @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC 
> > >> amd64 # pkg_info |grep gcc
> > >> gcc-4.1.3_20080630  GNU Compiler Collection 4.1
> > >> gcc-4.2.5_20080702  GNU Compiler Collection 4.2
> > >> gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'
> > >>
> > >> Should both versions be installed?
> > >
> > > That depends.  Are you using any ports which depend on specific versions
> > > of GCC?  The base system version comes with gcc 4.2.1.  There may be
> > > ports which require older or newer GCC, however.
> > >
> > > "pkg_info -R" should help you determine what ports are dependant upon
> > > those two GCC ports.
> >
> > There isn't anything wrong with having multiple compilers installed on
> > a given system, insomuch as they install within separate directories
> > or are prefixed differently. The sym-/hard-links for the compiler last
> > installed may be the one that gets used though (not sure because I
> > don't have any experience installing gcc from ports on FreeBSD)...
> >
> > >> Do they not place files in same place?
> > >
> > > No.
> >
> > This ties into the reply above, but if you have a compiler provided by
> > the base system and a compiler provided by ports, they won't install
> > in the same location, as ${PREFIX} dictates in ports.
> >
> > -Garrett
> What happens, as in this instance, the system was originally on 6.1 then 6.3 
> & 
> subsequently upgraded to 7.0?
> 
> How can I tell whether the versions were installed by the base system or via 
> ports?

The "base system" does not add anything to the ports/pkg database.  The
reason you have gcc 4.1.3 and gcc 4.2.5 on your machine is because some
other port/package depended/depends on them.  pkg_info -R will solve
that mystery.

As I said before: some ports/packages may require a newer (or older)
version of GCC, in which case, you'll end up with two (or more) versions
of gcc on your system -- one in the base and one (or more) managed via
ports.

Regardless of what Garrett and others say about how multiple compilers
on a system "works great", I do not advocate it.  There are many catches
which can/will surprise you down the road, especially with regards to
library linking order, symbol versioning, and a couple other things.
I'm sorry, but in my eyes it's risky behaviour.  We've been down this
road before back when perl was in the base system, for similar reasons.

This spawns the whole base vs. ports discussion.  For the record, I am
one of the minority who wants to do away with the entire "base system"
concept.  I do not want this thread to start discussing that, though;
let's stay on topic.  I just wanted to point it out so that you have
some idea of *why* I say what I do.

> I am not clear about how the system distinguishes between gcc installed via 
> ports and via base system. Indcidentally when did gcc become part of the base 
> system?

It always has been part of the base system, since at least FreeBSD 2.x
days.  I can't speak for 1.x because I wasn't using FreeBSD then.

Use "pkg_info -R gcc-4.1.3_20080630" to see what ports are reliant upon
gcc 4.1.3, and rebuild those ports now that you've upgraded to FreeBSD 7
(which includes gcc 4.2.1 in the base system).  FreeBSD 6 had gcc 3.4.6,
which is why some ports might have wanted something newr.

Does all of this now make sense?

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-22 Thread David Southwell
On Monday 21 July 2008 23:27:49 Garrett Cooper wrote:
> On Mon, Jul 21, 2008 at 4:09 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> > On Mon, Jul 21, 2008 at 03:11:25AM -0700, [EMAIL PROTECTED] wrote:
> >> FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 16
> >> 09:27:38 PDT 2008 @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC 
> >> amd64 # pkg_info |grep gcc
> >> gcc-4.1.3_20080630  GNU Compiler Collection 4.1
> >> gcc-4.2.5_20080702  GNU Compiler Collection 4.2
> >> gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'
> >>
> >> Should both versions be installed?
> >
> > That depends.  Are you using any ports which depend on specific versions
> > of GCC?  The base system version comes with gcc 4.2.1.  There may be
> > ports which require older or newer GCC, however.
> >
> > "pkg_info -R" should help you determine what ports are dependant upon
> > those two GCC ports.
>
> There isn't anything wrong with having multiple compilers installed on
> a given system, insomuch as they install within separate directories
> or are prefixed differently. The sym-/hard-links for the compiler last
> installed may be the one that gets used though (not sure because I
> don't have any experience installing gcc from ports on FreeBSD)...
>
> >> Do they not place files in same place?
> >
> > No.
>
> This ties into the reply above, but if you have a compiler provided by
> the base system and a compiler provided by ports, they won't install
> in the same location, as ${PREFIX} dictates in ports.
>
> -Garrett
What happens, as in this instance, the system was originally on 6.1 then 6.3 & 
subsequently upgraded to 7.0?

How can I tell whether the versions were installed by the base system or via 
ports?

I am not clear about how the system distinguishes between gcc installed via 
ports and via base system. Indcidentally when did gcc become part of the base 
system?

david
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-21 Thread Garrett Cooper
On Mon, Jul 21, 2008 at 4:09 AM, Jeremy Chadwick <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 21, 2008 at 03:11:25AM -0700, [EMAIL PROTECTED] wrote:
>> FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 16
>> 09:27:38 PDT 2008 @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC  amd64
>> # pkg_info |grep gcc
>> gcc-4.1.3_20080630  GNU Compiler Collection 4.1
>> gcc-4.2.5_20080702  GNU Compiler Collection 4.2
>> gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'
>>
>> Should both versions be installed?
>
> That depends.  Are you using any ports which depend on specific versions
> of GCC?  The base system version comes with gcc 4.2.1.  There may be
> ports which require older or newer GCC, however.
>
> "pkg_info -R" should help you determine what ports are dependant upon
> those two GCC ports.

There isn't anything wrong with having multiple compilers installed on
a given system, insomuch as they install within separate directories
or are prefixed differently. The sym-/hard-links for the compiler last
installed may be the one that gets used though (not sure because I
don't have any experience installing gcc from ports on FreeBSD)...

>> Do they not place files in same place?
>
> No.

This ties into the reply above, but if you have a compiler provided by
the base system and a compiler provided by ports, they won't install
in the same location, as ${PREFIX} dictates in ports.

-Garrett
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: gcc versions following upgrade 6.3 >7.0

2008-07-21 Thread Jeremy Chadwick
On Mon, Jul 21, 2008 at 03:11:25AM -0700, [EMAIL PROTECTED] wrote:
> FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 16
> 09:27:38 PDT 2008 @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC  amd64
> # pkg_info |grep gcc
> gcc-4.1.3_20080630  GNU Compiler Collection 4.1
> gcc-4.2.5_20080702  GNU Compiler Collection 4.2
> gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'
> 
> Should both versions be installed?

That depends.  Are you using any ports which depend on specific versions
of GCC?  The base system version comes with gcc 4.2.1.  There may be
ports which require older or newer GCC, however.

"pkg_info -R" should help you determine what ports are dependant upon
those two GCC ports.

> Do they not place files in same place?

No.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


gcc versions following upgrade 6.3 >7.0

2008-07-21 Thread david
FreeBSD **.vizion2000.net 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 16
09:27:38 PDT 2008 @**.vizion2000.net:/usr/obj/usr/src/sys/GENERIC  amd64
# pkg_info |grep gcc
gcc-4.1.3_20080630  GNU Compiler Collection 4.1
gcc-4.2.5_20080702  GNU Compiler Collection 4.2
gccmakedep-1.0.2Create dependencies in makefiles using 'gcc -M'

Should both versions be installed?
Do they not place files in same place?

System has just been upgraded from 6.3 to 7.0-Stable.


David

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[EMAIL PROTECTED]"