Gstreamer编译篇_libmount
/usr/lib/x86_64-linux-gnu/libmount.so: file not recognized: File format not…
在交叉编译的时候出现libmount.so文件格式不正确
因为现在是在交叉编译环境下啊。
仔细对比了glib的meson.build
# libmount is only used by gio, but we need to fetch the libs to generate the
# pkg-config file below
libmount_dep = []
if host_system == 'linux'
libmount_dep = dependency('mount', version : '>=2.23', required : get_option('libmount'))
glib_conf.set('HAVE_LIBMOUNT', libmount_dep.found())
endif
与
# libmount is only used by gio, but we need to fetch the libs to generate the
# pkg-config file below
libmount_dep = []
if host_system == 'linux' and get_option('libmount')
libmount_dep = [dependency('mount', version : '>=2.23', required : true)]
glib_conf.set('HAVE_LIBMOUNT', 1)
endif
你会发现,还是有些不同的。
第一种写法,其实是直接disable libmount了。第二种是强制要求libmount的。
option('libmount',
type : 'feature',
value : 'auto',
description : 'build with libmount support')## auto,默认就是disable的
其实编译glib直接加上**-Dlibmount=false**就行了。