Ir a contenido

PKG_PROG_PKG_CONFIG: command not found


Minutes ago I was trying to compile hal++ a wrapper for libhal developed by beep-media-player team.
While executing configure I’ve got this error:

./configure: line XXXXX: PKG_PROG_PKG_CONFIG: command not found

It was not expected because I did have autotools and pkg-config already installed. And as incredible as I had compiled without any error hal++ in other Debian testing/unstable machine (I was in a Debian testing).
So I have investigated a bit with half success. I’ve found a peace of autotools code which have been useful:

# Check for pkg-config manually first, as if its not installed the
# PKG_PROG_PKG_CONFIG macro won’t be defined.
#
AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
#
if test x”$have_pkg_config” == xno; then
AC_MSG_ERROR(pkg-config is required to install this program)
fi
#
PKG_PROG_PKG_CONFIG

It’s only a couple of verifications, which are not introducing anything new, but it was incredibly worked.

Now, I’ll try libhal++ to see if I can do what I want in C++.

Etiquetas: , , , ,

intltoolize: cannot copy ‘/usr/share/intltool/Makefile.in.in’ to ‘po/Makefile.in.in’


Un pequeño problema para el que no he encontrado la solución por más que he buscado.
El problema ha surgido ahora que estoy usando las autotools para automatizar toda la compilación, linkado y distribución de GLKM.

El caso es que al ejecutar el autogen.sh que tengo preparado me salía un mensaje, entre la maraña que sueltan estas herramientas, del tipo:

user@einstein:~/svn/pfc/trunk/gui$ ./autogen.sh

cp: no se puede crear el fichero regular «po/Makefile.in.in»: No existe el fichero o el directorio

Acotando el comando que fallaba lo ejecuté en modo depuración, para saber que hacía exactamente.

user@einstein:~/svn/pfc/trunk/gui$ intltoolize –copy –force –automake –debug
intltoolize: enabling shell trace mode
+ test -f configure.ac
+ configure=configure.ac
+ files=’intltool-extract.in intltool-merge.in intltool-update.in po/Makefile.in.in’
+ auxdir=.
++ egrep ‘^AC_CONFIG_AUX_DIR’ configure.ac
+ auxdirline=’AC_CONFIG_AUX_DIR([build-aux])’
+ test -n ‘AC_CONFIG_AUX_DIR([build-aux])’
++ echo ‘AC_CONFIG_AUX_DIR([build-aux])’
++ sed ’s/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/’
+ auxdir=’[build-aux]‘
+ test ‘[build-aux]‘ = ‘AC_CONFIG_AUX_DIR([build-aux])’
++ echo ‘[build-aux]‘
++ sed ’s/^\[\(.*\)\]$/\1/g’
+ auxdir=build-aux
+ case “$auxdir” in
+ test -z yes
++ pwd
+ cur=/home/user/svn/pfc/trunk/gui
+ test build-aux ‘!=’ .
+ test -z yes
+ cd build-aux
+ for file in ‘$files’
+ test -f intltool-extract.in
+ test -z yes
+ rm -f intltool-extract.in
+ test -n ”
++ basename intltool-extract.in
+ cp -f /usr/share/intltool/intltool-extract.in intltool-extract.in
+ :
+ for file in ‘$files’
+ test -f intltool-merge.in
+ test -z yes
+ rm -f intltool-merge.in
+ test -n ”
++ basename intltool-merge.in
+ cp -f /usr/share/intltool/intltool-merge.in intltool-merge.in
+ :
+ for file in ‘$files’
+ test -f intltool-update.in
+ test -z yes
+ rm -f intltool-update.in
+ test -n ”
++ basename intltool-update.in
+ cp -f /usr/share/intltool/intltool-update.in intltool-update.in
+ :
+ for file in ‘$files’
+ test -f po/Makefile.in.in
+ rm -f po/Makefile.in.in
+ test -n ”
++ basename po/Makefile.in.in
+ cp -f /usr/share/intltool/Makefile.in.in po/Makefile.in.in
cp: no se puede crear el fichero regular «po/Makefile.in.in»: No existe el fichero o el directorio
++ basename po/Makefile.in.in
+ echo ‘intltoolize: cannot copy ‘\”/usr/share/intltool/Makefile.in.in’\” to ‘\”po/Makefile.in.in’\”’
intltoolize: cannot copy ‘/usr/share/intltool/Makefile.in.in’ to ‘po/Makefile.in.in’
+ status=1
+ exit 1
+ exit 1

Estoy usando un directorio para guardar los archivos de autoconf (config-aux) y tener la estructura de directorios y archivos ordenadita.
Ahí radicaba el problema. Así que con crear un directorio llamado po bajo ese directorio ha desaparecido el error.

user@einstein:~/svn/pfc/trunk/gui$ cd config-aux/
user@einstein:~/svn/pfc/trunk/gui/config-aux$ mkdir po
user@einstein:~/svn/pfc/trunk/gui/config-aux$ ll
total 412K
-rwxr-xr-x 1 user user 44K 2007-04-20 04:09 config.guess*
-rwxr-xr-x 1 user user 32K 2007-04-20 04:09 config.sub*
-rwxr-xr-x 1 user user 18K 2007-06-07 21:28 depcomp*
-rwxr-xr-x 1 user user 13K 2007-06-07 21:28 install-sh*
-rw-r–r– 1 user user 23K 2007-06-14 16:53 intltool-extract.in
-rw-r–r– 1 user user 36K 2007-06-14 16:53 intltool-merge.in
-rw-r–r– 1 user user 28K 2007-06-14 16:53 intltool-update.in
-rw-r–r– 1 user user 193K 2006-03-11 19:49 ltmain.sh
-rwxr-xr-x 1 user user 11K 2007-06-07 21:28 missing*
-rwxr-xr-x 1 user user 2,0K 2007-06-14 16:52 mkinstalldirs*
drwxr-xr-x 2 user user 48 2007-06-14 17:51 po/

Etiquetas: , , , ,