# After perl-update Only one of PREFIX or INSTALL_BASE can be given



## demonking (Jun 16, 2013)

Hello community,

*I* have some strange error since *I* have update*d* perl5.16.2 to perl5.16.3. When *I*'m trying to update my whole ports how are all my ports that depend on *P*erl, *I* get this kind of *e*rror:

```
root@notebook:/usr/ports/x11/rxvt-unicode # make install clean

==> You can compile in support for additional codeset groups by setting the WITH_ENCODING variable
==> Options are: "jp"     common japanese encodings;
                 "jp_ext" rarely used but big japanese encodings;
                 "kr"     korean encodings;
                 "zh"     common chinese encodings;
                 "zh_ext" rarely used but very big chinese encodigs;
                 "all"    all of the above;
==> For example, "WITH_ENCODING=kr" for korean encodings.

===>  License GPLv2 accepted by the user
===>  Found saved configuration for rxvt-unicode-9.18
===> Fetching all distfiles required by rxvt-unicode-9.18 for building
===>  Extracting for rxvt-unicode-9.18
=> SHA256 Checksum OK for rxvt-unicode-9.18.tar.bz2.
===>   rxvt-unicode-9.18 depends on file: /usr/local/bin/perl5.16.3 - found
===>  Patching for rxvt-unicode-9.18
===>   rxvt-unicode-9.18 depends on package: p5-Encode-HanExtra>=0 - not found
===>    Verifying install for p5-Encode-HanExtra>=0 in /usr/ports/chinese/p5-Encode-HanExtra
===> Fetching all distfiles required by p5-Encode-HanExtra-0.23 for building
===>  Extracting for p5-Encode-HanExtra-0.23
===> Fetching all distfiles required by p5-Encode-HanExtra-0.23 for building
=> SHA256 Checksum OK for Encode-HanExtra-0.23.tar.gz.
===>   p5-Encode-HanExtra-0.23 depends on file: /usr/local/bin/perl5.16.3 - found
===>  Patching for p5-Encode-HanExtra-0.23
===>   p5-Encode-HanExtra-0.23 depends on file: /usr/local/bin/perl5.16.3 - found
===>   p5-Encode-HanExtra-0.23 depends on file: /usr/local/bin/perl5.16.3 - found
===>  Configuring for p5-Encode-HanExtra-0.23
enc2xs is /usr/local/bin/enc2xs
encode.h is at /home/user/perl5/lib/perl5/amd64-freebsd/Encode
Checking if your kit is complete...
Looks good
Only one of PREFIX or INSTALL_BASE can be given.  Not both.
*** [do-configure] Error code 2

Stop in /usr/ports/chinese/p5-Encode-HanExtra.
*** [/usr/ports/chinese/p5-Encode-HanExtra/work/.configure_done.Encode-HanExtra._usr_local] Error code 1

Stop in /usr/ports/chinese/p5-Encode-HanExtra.
*** [patch-depends] Error code 1

Stop in /usr/ports/x11/rxvt-unicode.
*** [install] Error code 1

Stop in /usr/ports/x11/rxvt-unicode.
root@notebook:/usr/ports/x11/rxvt-unicode # exit
```

Someone how could Can someone help?


----------



## ShelLuser (Jun 16, 2013)

How exactly did you update Perl and your Ports collection?

The problem you're showing us occurs in chinese/p5-Encode-HanExtra but I just confirmed that this port cleanly configures (and compiles) and it has one single dependency: Perl.

So that leads me to suspect that something might have gone wrong with your update process.


----------



## demonking (Jun 16, 2013)

Everyday I update my (ports, presumably -- mod) with `# portmaster -a`. After Perl has updated to 5.16.3 I have followed the instruction in /usr/ports/UPDATING: `# portmaster -r perl`. 

But this time *I* have got this kind of error.


----------



## ShelLuser (Jun 16, 2013)

Odd indeed, but quite intriguing too. Right, try this from within the port directory (/usr/ports/chinese/p5-Encode-HanExtra):

`# make clean`
`# make extract`
`# cd work/Encode-HanExtra-0.23`
`# perl Makefile.PL`

The output shouldn't be too long, paste it here (remember the 
	
	



```
tags, that makes it easier for us to read).

If however everything goes pretty much normal from here, so it ends with output like this:

[code]
encode.h is at /usr/local/lib/perl5/5.14/Encode
Writing Makefile for Encode::HanExtra
Writing MYMETA.yml
```
Then you should go back to the main port directory (see above) and from there try `# make clean build`. Note the changed order: this is not a mistake.

If that works then it might have been a hiccup, but if it doesn't we'll have to keep digging.

Also: what version does `perl -v` give you?


----------



## bkouhi (Jun 16, 2013)

Hello.

Could you please show your /etc/make.conf too?


----------



## demonking (Jun 16, 2013)

ShelLuser said:
			
		

> Odd indeed, but quite intriguing too. Right, try this from within the port directory (/usr/ports/chinese/p5-Encode-HanExtra):
> 
> `# make clean`
> `# make extract`
> ...




The *o*utput was pretty much the same as yours

```
encode.h is at /usr/local/lib/perl5/5.14/Encode
Writing Makefile for Encode::HanExtra
Writing MYMETA.yml
```

And after `make clean` builds the same as in my first post.

Output of `perl -v` :


```
This is perl 5, version 16, subversion 3 (v5.16.3) built for amd64-freebsd

...
```




			
				bkouhi said:
			
		

> Hello.
> 
> Could you please show your /etc/make.conf too?




```
.if !defined(CC) || $(CC) == "cc"
CC= clang
.endif

.if !defined(CPP) || $(CPP) == "cpp"
CPP= clang-cpp
.endif

.if !defined(CXX) || $(CXX) == "c++"
CXX= clang++
.endif

NO_WERROR=
WERROR=


# added by use.perl 2013-06-15 21:54:42
PERL_VERSION=5.16.3
```


----------



## bkouhi (Jun 16, 2013)

I can compile the port successfully. I've not defined INSTALL_BASE variable. What does the following command show?
`make -C /usr/ports/chinese/p5-Encode-HanExtra -V INSTALL_BASE -V PREFIX`

Also, try this:
`# unsetenv INSTALL_BASE`
`# make INSTALL_BASE='' -C /usr/ports/x11/rxvt-unicode install clean`


----------



## demonking (Jun 16, 2013)

bkouhi said:
			
		

> I can compile the port successfully. I've not defined INSTALL_BASE variable. What does the following command show?
> `make -C /usr/ports/chinese/p5-Encode-HanExtra -V INSTALL_BASE -V PREFIX`
> 
> Also, try this:
> ...



*S*till the same error message :/

The result of `perl -V`:


```
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
   
  Platform:
    osname=freebsd, osvers=9.1-release-p3, archname=amd64-freebsd
    uname='freebsd notebook.local.domain 9.1-release-p3 freebsd 9.1-release-p3 #2 r250577: sun may 12 22:48:48 cest 2013 user@notebook.local.domain:usrobjusrsrcsysgeneric amd64 '
    config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.16/mach -Dprivlib=/usr/local/lib/perl5/5.16 -Dman3dir=/usr/local/lib/perl5/5.16/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.16/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.16 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.16/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=clang -Duseshrplib -Dinc_version_list=none -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN" -Doptimize=-O2 -pipe -fno-strict-aliasing -Ui_gdbm -Dusethreads=n -Dusemymalloc=n -Duse64bitint'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='clang', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
    optimize='-O2 -pipe -fno-strict-aliasing',
    cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible FreeBSD Clang 3.1 ((branches/release_31 156863))', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='clang', ldflags ='-pthread -Wl,-E  -fstack-protector -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lgdbm -lm -lcrypt -lutil
    perllibs=-lm -lcrypt -lutil
    libc=, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-R/usr/local/lib/perl5/5.16/mach/CORE'
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_ALL
                        USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE
                        USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  Built under freebsd
  Compiled at Jun 15 2013 21:51:50
  %ENV:
    PERL5LIB="/home/user/perl5/lib/perl5:/home/user/perl5/lib/perl5:/home/user/perl5/lib/perl5:/home/user/perl5/lib/perl5:"
    PERL_LOCAL_LIB_ROOT=":/home/user/perl5:/home/user/perl5:/home/user/perl5:/home/demonking/perl5"
    PERL_MB_OPT="--install_base /home/user/perl5"
    PERL_MM_OPT="INSTALL_BASE=/home/user/perl5"
  @INC:
    /home/user/perl5/lib/perl5/amd64-freebsd
    /home/user/perl5/lib/perl5
    /home/user/perl5/lib/perl5/amd64-freebsd
    /home/user/perl5/lib/perl5
    /home/user/perl5/lib/perl5/amd64-freebsd
    /home/user/perl5/lib/perl5
    /home/user/perl5/lib/perl5/amd64-freebsd
    /home/user/perl5/lib/perl5
    /usr/local/lib/perl5/5.16/BSDPAN
    /usr/local/lib/perl5/site_perl/5.16/mach
    /usr/local/lib/perl5/site_perl/5.16
    /usr/local/lib/perl5/5.16/mach
    /usr/local/lib/perl5/5.16
    .
```


----------



## ShelLuser (Jun 17, 2013)

No, not the same error message.

@bkouhi issued the first make command to generate a result, and a smart one at that.

You really need to execute `# make -C /usr/ports/chinese/p5-Encode-HanExtra -V INSTALL_BASE -V PREFIX` and share the output.


----------



## demonking (Jun 17, 2013)

ShelLuser said:
			
		

> No, not the same error message.
> 
> @bkouhi issued the first make command to generate a result, and a smart one at that.
> 
> You really need to execute `# make -C /usr/ports/chinese/p5-Encode-HanExtra -V INSTALL_BASE -V PREFIX` and share the output.



Oh, sorry here is the *o*utput:


```
root@notebook:/usr/home/user # make -C /usr/ports/chinese/p5-Encode- HanExtra -V INSTALL_BASE -V PREFIX


/usr/local
```


----------



## demonking (Jun 18, 2013)

I have found the solution,  but would like to ask if this is sa*f*e for my system.

After this command `unsetenv PERL_MM_OPT` I can install x11/rxvt-unicode now. But every time to unset the variable, when I'm going to update my ports will be annoying and *I* don't know, if it will cause some problems on my running system.


```
PERL_MM_OPT="INSTALL_BASE=/home/user/perl5"
```

When I'm looking at this line, I see, that it links to my user-CPAN modules. Is this maybe the big problem? I have to program in Perl and need the newest CPAN modules.


----------

