building libXt: undefined datarootdir

Lars Noschinski cebewee at gmx.de
Thu Jul 27 05:45:02 PDT 2006


* Enrico Weigelt <weigelt at metux.de> [2006-07-27 14:32]:
>* Shakaa <shakaa at wanadoo.fr> schrieb:
>> Hi,
>> 
>> I've got the same warning message with datarootdir undefined. I can't 
>> build the next package "libXmu" etc... because of this problem.
>> I hope somebody knows how to fix this.
>
>Some more details ?

That's probably the same problem I posted a few weeks ago which seems to be
related to autoconf 2.60. autoconf complains about an undefined variable
datarootdir. This undefined variable gets in the packages .po file and
pkg_config fails on this file, as it cannot expand the variable.

| I'm trying to build xorg from git with latest build.sh and I'm getting
| the following warning:
|
| | config.status: creating xt.pc
| | config.status: WARNING: xt.pc contains a reference to the variable `datarootdir'
| | which seems to be undefined.  Please make sure it is defined.
|
| Some occurs also for XCursor. This causes some other packages to fail to build:
|
| | checking for XSERVERCFLAGS... configure: error: Package requirements
| | (randrproto renderproto fixesproto >= 4.0 dama geproto xcmiscproto xextproto
| | xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto scrnsaverproto >=
| | 1.1 b igreqsproto resourceproto fontsproto inputproto xf86dgaproto videoproto
| | compositeproto >= 0.3 trapproto recordproto resourceproto xineramaproto
| | evieproto printproto xkbfile xfont xau fontenc xdmcp) were not met:
| | Variable 'datarootdir' not defined in '/home/lars/tmp/build-xorg/lib/pkgconfig/xt.pc'
| | Consider adjusting the PKG_CONFIG_PATH environment variable if you
| | installed software in a non-standard prefix.
|
| The generated xt.pc looks like the following:
|
| | prefix=/home/lars/tmp/build-xorg
| | exec_prefix=${prefix}
| | libdir=${exec_prefix}/lib
| | includedir=${prefix}/include
| | appdefaultdir=${datarootdir}/X11/app-defaults
| | | Name: Xt
| | Description: X Toolkit Library
| | Version: 1.0.2
| | Requires: xproto x11 sm
| | Requires.private: x11 sm
| | Cflags: -I${includedir}
| | Libs: -L${libdir} -lXt
|
| autoconf is version 2.59e

I worked around by changing libXt's configure.ac:

--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,7 @@ AC_ARG_WITH(appdefaultdir,
         AC_HELP_STRING([--with-appdefaultdir=<path>],
                        [Set app-default directory (default: ${datadir}/X11/app-defaults)]),
         [appdefaultdir="$withval"],
-       [appdefaultdir=${datadir}/X11/app-defaults])
+       [appdefaultdir=${prefix}/share/X11/app-defaults])
  AC_SUBST([appdefaultdir])
  
  # Replacement for Imake ToolkitStringsABIOptions, controls string tables

But this isn't a correct fix. See also

	http://www.gnu.org/software/autoconf/manual/html_node/Changed-Directory-Variables.html



More information about the xorg mailing list