# 2021Q4, graphics/opencv fetch problem



## Alain De Vos (Nov 21, 2021)

```
[00:00:56] => Attempting to fetch https://codeload.github.com/opencv/opencv_3rdparty/tar.gz/a56b6ac6f030c312b2dce17430eef13aed9af274?dummy=/opencv-opencv_3rdparty-a56b6ac6f030c312b2dce17430eef13aed9af274_GH0.tar.gz
[00:00:56] fetch: https://codeload.github.com/opencv/opencv_3rdparty/tar.gz/a56b6ac6f030c312b2dce17430eef13aed9af274?dummy=/opencv-opencv_3rdparty-a56b6ac6f030c312b2dce17430eef13aed9af274_GH0.tar.gz: size unknown
[00:00:56] fetch: https://codeload.github.com/opencv/opencv_3rdparty/tar.gz/a56b6ac6f030c312b2dce17430eef13aed9af274?dummy=/opencv-opencv_3rdparty-a56b6ac6f030c312b2dce17430eef13aed9af274_GH0.tar.gz: size of remote file is not known
[00:00:56] opencv-opencv_3rdparty-a56b6ac6f030c312b2dce17430eef13aed9af274         129 MB 5023 kBps    26s
[00:01:22] => 998406d20e93aa36b26fd56506f3ea8a82b43c24.patch doesn't seem to exist in /portdistfiles/.
[00:01:22] => Attempting to fetch https://github.com/opencv/opencv/commit/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch
[00:01:22] fetch: https://github.com/opencv/opencv/commit/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch: size mismatch: expected 1074, actual 1072
[00:01:22] => Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch
[00:01:23] fetch: http://distcache.FreeBSD.org/ports-distfiles/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch: Not Found
[00:01:23] => Couldn't fetch it - please try to retrieve this
[00:01:23] => port manually into /portdistfiles/ and try again.
[00:01:23] *** Error code 1
[00:01:23] 
[00:01:23] Stop.
[00:01:23] make: stopped in /usr/ports/graphics/opencv
[00:01:23] =>> Cleaning up wrkdir
[00:01:24] ===>  Cleaning for opencv-4.5.3_4
[00:01:24] build of graphics/opencv | opencv-4.5.3_4 ended at Sun Nov 21 16:39:38 CET 2021
[00:01:24] build time: 00:01:20
[00:01:24] !!! build failure encountered !!!
```


----------



## Alexander88207 (Nov 21, 2021)

```
[00:01:22] fetch: https://github.com/opencv/opencv/commit/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch: size mismatch: expected 1074, actual 1072
```

If this still failing for you after deleting the distfiles, try to reroll the checksum with `make makesum` in the port folder.

You may also want to inform the maintainer about that, if it keeps failing.


----------



## a6h (Nov 21, 2021)

Sometimes I just follow the advice -- in case of network issues,
`please try to retrieve this port manually into /portdistfiles/ and try again.`
i.e. to fetch(1) the file(s), and everything will doing fine.


----------



## Alexander88207 (Nov 21, 2021)

Cant reproduce the issue:

998406d20e93aa36b26fd56506f3ea8a82b43c24.patch        1074  B   28 MBps    00s
===> Fetching all distfiles required by opencv-4.5.3_4 for building


----------



## a6h (Nov 21, 2021)

I can't download that either. Fetch it from 


			https://github.com/opencv/opencv/commit/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch


----------



## Alain De Vos (Nov 21, 2021)

The fetch functions with main, but not quarterly


----------



## grahamperrin@ (Nov 21, 2021)

> 2021Q4



<https://cgit.freebsd.org/ports/tree/graphics/opencv/distinfo?h=2021Q4#n18> expects `bce0f541613ac800c9f84bffde2f21b035b0528035e89495e7a49c94546334b7` and `1074`. 

I do get those values:


```
% cd /tmp
% fetch https://github.com/opencv/opencv/commit/998406d20e93aa36b26fd56506f3ea8a82b43c24.patch
998406d20e93aa36b26fd56506f3ea8a82b43c24.patch        1074  B   17 MBps    00s
% sha256 998406d20e93aa36b26fd56506f3ea8a82b43c24.patch  
SHA256 (998406d20e93aa36b26fd56506f3ea8a82b43c24.patch) = bce0f541613ac800c9f84bffde2f21b035b0528035e89495e7a49c94546334b7
%
```


----------

