Ticket #2004 (closed bug: fixed)

Opened 11 years ago

Last modified 11 years ago

Where did Configure.pl option '--cxx' go to?

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: configure Version: 3.0.0
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform: all

Description

In Configure.pl, we have command-line option cxx documented as follows:

       "--cxx=(compiler)"
           Specify which C++ compiler to use (for ICU).

In lib/Parrot/Configure/Options/Conf.pm, we have this:

   --cxx=(compiler)     Use the given C++ compiler

And cxx is an element of @Parrot::Configure::Options::Conf::Shared::shared_valid_options.

But I can no longer find any place in the configuration system where the value provided to --cxx gets assigned to anything in the data part of the Parrot::Configure object. Hence, it never appears in lib/Parrot/Config/Generated.pm or config_lib.pir (except in the entries for configure_args).

$> perl  Configure.pl --cxx=abc
$> grep -nE '(abc|cxx)' lib/Parrot/Config/Generated.pm
102:  'configure_args' => '"--cxx=abc"'

Didn't we used to be able to assign our choice of C++ compiler to cxx? If so, does anyone know why we can do so no longer? Or when this option slipped away?

Thank you very much.

kid51

Change History

  Changed 11 years ago by jkeenan

$>  make realclean
$>  perl Configure.pl
$>  mv lib/Parrot/Config/Generated.pm ~/learn/parrot/no.cxx.Generated.pm
$>  make realclean
$>  perl Configure.pl --cxx=foobar
$>  mv lib/Parrot/Config/Generated.pm ~/learn/parrot/foobar.cxx.Generated.pm
$>  cd ~/learn/parrot
$>  diff -w no.cxx.Generated.pm foobar.cxx.Generated.pm
100c100
<   'configdate' => 'Fri Feb 11 02:51:48 2011 GMT',
---
>   'configdate' => 'Fri Feb 11 02:52:49 2011 GMT',
102c102
<   'configure_args' => '',
---
>   'configure_args' => '"--cxx=foobar"',

So you might think you're selecting a C++ compiler to use during make, but you aren't.

  Changed 11 years ago by coke

--cxx was originally used when we had to build ICU because it was
internal to parrot.

I am fairly certain that it serves no purpose these days.

(This is different from passing in a c++ compiler to --cc)

  Changed 11 years ago by doughera

On Fri, 11 Feb 2011, Parrot wrote:

> #2004: Where did Configure.pl option '--cxx' go to?

The option was removed in TT #1457.

The C++ option used to serve at least two main purposes:

1.  Parrot used to bundle ICU, which required a C++ compiler to build.

2.  Extensions or embedded programs that work with C++ code or libraries 
might need a C++ compiler compatible with the compiler used to compile 
parrot.  The -cxx option offered a way to specify the appropriate C++ 
compiler.  Perl 5's Configure does not include such an option, and does 
not select a C++ compiler.  It is left to extensions to guess at an 
appropriate one, which has caused all sorts of difficulties.  Seeking to 
avoid that mistake, Parrot offered the option of specifying a working C++ 
compiler.

-- 
    Andy Dougherty		doughera@lafayette.edu


follow-up: ↓ 5   Changed 11 years ago by jkeenan

  • owner set to jkeenan
  • status changed from new to assigned

Coke, Andy: Thanks. I guess the patch applied in TT #1457 didn't cover all instances of cxx. I'll try to root out the remaining ones.

Thank you very much.

kid51

in reply to: ↑ 4   Changed 11 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed
  • patch set to applied

Replying to jkeenan:

Coke, Andy: Thanks. I guess the patch applied in TT #1457 didn't cover all instances of cxx. I'll try to root out the remaining ones.

commit 9dadd29: Per TT #2004: Remove remaining references to former '--cxx' option to Configure.pl.

I didn't touch references under the ports/ directory, but took care of the others -- including translations of the README!

Closing ticket. Thank you very much.

follow-up: ↓ 7   Changed 11 years ago by doughera

  • status changed from closed to reopened
  • resolution fixed deleted
On Fri, 11 Feb 2011, Parrot wrote:

>  Coke, Andy:  Thanks.  I guess the patch applied in TT #1457 didn't cover
>  all instances of `cxx`.  I'll try to root out the remaining ones.

Well, as I tried to say above, I think the option still served a useful 
purpose, and removing it in TT #1457 was a mistake.  But, I shan't pursue 
it any further.

-- 
    Andy Dougherty		doughera@lafayette.edu


in reply to: ↑ 6 ; follow-up: ↓ 8   Changed 11 years ago by jkeenan

Replying to doughera:

Well, as I tried to say above, I think the option still served a useful purpose, and removing it in TT #1457 was a mistake. But, I shan't pursue it any further.

Umm, Andy, if you reopened the ticket and deleted the 'fixed' resolution, then, by definition, you are pursuing it further. :-)

Re-inserting it as a command-line option, and then making sure it gets into (first) the Parrot::Configure object and (then) the Makefile, %PConfig, etc. would be relatively easy. But where exactly would it be used in the configuration system?

(It was --cxx's non-use in the configuration system that caught my attention in this ticket. I personally don't have a vested interest one way or the other, as long as we're consistent about its inclusion/exclusion.)

As the other Andy would say, "Patches welcome!"

Thank you very much.

kid51

in reply to: ↑ 7   Changed 11 years ago by doughera

  • status changed from reopened to closed
  • resolution set to fixed

Replying to jkeenan:

Umm, Andy, if you reopened the ticket and deleted the 'fixed' resolution, then, by definition, you are pursuing it further. :-)

I didn't, or at least I didn't intend to. Apparently the email-to-ticket system "helpfully" did that without my knowledge or consent. This time, I'm going in directly through Trac, and I'll reclose it.

Re-inserting it as a command-line option, and then making sure it gets into (first) the Parrot::Configure object and (then) the Makefile, %PConfig, etc. would be relatively easy. But where exactly would it be used in the configuration system?

It wouldn't. It would simply be a place to record the C++ compiler that might be used by a hypothetical future someone embedding or extending parrot in a project that involved C++ code.

As the other Andy would say, "Patches welcome!"

(I thought that was my line!) Anyway, I already wrote the patch once -- it was commit c528c234cd400c7fcb7019c8e1270e40913e778b.

Note: See TracTickets for help on using tickets.