vlfeat compiles error in ubuntu20.04 and solves it

vlfeat requires ubuntu18.04. When compiling on 20.04, you will encounter the following error

In file included from vl/kmeans.h:21,
                 from vl/kmeans.c:363:
vl/kmeans.c: In function ‘_vl_kmeans_quantize_f’:
vl/mathop.h:92:37: error: ‘vl_infinity_d’ not specified in enclosing ‘parallel’
   92 | #define VL_INFINITY_D (vl_infinity_d.value)
      |                       ~~~~~~~~~~~~~~^~~~~~~
vl/kmeans.c:685:34: note: in expansion of macro ‘VL_INFINITY_D’
  685 |       TYPE bestDistance = (TYPE) VL_INFINITY_D ;
      |                                  ^~~~~~~~~~~~~
In file included from vl/kmeans.c:1782:
vl/kmeans.c:672:9: error: enclosing ‘parallel’
  672 | #pragma omp parallel default(none) \
      |         ^~~
In file included from vl/kmeans.c:1788:
vl/kmeans.c: In function ‘_vl_kmeans_quantize_d’:
vl/kmeans.c:685:27: error: ‘vl_infinity_d’ not specified in enclosing ‘parallel’
  685 |       TYPE bestDistance = (TYPE) VL_INFINITY_D ;
vl/kmeans.c:672:9: error: enclosing ‘parallel’
  672 | #pragma omp parallel default(none) \
      |         ^~~
             CC bin/glnxa64/objs/slic.o

After checking this parallel error, I found that it is a problem with openMP, and the problem is in 20.04.
Found a post, link
The specific solution is to remove all default(None) in file vl/kmeans.c< /span>

Guess you like

Origin blog.csdn.net/level_code/article/details/134176563