# Troubles with dns/p5-Net-DNS compilation after Perl update



## breefsd (Dec 15, 2013)

Hello,

I have been following /usr/ports/UPDATING instructions about the latest Perl update:



> 20131120:
> AFFECTS: users of lang/perl5.12 lang/perl5.14 lang/perl5.16 and lang/perl5.18
> AUTHOR: mat@FreeBSD.org
> 
> ...



I have lang/perl5.16 installed so I have done `make -C /usr/ports/lang/perl5.16 config` then check the "THREADS" option.

Now I'm trying to achieve `portmaster -r perl5-` but I get an error that appears related to Perl when installing the dns/p5-Net-DNS port (it also needs to be upgrading from 0.72 to 0.73):


```
]0;portmaster: p5-Net-DNS-0.72
===>>> Currently installed version: p5-Net-DNS-0.72
===>>> Port directory: /usr/ports/dns/p5-Net-DNS

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for dns/p5-Net-DNS in background
===>>> Gathering dependency list for dns/p5-Net-DNS from ports
===>>> Initial dependency check complete for dns/p5-Net-DNS

]0;portmaster: p5-Net-DNS-0.72
===>>> Starting build for dns/p5-Net-DNS <<<===

===>>> All dependencies are up to date

===> Cleaning for p5-Net-DNS-0.73
===> License ART10 GPLv1 accepted by the user
===> Found saved configuration for p5-Net-DNS-0.72
===> Fetching all distfiles required by p5-Net-DNS-0.73 for building
===> Extracting for p5-Net-DNS-0.73
=> SHA256 Checksum OK for Net-DNS-0.73.tar.gz.
===> Patching for p5-Net-DNS-0.73
===> p5-Net-DNS-0.73 depends on package: p5-Digest-HMAC>=1.01 - found
===> p5-Net-DNS-0.73 depends on package: p5-IO-Socket-INET6>=0 - found
===> p5-Net-DNS-0.73 depends on file: /usr/local/bin/perl5.16.3 - found
===> Configuring for p5-Net-DNS-0.73
Can't load '/usr/local/lib/perl5/site_perl/5.16/mach/auto/Socket/Socket.so' for module Socket: /usr/local/lib/perl5/site_perl/5.16/mach/auto/Socket/Socket.so: Undefined symbol "PL_unitcheckav" at /usr/local/lib/perl5/5.16/XSLoader.pm line 68.
at /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm line 858.
Compilation failed in require at /usr/local/lib/perl5/5.16/mach/IO/Socket.pm line 13.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.16/mach/IO/Socket.pm line 13.
Compilation failed in require at ./Makefile.PL line 8.
BEGIN failed--compilation aborted at ./Makefile.PL line 8.
*** [do-configure] Error code 255

Stop in /usr/ports/dns/p5-Net-DNS.
*** [build] Error code 1

Stop in /usr/ports/dns/p5-Net-DNS.

===>>> make failed for dns/p5-Net-DNS
===>>> Aborting update
```

I have re-installed dependencies for dns/p5-Net-DNS and tried again 
	
	



```
portmaster dns/p5-Net-DNS
```
 but no chance...

Some information about my system:

```
FreeBSD xxxxxxJail 9.1-RELEASE-p7 
FreeBSD 9.1-RELEASE-p7 
root@amd64-
```

I don't really want to uninstall and re-install all the ports, thanks.


----------



## joint (Dec 19, 2013)

*Re: troubles with dns/p5-Net-DNS compilation after Perl upda*

Let me confirm exactly the same issue happening with dns/p5-Net-DNS that causing troubles using:

```
# portupgrage -fr dns/p5-Net-DNS
```

Tried to rebuild all the Perl ports using:

```
# portupgrade -fr lang/perl5.16
```
still no joy - the same error:

```
===>   p5-Net-DNS-0.73 depends on file: /usr/local/bin/perl5.16.3 - found
===>  Configuring for p5-Net-DNS-0.73
Can't load '/usr/local/lib/perl5/site_perl/5.16/mach/auto/Socket/Socket.so' for module Socket: /usr/local/lib/perl5/site_perl/5.16/mach/auto/Socket/Socket.so: Undefined symbol "PL_sv_undef" at /usr/local/lib/perl5/5.16/XSLoader.pm line 68.
 at /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm line 858.
Compilation failed in require at /usr/local/lib/perl5/5.16/mach/IO/Socket.pm line 13.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.16/mach/IO/Socket.pm line 13.
Compilation failed in require at ./Makefile.PL line 8.
BEGIN failed--compilation aborted at ./Makefile.PL line 8.
*** Error code 255

Stop in /usr/ports/dns/p5-Net-DNS.
*** Error code 1
```


```
# uname -a
FreeBSD xhostx.xcom 8.3-STABLE
```


----------



## breefsd (Dec 20, 2013)

*Re: troubles with dns/p5-Net-DNS compilation after Perl upda*

About dns/p5-Net-DNS, have you ever successfully installed version 0.73 or do you need as well to upgrade the port?
I don't know if anyone can compile dns/p5-Net-DNS without error...


----------



## wblock@ (Dec 20, 2013)

*Re: troubles with dns/p5-Net-DNS compilation after Perl upda*

As part of an upgrade to 10.0, dns/p5-Net-DNS was recompiled here a few days ago.  It has worked since then, and I'm able to recompile it right now.

/usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm is not present on my system.  It may be a leftover from a failed earlier Perl upgrade.


----------



## breefsd (Dec 20, 2013)

*Re: Troubles with dns/p5-Net-DNS compilation after Perl upda*

So should I remove /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm, then compilation would not be attempted for this file (I don't know wat "Perl Module" files are exactly, maybe like libraries)? Thanks.


----------



## wblock@ (Dec 21, 2013)

*Re: Troubles with dns/p5-Net-DNS compilation after Perl upda*

Run `pkg_info -W /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm` to see if that file is part of any installed port.


----------



## breefsd (Dec 24, 2013)

*Re: Troubles with dns/p5-Net-DNS compilation after Perl upda*

I get the following result: /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm was installed by package p5-Socket-2.013.
`pkg_version` says net/p5-Socket is up to date 
net/p5-Socket is required by some other installed ports.

I updated Perl to latest version (5.16.3_6) and tried to rebuild net/p5-Socket, but failed with "Attempt to reload Socket.pm aborted":


```
]0;portmaster: p5-Socket-2.013
===>>> Currently installed version: p5-Socket-2.013
===>>> Port directory: /usr/ports/net/p5-Socket

===>>> Gathering distinfo list for installed ports

===>>> Launching 'make checksum' for net/p5-Socket in background
===>>> Gathering dependency list for net/p5-Socket from ports
===>>> Initial dependency check complete for net/p5-Socket

]0;portmaster: p5-Socket-2.013
===>>> Starting build for net/p5-Socket <<<===

===>>> All dependencies are up to date

===> Cleaning for p5-Socket-2.013
===> License ART10 GPLv1 accepted by the user
===> Fetching all distfiles required by p5-Socket-2.013 for building
===> Extracting for p5-Socket-2.013
=> SHA256 Checksum OK for Socket-2.013.tar.gz.
===> Patching for p5-Socket-2.013
===> p5-Socket-2.013 depends on file: /usr/local/bin/perl5.16.3 - found
===> Configuring for p5-Socket-2.013
Attempt to reload Socket.pm aborted.
Compilation failed in require at /usr/local/lib/perl5/5.16/IPC/Cmd.pm line 46.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/5.16/IPC/Cmd.pm line 46.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/ExtUtils/CBuilder/Base.pm line 9.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.16/ExtUtils/CBuilder/Base.pm line 9.
Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16/ExtUtils/CBuilder/Platform/Unix.pm line 4.
BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.16/ExtUtils/CBuilder/Platform/Unix.pm line 4.
Compilation failed in require at (eval 9) line 2.
BEGIN failed--compilation aborted at (eval 9) line 2.
Compilation failed in require at ./Makefile.PL line 19.
*** [do-configure] Error code 255

Stop in /usr/ports/net/p5-Socket.
```

Thanks.


----------



## wblock@ (Dec 24, 2013)

*Re: Troubles with dns/p5-Net-DNS compilation after Perl upda*

Sorry, have not seen that here.  If I was seeing that, I would deinstall Perl, then install it, then rebuild all p5-* ports.


----------



## breefsd (Dec 27, 2013)

*Re: Troubles with dns/p5-Net-DNS compilation after Perl upda*

I tried to delete /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm before re-installing all the ports...
I removed:
- /usr/local/lib/perl5/site_perl/5.16/mach/Socket.pm
- /usr/local/lib/perl5/site_perl/5.16/mach/Socket6.pm

Then I used `portmaster -r perl5-`. Socket.pm (and Socket6.pm) were replaced and all "p5" ports have been compiled without errors. I suppose the issue was incorrect file version. Very strange.

All is working fine now.

Thank you.


----------



## joint (Dec 27, 2013)

*Re: Troubles with dns/p5-Net-DNS compilation after Perl upda*

Just to confirm:


> Socket.pm (and Socket6.pm)  were replaced and all "p5" ports have been compiled without errors.



Issue is gone.

Thank you.


----------

