我正在尝试为无头linux编译libvlc。我已经通过添加
进一步做了IMAGE_INSTALL_append += " libvlc"
到我的图片,将在不使用x11的情况下构建,但仍然无法启用:
/home/bbb/poky-jethro/build/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-poky-linux/gcc/x86_64-poky-linux/5.2.0/ld: cannot find -lGL
如何才能成功构建它?
更新
我使用的是使用VLC 2.2.1的Yocto 2.0(Jethro)
我有一个vlc _%.bbappends我现在用建议的--disable-glx改为它:
REQUIRED_DISTRO_FEATURES_remove = "x11"
DEPENDS_remove = " \
virtual/libsdl libsdl-image \
libxpm libxinerama fluidsynth \
libnotify gtk+ \
xcb-util-keysyms \
"
DEPENDS_append = " \
"
EXTRA_OECONF_remove = "\
--enable-xvideo \
--enable-sdl \
--enable-realrtsp \
"
EXTRA_OECONF += " \
--disable-xcb \
--disable-freetype \
--disable-fontconfig \
--disable-sdl \
--disable-sdl-image \
--disable-vdpau \
--disable-xvideo \
"
EXTRA_OECONF_append = " \
--disable-glx \
"
PACKAGECONFIG_remove = " \
svg \
svgdec \
samba \
freerdp \
gnome-vfs \
vorbis \
"
但是我得到了这个警告:
WARNING: QA Issue: vlc: configure was passed unrecognised options: --disable-glx [unknown-configure-option]
它仍然失败:
ld: cannot find -lGL
更新2
在第3000行查看vlc / vlc-2.2.1-r0 / configure.ac
PKG_CHECK_MODULES([EGL], [egl], [
have_egl="yes"
], [
have_egl="no"
])
AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
have_gl="no"
PKG_CHECK_MODULES([GL], [gl], [
have_gl="yes"
], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#ifdef _WIN32
# include <GL/glew.h>
#endif
#include <GL/gl.h>
]], [
[int t0 = GL_TEXTURE0;]])
], [
GL_CFLAGS=""
have_gl="yes"
AS_IF([test "${SYS}" != "mingw32"], [
GL_LIBS="-lGL"
], [
GL_LIBS="-lopengl32"
])
])
])
AM_CONDITIONAL([HAVE_GL], [test "${have_gl}" = "yes"])
没有办法禁用gl。而且我不确定它是如何检查要构建的包gl的。没有--disable-gl就像其他选项一样。