New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20598 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

gnat-gcc +gnuada

Reported by: ryandesign@… Owned by: krischik@…
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: snc@…
Port: gnat-gcc

Description

Installing gnat-gcc +gnuada ends with

configure: error: C compiler cannot create executables

I believe it was your intention that I should download "the GnuAda compiler" from  http://gnuada.sourceforge.net and install it prior to attempting to install the port with this variant. But I'm unclear specifically what file to download.

The port should detect if the required compiler is not installed, and exit with a more helpful error message telling the user what to do to fix it.

In addition, I assume the bootprefix change from r55182 needs to be reverted. If that's right, then it may be of benefit to add a comment to the portfile explaining why hardcoding /opt/local is necessary here (since it's usually undesirable, and someone might not realize it was intentional and replace it with ${prefix} again).

Change History

follow-up: ↓ 2   Changed 3 years ago by krischik@…

  • status changed from new to assigned

Ok, no problem - I do that - any tcl master who can tell what is the best way to detect if "${bootprefix}/bin/gnat" exists and (optionally) is user executable?

Of course there are quite a few messages allready like:

pre-configure {
    if {![variant_isset macada] &&  ![variant_isset gnatgpl] &&  ![variant_isset gnuada]  &&  ![variant_isset ada]} {
	ui_msg "######################################################"
	ui_msg "#  You need to install an Ada compiler and then	     #"
	ui_msg "#  choose an appropiate variant. For more info use:  #"
	ui_msg "#                                                    #"
	ui_msg "#  port variants gnat-gcc			     #"
	ui_msg "######################################################"
    }
}

And port variants gnat-gcc will get them:

gnat-gcc has the variants:
	powerpc: Platform variant, do not select manually
	odcctools: Use the odcctools instead of the system provided ones - does not work for x64 currently!
	macada: Uses MacAda compiler (http://www.macada.org) to bootstrap!
	gnatgpl: Uses GNAT/GPL compiler (http://libre.adacore.com) to bootstrap!
	gnuada: Uses the GnuAda (http://gnuada.sourceforge.net/) compiler to bootstrap!
	ada: Uses the MacPorts Ada (http://www.macports.org/) compiler to bootstrap!

Which reminds me: When Dr. Kanonenko was asked "Who do you write your books for" and his answer was "For people who can read".

in reply to: ↑ 1   Changed 3 years ago by ryandesign@…

Replying to krischik@…:

Ok, no problem - I do that - any tcl master who can tell what is the best way to detect if "${bootprefix}/bin/gnat" exists and (optionally) is user executable?

You could use  file executable:

if {[file executable ${bootprefix}/bin/gnat]} {
    ...
}

  Changed 3 years ago by krischik@…

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

Done.

Note: See TracTickets for help on using tickets.