Как скомпилировать и протестировать программу c с кодом vala?

Я работаю над специализированной версией приложения Gnome Cheese для фотобудки. На данный момент я просто пытаюсь избавиться от ненужного кода и просто приложения, прежде чем добавлять нужные мне функции. У этого есть дополнительное преимущество, позволяющее мне чувствовать себя комфортно с валой, которую я никогда раньше не использовал, а также с таким проектом, над которым я также никогда не работал.

Проблема, с которой я сталкиваюсь, заключается в том, что я не вижу простого способа протестировать его, и, несмотря на то, что на моем компьютере уже установлен сыр (поэтому я знаю, что все необходимые приложения установлены), я все еще получаю там ошибки.

  /usr/bin/gnome-autogen.sh
checking for autoconf >= 2.53...
  testing autoconf2.50... not found.
  testing autoconf... found 2.69
checking for automake >= 1.9...
  testing automake-1.12... not found.
  testing automake-1.11... found 1.11.6
checking for libtool >= 1.5...
  testing libtoolize... found 2.4.2
checking for intltool >= 0.30...
  testing intltoolize... found 0.50.2
checking for pkg-config >= 0.14.0...
  testing pkg-config... found 0.26
checking for gtk-doc >= 1.0...
  testing gtkdocize... found 1.18
Checking for required M4 macros...
Checking for forbidden M4 macros...
**Warning**: I am going to run `configure' with no arguments.
If you wish to pass any to it, please specify them on the
`./autogen.sh' command line.

Processing ./configure.ac
Running libtoolize...
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
libtoolize: copying file `build-aux/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
Running intltoolize...
Running gtkdocize...
Running aclocal-1.11...
Running autoconf...
Running autoheader...
Running automake-1.11...
Running ./configure --enable-maintainer-mode ...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for valac... /usr/bin/valac
checking /usr/bin/valac is at least version 0.18.0... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.24... yes
checking whether gcc understands -Wno-sign-compare... yes
checking what warning flags to pass to the C compiler... -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare
checking what language compliance flags to pass to the C compiler... 
checking whether NLS is requested... yes
checking for intltool >= 0.50.0... 0.50.2 found
checking for intltool-update... /usr/bin/intltool-update
checking for intltool-merge... /usr/bin/intltool-merge
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.14.2
checking for XML::Parser... ok
checking host operating system... Linux
checking for gudev-1.0... found
checking sys/videoio.h usability... no
checking sys/videoio.h presence... no
checking for sys/videoio.h... no
checking X11/extensions/XTest.h usability... no
checking X11/extensions/XTest.h presence... no
checking for X11/extensions/XTest.h... no
checking for CHEESE... no
configure: error: Package requirements (glib-2.0 >= 2.28.0
  gio-2.0 >= 2.32.0
  x11
  gobject-2.0 >= 2.28.0
  gdk-pixbuf-2.0
  gstreamer-plugins-base-1.0 >= 0.11.0 gstreamer-1.0 >= 0.11.0 gstreamer-pbutils-1.0 >= 0.11.0
  gstreamer-plugins-bad-1.0 >= 0.11.0
  gnome-desktop-3.0 >= 2.91.6
  cairo >= 1.10.0
  pangocairo >= 1.28.0
  clutter-1.0 >= 1.12.0
  clutter-gst-2.0 >= 1.9.0
  gudev-1.0) were not met:

No package 'gstreamer-plugins-base-1.0' found
No package 'gstreamer-1.0' found
No package 'gstreamer-pbutils-1.0' found
No package 'gstreamer-plugins-bad-1.0' found
No package 'gnome-desktop-3.0' found
No package 'clutter-1.0' found
No package 'clutter-gst-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CHEESE_CFLAGS
and CHEESE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Вот что я получаю, когда делаю sh autogen.sh. Я чувствую, что должен быть лучший способ, и мне было интересно, есть ли у кого-нибудь какие-либо идеи или решения, чтобы заставить эту работу работать.

Спасибо, мой код можно найти: здесь


person river226    schedule 17.06.2013    source источник
comment
Вы думали об установке этих недостающих пакетов?   -  person Some programmer dude    schedule 17.06.2013
comment
У меня есть, я хочу знать, есть ли более простой способ сделать все это, о чем я должен знать, вот и все   -  person river226    schedule 17.06.2013


Ответы (1)


на моем компьютере уже установлен сыр (поэтому я знаю, что все необходимые приложения установлены)

У вас могут быть установлены все необходимые библиотеки в виде двоичных файлов, но, по-видимому, у вас не установлены соответствующие заголовки.

Чтобы запустить динамически связанное приложение, вам необходимо установить .so файлы зависимостей. Для компиляции приложения также необходимо иметь установленные файлы заголовков зависимостей (и, в случае библиотек, работающих с pkg-config, .pc), которые, судя по сообщению об ошибке, вы не .

Большинство систем управления пакетами настроены так, что заголовки библиотек и .pc файлы (и вообще все файлы, которые имеют значение только при компиляции приложения, использующего библиотеку, а не при его запуске) содержатся в -dev пакетах. Итак, вам нужно установить clutter-dev и так далее.

person sepp2k    schedule 17.06.2013
comment
Есть ли простой способ получить все библиотеки или мне нужно загружать каждую по одной? - person river226; 17.06.2013
comment
Это зависит от того, какую ОС/менеджер пакетов вы используете. Для Ubuntu вы можете просто сделать это: sudo apt-get build-dep cheese - person MrEricSir; 18.06.2013
comment
Вы уверены, что не перепутали .po и .pc? - person Ancurio; 20.06.2013