Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] Hints must come early in Configure.pl

6 views
Skip to first unread message

Andy Dougherty

unread,
Mar 22, 2007, 9:01:41 AM3/22/07
to Perl6 Internals
Hints need to come *before* inter/progs. The hints set up various
platform-specific callbacks to be performed after the different programs
are selected. Actually, I suspect they should even come before the
init::install unit. Certainly in perl5's hints, there are a number that
modify the default installation directories. However, I don't understand
parrot's installation plan, so I have left this alone.

--- parrot-current/Configure.pl Sat Mar 17 18:15:17 2007
+++ parrot-andy/Configure.pl Wed Mar 21 11:05:41 2007
@@ -463,9 +463,9 @@
init::defaults
init::install
init::miniparrot
- inter::progs
init::hints
init::headers
+ inter::progs
inter::make
inter::lex
inter::yacc

--
Andy Dougherty doug...@lafayette.edu

James E Keenan

unread,
Mar 24, 2007, 8:26:33 AM3/24/07
to Andy Dougherty, Perl6 Internals

Coke moved inter::progs to the position you recommended ($steps[6]) in
r17671 on 2007-03-20. This essentially reverted to r16268 from a change
made in 16416.

For further reading ...

http://rt.perl.org/rt3//Public/Bug/Display.html?id=41180
http://rt.perl.org/rt3//Public/Bug/Display.html?id=41195

kid51

Chromatic

unread,
Mar 24, 2007, 11:38:26 AM3/24/07
to perl6-i...@perl.org, James E Keenan, Andy Dougherty
On Saturday 24 March 2007 05:26, James E Keenan wrote:

> Andy Dougherty wrote:

> > Hints need to come *before* inter/progs. The hints set up various
> > platform-specific callbacks to be performed after the different programs
> > are selected. Actually, I suspect they should even come before the
> > init::install unit. Certainly in perl5's hints, there are a number that
> > modify the default installation directories. However, I don't understand
> > parrot's installation plan, so I have left this alone.

> Coke moved inter::progs to the position you recommended ($steps[6]) in


> r17671 on 2007-03-20. This essentially reverted to r16268 from a change
> made in 16416.

We're probably just working around something weird on your system; it would be
nice if we could figure out what it is and fix it for you.

Is it possible to get a diff between the two configurations generated with and
without this patch?

-- c

James Keenan

unread,
Mar 24, 2007, 12:06:43 PM3/24/07
to chromatic, perl6-i...@perl.org, Andy Dougherty

On Mar 24, 2007, at 11:38 AM, chromatic wrote:

>
>
> We're probably just working around something weird on your system;
> it would be
> nice if we could figure out what it is and fix it for you.
>
> Is it possible to get a diff between the two configurations
> generated with and
> without this patch?
>

myconfig.first is the result of applying Configure.pl as it was in
trunk from Jan to Mar. myconfig.second is what I was using after
reverting to the earlier version of @steps -- and is now what is once
again in trunk.


diff.myconfig.txt

Chromatic

unread,
Mar 24, 2007, 11:53:33 PM3/24/07
to James Keenan, perl6-i...@perl.org, Andy Dougherty
On Saturday 24 March 2007 09:06, James Keenan wrote:

> <     ld='c++', ldflags=' -L/usr/local/lib
> -L/Users/jimk/work/fresh/blib/lib -flat_namespace ', ---

> >     ld='/usr/bin/g++-3.3', ldflags=' -L/usr/local/lib
> > -L/Users/jimk/work/fresh/blib/lib -flat_namespace ',

What's the output of:

$ c++ --version
$ which c++
$ cc --version
$ which cc

-- c

James Keenan

unread,
Mar 25, 2007, 8:22:39 AM3/25/07
to chromatic, perl6-i...@perl.org, Andy Dougherty

[parrot] 502 $ c++ --version
c++ (GCC) 4.0.3
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

[parrot] 503 $ which c++
/usr/local/bin/c++
[parrot] 504 $ cc --version
cc (GCC) 3.3 20030304 (Apple Computer, Inc. build 1495)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

[parrot] 505 $ which cc
/usr/bin/cc
[parrot] 506 $

Andy Dougherty

unread,
Mar 26, 2007, 10:00:52 AM3/26/07
to chromatic, Perl6 Internals, James E Keenan
On Sat, 24 Mar 2007, chromatic wrote:

> On Saturday 24 March 2007 05:26, James E Keenan wrote:
>
> > Andy Dougherty wrote:
>
> > > Hints need to come *before* inter/progs. The hints set up various
> > > platform-specific callbacks to be performed after the different programs
> > > are selected. Actually, I suspect they should even come before the
> > > init::install unit. Certainly in perl5's hints, there are a number that
> > > modify the default installation directories. However, I don't understand
> > > parrot's installation plan, so I have left this alone.
>
> > Coke moved inter::progs to the position you recommended ($steps[6]) in
> > r17671 on 2007-03-20. This essentially reverted to r16268 from a change
> > made in 16416.
>
> We're probably just working around something weird on your system; it would be
> nice if we could figure out what it is and fix it for you.

There is something weird in his system -- a broken c++ -- but the problem
is that Parrot's Configure wasn't letting him override the broken c++ link
with one that works.

I don't know what specific issue 41180 (which introduced this problem) was
trying to solve, but the proposed fix wasn't the right one.

Here's why:

Suppose you want to build parrot with a compiler other than the one used
to build the perl that is currently running Configure.pl. For example,
suppose your perl were built with gcc, but you wanted to build parrot with
the vendor's cc. If inter/progs.pm runs before the platform-specific
hints, how is it to know which flags to suggest? It can't. That
information is in the hints file, which hasn't run yet.

A reasonable question to ask then is "How can the hints file know which
flags to suggest if the user hasn't even picked a compiler yet?" The
answer is that it can't -- but it *can* set up a call-back or "trigger".
See config/hints/solaris.pm for examples.

I think what was happening in James's case is that when inter/progs.pm ran
first, the subsequent run of hints/darwin.pm was *unconditionally* setting
ld=c++, overriding his previous setting.

A summary: The current state is correct. init::hints comes before
inter::progs.

--
Andy Dougherty doug...@lafayette.edu

Chromatic

unread,
Mar 27, 2007, 2:52:43 PM3/27/07
to James Keenan, perl6-i...@perl.org, Andy Dougherty
On Sunday 25 March 2007 05:22, James Keenan wrote:

> On Mar 24, 2007, at 11:53 PM, chromatic wrote:
> > On Saturday 24 March 2007 09:06, James Keenan wrote:
> >> < ld='c++', ldflags=' -L/usr/local/lib
> >> -L/Users/jimk/work/fresh/blib/lib -flat_namespace ', ---

> >>> ld='/usr/bin/g++-3.3', ldflags=' -L/usr/local/lib
> >>> -L/Users/jimk/work/fresh/blib/lib -flat_namespace ',

Here's a quick guess; move away or rename /usr/bin/g++-3.3 temporarily, then
try Configure.pl again. Do you remember the versions of the compiler you
installed?

-- c

Andy Dougherty

unread,
Mar 27, 2007, 3:09:05 PM3/27/07
to chromatic, James Keenan, Perl6 Internals

Huh? He shouldn't have to do anything. It should all be working now.

--
Andy Dougherty doug...@lafayette.edu

0 new messages