vlfeat要求是在ubuntu18.04, 当在20.04编译时会遇到如下错误
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
这种parallel的错误查了一下,是openMP的问题,问题在20.04。
找到一个帖子,链接
具体解决办法是removing all default(None) in file vl/kmeans.c