Hello,
i have downloaded opencv-master and opencv-contrib,
then tried to build opencv-contrib using this command
cmake -DOPENCV_EXTRA_MODULES_PATH=…/opencv_contrib-master/modules …/opencv-master
where my terminal is inside the directory where the final product was supposed to be built into
now i had the error above so i solved it by doing
curl https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i > boostdesc_bgm.i
which downloaded boostdesc_bgm.i then i copied it to opencv_contrib-master/modules/xfeatures2d/src
then i got a second error
opencv_contrib-master/modules/xfeatures2d/test/test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_regression.impl.hpp: No such file or directory
which i solved by copying the feature2d folder from opencv-master/modules into opencv_contrib-master/modules/xfeatures2d/test/
and everything was built successfully afterwards
thank you