# graphics/gimp-app dependency



## nixlike (Jan 4, 2014)

I was recently attempting to install via ports graphics/gimp and one of the dependencies was graphics/gimp-app.  The compile of gimp-app seemed to go ok, but the installation seemed to fail with this.

```
===>  Installing for gimp-app-2.8.10_1,1
===>  Checking if graphics/gimp-app already installed
pkg_add: could not find package perl-5.14.4 !
```

I have *P*erl installed and the package registered, but it's perl-5.16*.*

```
[root@byte /usr/ports/graphics/gimp]# pkg_info|grep perl
p5-Filter-1.49      Number of source filters for perl5 programs
perl5-5.16.3_6      Practical Extraction and Report Language
```

How can I find out what is looking for 5.14.4 to correct the behavior?  I didn't see any references to perl-5.14.4 in any files under /usr/ports/graphics/gimp-app or in /usr/ports/Mk.  I am not sure what and how the older version of *P*erl is being referenced.


----------



## trh411 (Jan 4, 2014)

If you run `pkg info -rx perl5` does it list any installed packages dependent on perl5-5-14.x.x? If it does, you can rebuild those ports and then retry your graphics/gimp-app build.


----------



## chrbr (Jan 5, 2014)

Dear @trh411,

I have had a similar issue and finally I have found that the version is extracted in /usr/ports/Mk/Users/perl5.mk. The relevant lines seem to me at the top of the file.

```
34 .if !defined(_INCLUDE_USES_PERL5_MK)
     35 _INCLUDE_USES_PERL5_MK= yes
     36 
     37 .if defined(perl5_ARGS)
     38 IGNORE= Incorrect 'USES+=perl5:${perl5_ARGS}' perl5 takes no arguments
     39 .endif
     40 
     41 USE_PERL5?=     run build
     42 
     43 .if exists(${LOCALBASE}/bin/perl5)
     44 .sinclude "${LOCALBASE}/etc/perl5_version"
     45 .if !defined(PERL_VERSION)
     46 PERL_VERSION!=  perl -e 'printf "%vd\n", $$^V;'
     47 .endif
     48 .else
     49 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
     50 .if ${PERL5_DEFAULT} == 5.12
     51 PERL_VERSION=   5.12.5
     52 .elif ${PERL5_DEFAULT} == 5.14
     53 PERL_VERSION=   5.14.4
     54 .elif ${PERL5_DEFAULT} == 5.16
     55 PERL_VERSION=   5.16.3
     56 .elif ${PERL5_DEFAULT} == 5.18
     57 PERL_VERSION=   5.18.1
     58 .else
     59 IGNORE= Invalid perl5 version ${PERL5_DEFAULT}
     60 .endif
     61 .endif
     62 
     63 PERL_VER?=      ${PERL_VERSION:C/\.[0-9]+$//}
```
I think that the code above might have problems to find out that perl5-5.16.3_6 is newer than perl5.14-5.14.4_4. As a workaround I have inserted in line 62

```
PERL_VERSION=   5.16.3
```
I know that this is a dirty hack but it fixed the problem for me. After a few updates of the port my fix has been replaced automatically by the original code. If anybody requests I will try to install a port which needs an early *P*erl version to find out if the issue will pop up again. Does anybody knows which part of the name specifies the *P*erl version? The question is if either perl5-5.16.3_6 should be perl5.16-5.16.3_6 or if the line 46 in the code above should be improved. A different hook to apply a work around might be in using /usr/ports/Mk/bsd.default-versions.mk. The how to do is explained in the file. I am not sure about the best practice to cover the situation.


----------



## nixlike (Jan 8, 2014)

```
[root@byte /usr/ports/graphics/gimp]# pkg info -rx perl5
perl5-5.16.3_6:
```


----------



## nixlike (Jan 8, 2014)

This is my bsd.default-versions.mk file.


```
.if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK)
_INCLUDE_BSD_DEFAULT_VERSIONS_MK=       yes

.for lang in ${DEFAULT_VERSIONS}
_l=             ${lang:C/=.*//g}
${_l:U}_DEFAULT=        ${lang:C/.*=//g}
.endfor

PERL5_DEFAULT?=         5.16
RUBY_DEFAULT?=          1.9
TCLTK_DEFAULT?=         8.6
PYTHON_DEFAULT?=        2.7
PYTHON2_DEFAULT?=       2.7
PYTHON3_DEFAULT?=       3.3

.endif
```


----------



## pkubaj (Jan 8, 2014)

You shouldn't do it that way. Read entries 20130920 and 20131003 in /usr/ports/UPDATING.


----------



## nixlike (Jan 8, 2014)

I didn't manipulate anything, but simply showed what mine reflected.  I am still trying understand how I can track down what is referencing that old version of Perl.  Any insight is welcome for sure.


----------



## chrbr (Jan 8, 2014)

Dear  @pkubaj,

Thank you very much for the information. I have faced a similar problem and proposed a workaround as above. I have read 20131023 in /usr/ports/UPDATING. I am not sure if this change is effective during a first install of the system from the ports. I have done the install just a couple of days ago. If I will have a similar problem in the future I will first check not just the latest entries since installation of /usr/ports/UPDATING for relevant information and update of the port database. Thank you!

Dear  @nixlike,

From my understanding the content of /usr/ports/INDEX* reflects the dependencies. Seeking with `grep` the different versions of *P*erl in the files should give some insight where the dependencies are. In my case one of the latest sequences of `portsnap fetch portsnap update` has fixed the dependency issue. Now everything related to *P*erl depends on version 5.16 only.


----------



## nixlike (Jan 8, 2014)

I ran a `portsnap fetch` and a `portsnap update` to see if that might help, but I got the same error.


```
===>  Checking if graphics/gimp-app already installed
pkg_add: could not find package perl-5.14.4 !
*** [install-package] Error code 1

Stop in /usr/ports/graphics/gimp-app.
*** [install] Error code 1

Stop in /usr/ports/graphics/gimp-app.
*** [run-depends] Error code 1

Stop in /usr/ports/graphics/gimp.
*** [install] Error code 1

Stop in /usr/ports/graphics/gimp.
```


----------



## chrbr (Jan 8, 2014)

Dear @nixlike, I am not sure if you are mixing packages and ports. As far as I have learned this is not a good idea. Especially if something like _GIMP_ is involved which has a huge amount of dependencies. If I have a look at http://www.freebsd.org/ports/graphics.htm there is a dependency to perl-5.14.2_3. May be this is the issue about the `pkg_add` response of your post above.  Have you tried to install _GIMP_ by `pkg_add gimp` or by `make install` in /usr/ports/graphics/gimp? The hint in the previous post should be helpful in case the installation is done from the ports. Unfortunately I am not sure how to handle the situation in case of installation via packages.


----------



## nixlike (Jan 8, 2014)

I am using the ports tree to compile gimp-app from source.  I untarred the tbz that gimp-app created and peered into the +CONTENTS file and found the below.


```
@comment DEPORIGIN:security/nettle
@pkgdep perl5-5.16.3_6
@comment DEPORIGIN:lang/perl5.16
@pkgdep perl-5.14.4
@comment DEPORIGIN:lang/perl5.14
```


----------



## nixlike (Jan 8, 2014)

I converted to pkgng and reran the make install command for gimp-app and it successfully installed.  I am moving on.  Thanks for everyone's comments.


----------

