# Build failure on p5-HTTP-Message



## macosxgeek (Mar 9, 2022)

Hi all,
I think I might have similar problem hence posting the question here.. I might be wrong though - please correct me if I'm wrong.. 

I'm trying to run: `portmaster -af` on my 12.2-RELEASE-p12 box (amd64).
All ports are upgrading fine except some perl5 modules:


```
===> Configuring for p5-HTTP-Message-6.36
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for HTTP::Message
Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is not allowed at /usr/local/lib/perl5/site_perl/JSON/PP.pm line 423.
*** Error code 2



Stop.
make: stopped in /usr/ports/www/p5-HTTP-Message



===>>> make build failed for www/p5-HTTP-Message
===>>> Aborting update



===>>> Update for p5-HTTP-Message-6.06_4 failed
===>>> Aborting update



===>>> Update for www/p5-HTML-Parser failed
===>>> Aborting update
```

At first I was thinking that I have wrong version of Perl:


```
# perl --version

This is perl 5, version 32, subversion 1 (v5.32.1) built for amd64-freebsd-thread-multi
```

But then I realized that the port might be somehow broken and I might need to install them as packages with `pkg-add`.
Unfortunately I don't see relevant packages in /var/cache/pkg

Can I ask how I can resolve it?


----------



## SirDice (Mar 9, 2022)

macosxgeek said:


> I think I might have similar problem hence posting the question here.. I might be wrong though - please correct me if I'm wrong..


You're wrong, its not even remotely similar. Post split off to its own thread.



macosxgeek said:


> ```
> # perl --version
> This is perl 5, version 32, subversion 1 (v5.32.1) built for amd64-freebsd-thread-multi
> ```


That's the correct version. 



macosxgeek said:


> But then I realized that the port might be somehow broken and I might need to install them as packages with `pkg-add`.


Ports build packages. If the port is broken then a package cannot be created. But as far as I can tell this port isn't broken, it builds just fine here.


```
=======================<phase: configure      >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Configuring for p5-HTTP-Message-6.36
Warning: prerequisite Try::Tiny 0 not found.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for HTTP::Message
Writing MYMETA.yml and MYMETA.json
===========================================================================
=======================<phase: build          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for p5-HTTP-Message-6.36
cp lib/HTTP/Headers.pm blib/lib/HTTP/Headers.pm
cp lib/HTTP/Message.pm blib/lib/HTTP/Message.pm
cp lib/HTTP/Headers/Auth.pm blib/lib/HTTP/Headers/Auth.pm
cp lib/HTTP/Headers/ETag.pm blib/lib/HTTP/Headers/ETag.pm
cp lib/HTTP/Status.pm blib/lib/HTTP/Status.pm
cp lib/HTTP/Response.pm blib/lib/HTTP/Response.pm
cp lib/HTTP/Headers/Util.pm blib/lib/HTTP/Headers/Util.pm
cp lib/HTTP/Request.pm blib/lib/HTTP/Request.pm
cp lib/HTTP/Request/Common.pm blib/lib/HTTP/Request/Common.pm
cp lib/HTTP/Config.pm blib/lib/HTTP/Config.pm
Manifying 10 pod documents
===========================================================================
```

Judging by the slightly different configure output compared to yours, try deleting lang/p5-Try-Tiny. It looks like it's interfering with the build process.


----------



## macosxgeek (Mar 9, 2022)

> You're wrong, its not even remotely similar. Post split off to its own thread.


Sorry. I always get a bit lost when it comes to ports and packages. Then can be quite complicated - especially when things go wrong. Thank you for correcting me.



> That's the correct version.


That's great - - thank you.

Ports build packages. If the port is broken then a package cannot be created. But as far as I can tell this port isn't broken, it builds just fine here.


```
=======================<phase: configure      >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Configuring for p5-HTTP-Message-6.36
Warning: prerequisite Try::Tiny 0 not found.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for HTTP::Message
Writing MYMETA.yml and MYMETA.json
===========================================================================
=======================<phase: build          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Building for p5-HTTP-Message-6.36
cp lib/HTTP/Headers.pm blib/lib/HTTP/Headers.pm
cp lib/HTTP/Message.pm blib/lib/HTTP/Message.pm
cp lib/HTTP/Headers/Auth.pm blib/lib/HTTP/Headers/Auth.pm
cp lib/HTTP/Headers/ETag.pm blib/lib/HTTP/Headers/ETag.pm
cp lib/HTTP/Status.pm blib/lib/HTTP/Status.pm
cp lib/HTTP/Response.pm blib/lib/HTTP/Response.pm
cp lib/HTTP/Headers/Util.pm blib/lib/HTTP/Headers/Util.pm
cp lib/HTTP/Request.pm blib/lib/HTTP/Request.pm
cp lib/HTTP/Request/Common.pm blib/lib/HTTP/Request/Common.pm
cp lib/HTTP/Config.pm blib/lib/HTTP/Config.pm
Manifying 10 pod documents
===========================================================================
```



> Judging by the slightly different configure output compared to yours, try deleting lang/p5-Try-Tiny. It looks like it's interfering with the build process.


I'm afraid I don't have this port installed:

```
# pkg delete lang/p5-Try-Tiny
Updating database digests format: 100%
No packages matched for pattern 'lang/p5-Try-Tiny'

Checking integrity... done (0 conflicting)
1 packages requested for removal: 0 locked, 1 missing
```

But I think something funny is going on on my system..

I wanted to try and install this one problematic Perl module as a package with 'pkg install' command - instead of using ports tree. This worked:

```
# pkg install p5-HTTP-Message
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        p5-HTTP-Message: 6.06_4 -> 6.35

Number of packages to be upgraded: 1

79 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching p5-HTTP-Message-6.35.pkg: 100%   79 KiB  80.5kB/s    00:01  
Checking integrity... done (0 conflicting)
[1/1] Upgrading p5-HTTP-Message from 6.06_4 to 6.35...
[1/1] Extracting p5-HTTP-Message-6.35: 100%
```

*But*. It installed *v6.35 *and *NOT v6.36 *like it suppose to install it via ports tree.. I think that there there might be some discrepancy between ports tree and packages? Not really sure.

Then when I try to remove the package via ports (I know - I shouldn't mix them - but I'm doing my best to try to fix this - sorry ;-)) and reinstall it again - it's somehow switching back from v6.35 to v6.36:



```
/usr/ports/www/p5-HTTP-Message # make deinstall
===>  Deinstalling for p5-HTTP-Message
===>   Deinstalling p5-HTTP-Message-6.35
Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        p5-HTTP-Message: 6.35

Number of packages to be removed: 1
[1/1] Deinstalling p5-HTTP-Message-6.35...
[1/1] Deleting files for p5-HTTP-Message-6.35: 100%




root@nessus6:/usr/ports/www/p5-HTTP-Message # make reinstall
===>  Deinstalling for p5-HTTP-Message
===>   p5-HTTP-Message not installed, skipping
===>  License ART10 GPLv1+ accepted by the user
===>   p5-HTTP-Message-6.36 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by p5-HTTP-Message-6.36 for building
===>  Extracting for p5-HTTP-Message-6.36
=> SHA256 Checksum OK for HTTP-Message-6.36.tar.gz.
===>  Patching for p5-HTTP-Message-6.36
===>  Applying FreeBSD patches for p5-HTTP-Message-6.36 from /usr/ports/www/p5-HTTP-Message/files
===>   p5-HTTP-Message-6.36 depends on package: p5-Clone>=0 - found
===>   p5-HTTP-Message-6.36 depends on package: p5-Encode-Locale>=1 - found
===>   p5-HTTP-Message-6.36 depends on package: p5-HTTP-Date>=6 - found
===>   p5-HTTP-Message-6.36 depends on package: p5-IO-HTML>=0 - found
===>   p5-HTTP-Message-6.36 depends on package: p5-LWP-MediaTypes>=6 - found
===>   p5-HTTP-Message-6.36 depends on package: p5-URI>=1.10 - found
===>   p5-HTTP-Message-6.36 depends on package: perl5>=5.32.r0<5.33 - found
===>   p5-HTTP-Message-6.36 depends on package: perl5>=5.32.r0<5.33 - found
===>  Configuring for p5-HTTP-Message-6.36
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for HTTP::Message
Use of strings with code points over 0xFF as arguments to bitwise and (&) operator is not allowed at /usr/local/lib/perl5/site_perl/JSON/PP.pm line 423.
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/www/p5-HTTP-Message
*** Error code 1

Stop.
make: stopped in /usr/ports/www/p5-HTTP-Message
```

hmm. That's a bit odd..


----------



## covacat (Mar 9, 2022)

pkg which /usr/local/lib/perl5/site_perl/JSON/PP.pm
i only have 
/usr/local/lib/perl5/5.32/JSON/PP.pm


----------



## SirDice (Mar 9, 2022)

macosxgeek said:


> *But*. It installed *v6.35 *and *NOT v6.36 *like it suppose to install it via ports tree..


That's the difference between using the _latest_ ports tree and a _quarterly_ package repository. Latest has 6.36, quarterly has 6.35.


----------



## macosxgeek (Mar 9, 2022)

SirDice said:


> That's the difference between using the _latest_ ports tree and a _quarterly_ package repository. Latest has 6.36, quarterly has 6.35.


OK. Everything clear now. I will stick with packages then. Thank you very much SirDice! You're the man!


----------

