# p5-ports get "Error: no compiler detected to compile ..."



## tbyte (Dec 29, 2010)

Some ports like "p5-DateTime" and "p5-Params-Validate" get error like this:


```
Warning: ExtUtils::CBuilder not installed or no compiler detected
Proceeding with configuration, but compilation may fail during Build

Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'Params-Validate' version '0.95'
===>  Building for p5-Params-Validate-0.95_3
Building Params-Validate
Error: no compiler detected to compile 'lib/Params/Validate.c'.  Aborting
*** Error code 2

Stop in /usr/ports/devel/p5-Params-Validate.
```

And


```
Warning: ExtUtils::CBuilder not installed or no compiler detected
Proceeding with configuration, but compilation may fail during Build

Checking prerequisites...
  build_requires:
    !  Test::Exception is not installed
    !  Test::More (0.80) is installed, but we need version >= 0.88

ERRORS/WARNINGS FOUND IN PREREQUISITES.  You may wish to install the versions
of the modules indicated above before proceeding with this installation

Run 'Build installdeps' to install missing prerequisites.

Creating new 'MYMETA.yml' with configuration results
Creating new 'Build' script for 'DateTime' version '0.66'
===>  Building for p5-DateTime-0.66
Building DateTime
Error: no compiler detected to compile 'lib/DateTime.c'.  Aborting
*** Error code 2

Stop in /usr/ports/devel/p5-DateTime.
```

First is on FreeBSD 6.3 but with gcc 4.6 (I set USE_GCC var to 4.6). Second is 7.2 with gcc 4.2. Searching around google I found that the problem could be the gcc 3.x (that was in the 6.3 FreeBSD) but using gcc 4.6 didn't solved the problem 

Could it be the version of the perl used as it is 5.8.9 ?

Regards.


----------



## tbyte (Dec 29, 2010)

Yup the problem was perl's version. And it's not mentioned in the UPDATING as far as I saw nor the port itself requires a newer perl version


----------



## joc (Jan 2, 2011)

I've got 

```
Warning: ExtUtils::CBuilder not installed or no compiler detected
```
on upgrading with
`portmaster p5-DateTime-0.65`
and
`portmaster /usr/ports/devel/p5-ExtUtils-CBuilder`
having been run. 

I don't understand what was the AH HA moment concerning perl above.
Perl is v5.8.9 for me. What action will likely help me?

Thanks.


----------



## alh (Jan 4, 2011)

*Possible solution for p5-Params-Validate*

I ran into this issue as well:

```
Building Params-Validate
Error: no compiler detected to compile 'lib/Params/Validate.c'.  Aborting
```

It turned out to be some dependency of ExtUtils::CBuilder (version 0.2802) that was for some reason not installed when ExtUtils::CBuilder was installed. Version 0.2703 on another box does not seem to share this dependency.

I tracked it down to devel/p5-IPC-Cmd by doing:
[cmd=]perl -e 'use ExtUtils::CBuilder'[/cmd]

which complained about missing IPC::Cmd.

After installing devel/p5-IPC-Cmd, devel/p5-Params-Validate installed fine.

devel/p5-ExtUtils-CBuilder should probably be updated to include this dependency...

Hope that helps

~ alh


----------

