develooper Front page | perl.perl5.porters | Postings from June 2019

Re: [perl #134189] configure: ubuntu without gcc

Thread Previous | Thread Next
June 10, 2019 21:06
Re: [perl #134189] configure: ubuntu without gcc
Message ID:
"Hugo van der Sanden via RT" <> writes:

> On Mon, 10 Jun 2019 08:52:48 -0700, jkeenan wrote:
>> This is puzzling.  I've been running Ubuntu 18.04.02 LTS for most of a
>> year now.  I don't recall having to specifically install gcc.
>> However, I was upgrading the OS on a machine from 16.04.  Still, if
>> anything I would suspect you'd have to manually install clang rather
>> than gcc.
> I _did_ manually (apt-)install clang; I had also assumed I'd get gcc for free.

Development tools are not installed by default, but the
'build-essential' package, which is an implicit build-dependency of
every source package, does depend on gcc.

I've installed a fresh bionic VM and installed just git, clang, and
make, and I can reproduce the problem.  It boils down to hints/
hard-coding gcc to get the multi-arch library paths for the 'plibpth'
variable.  Clang does support the -print-search-dirs option, and
changing the hints file to use cc instead of gcc does work, but we'd
have to only do that if cc is clang.  As far as I can tell there's no
Configure variable for this, but Configure has a comment that ccname=gcc
for clang, so something like this might be okay, or explicitly checking
for /usr/bin/clang before falling back to $cc.

diff --git a/hints/ b/hints/
index a985a8ee1b..059e929997 100644
--- a/hints/
+++ b/hints/
@@ -165,6 +165,8 @@ esac
 # plibpth to bypass this check.
 if [ -x /usr/bin/gcc ] ; then
+elif [ "$ccname" = "gcc" ]; then
+    gcc="$cc"

- ilmari
- Twitter seems more influential [than blogs] in the 'gets reported in
  the mainstream press' sense at least.               - Matt McLeod
- That'd be because the content of a tweet is easier to condense down
  to a mainstream media article.                      - Calle Dybedahl

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About