编译问题 - ubuntu 14.04上的奶酪摄像头

时间:2016-01-02 11:10:45

标签: ubuntu

我正在尝试从源代码编译奶酪(我需要在源代码中添加新功能),我收到一些错误,我找不到在线解决方案。

  1. 我克隆使用:git clone git://git.gnome.org/cheese(甚至尝试过' sudo git clone ...'在某些时候)
  2. cd cheese(由git clone创建的新目录)
  3. sudo autoconf(./configre赢了但还没有运行,但我有一个configure.ac)
  4. 现在 - 我收到以下错误:

    configure.ac:14: error: possibly undefined macro: AM_INIT_AUTOMAKE
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.ac:15: error: possibly undefined macro: AM_MAINTAINER_MODE
    configure.ac:16: error: possibly undefined macro: AM_SILENT_RULES
    configure.ac:20: error: possibly undefined macro: AM_PROG_CC_C_O
    configure.ac:22: error: possibly undefined macro: AM_PROG_VALAC
    configure.ac:80: error: possibly undefined macro: AC_MSG_RESULT
    configure.ac:88: error: possibly undefined macro: AC_DEFINE
    configure.ac:89: error: possibly undefined macro: AC_MSG_ERROR
    configure.ac:97: error: possibly undefined macro: AM_CONDITIONAL
    configure.ac:117: error: possibly undefined macro: AC_MSG_WARN
    

    一个有类似问题的线程建议运行autoreconf --install,我做了,导致:

    configure.ac:210: error: macro APPSTREAM_XML is not defined; is a m4 
    file missing?
    m4/ax_require_defined.m4:35: AX_REQUIRE_DEFINED is expanded from...
    configure.ac:210: the top level
    autom4te: /usr/bin/m4 failed with exit status: 1
    aclocal: error: echo failed with exit status: 1
    autoreconf: aclocal failed with exit status: 1
    

    我看了一眼,但没有意识到我在读什么。

    我非常感谢对这里有什么问题的一般性解释,特别是如何解决这个问题并进行编译。

2 个答案:

答案 0 :(得分:1)

编译Gnome Cheese Webcam软件:

根据新发行版(例如Debian测试,Ubuntu等)

apt-get install git
git clone https://git.gnome.org/browse/cheese
cd cheese

apt-get install autoconf gtk-doc-tools yelp-tools appstream-util libx11-dev libgstreamer-plugins-bad1.0-dev libgnome-desktop-3-dev libclutter-gtk-1.0-dev libclutter-gst-3.0-dev libcanberra-gtk3-dev valac

./autogen.sh
./configure
make -j4

在较旧的发行版(例如Debian Jessie)下,首先结帐较旧的代码(例如3.14.1):

apt-get install git
git clone https://git.gnome.org/browse/cheese
cd cheese
git tag                  ## view  tags
git checkout 3.14.1      ## older tag

apt-get install autoconf gtk-doc-tools yelp-tools appstream-util libglib2.0-dev libx11-dev libgdk-pixbuf2.0-dev libgstreamer-plugins-bad1.0-dev libgnome-desktop-3-dev libclutter-gtk-1.0-dev libclutter-gst-2.0-dev libcanberra-gtk3-dev libgudev-1.0-dev valac

./autogen.sh
./configure
make -j4

答案 1 :(得分:0)

当我尝试在Debian Sid / Buster上构建最新版本的Cheese(git commit 0a6032b9a41116f4ee2b59cd56c0049aa35ded4f)时,在可接受的答案列表中缺少构建依赖项(gnome-common)。我已经更新了命令列表以包括这种依赖性:

apt-get install git
git clone https://git.gnome.org/browse/cheese
cd cheese

apt-get install autoconf gtk-doc-tools yelp-tools appstream-util libx11-dev libgstreamer-plugins-bad1.0-dev libgnome-desktop-3-dev libclutter-gtk-1.0-dev libclutter-gst-3.0-dev libcanberra-gtk3-dev valac gnome-common

./autogen.sh
./configure
make -j4