Opened 16 years ago

Closed 16 years ago

#2119 closed task (fixed)

Wrong datadir for xorg 7.1 : -> --datadir=$XORG_PREFIX/lib"

Reported by: EdB Owned by: blfs-book@…
Priority: normal Milestone: 6.2.0
Component: BOOK Version: SVN
Severity: normal Keywords:


for xorg 7.1, datadir is set to --datadir=$XORG_PREFIX/lib" . This swith cause aclocal file and icons file at least to be install in $XORG_PREFIX/lib despite they will better be in $XORG_PREFIX/share

Change History (6)

comment:1 by Bryan Kadzban, 16 years ago

I've just built almost all of 7.1 with --datadir=$XORG_PREFIX/share. (I used /usr/lib on a bunch of packages at the beginning, but they were all protocol header packages, which don't use /usr/share anyway. I also didn't build xprint (or stuff that requires it) at all, because it requires Mesa. Since I use an nvidia card, I don't have (or want) Mesa. I also didn't build most of the drivers, only the 12 or so that I have hardware for.)

I haven't seen any problems so far with that decision, though a lot of packages put non-library stuff into /usr/lib (e.g. fonts -- I let the fonts install into /usr/lib/X11/lib/fonts/ to kinda match the old layout of XFree -- and xorg-cf-files, which put themselves into /usr/lib/X11/config).

I did have a couple issues with drivers being installed in the wrong place (this is a multilib system, and they put themselves in /usr/lib because I neglected to tell them --libdir=/usr/lib64). But that's unrelated to the issue here, and they were all really 64-bit files, so I just moved them and Xorg was happy.

So anyway, on this system at least (CLFS 1.0.0-rc4 base, multilib setup), it didn't cause any apparent problems to install with --datadir=$XORG_PREFIX/share instead of lib. Of course the only things in /usr/share now are files named XErrorDB, XKeysymDB, rgb.txt, and, and directories named app-defaults and xkb (that stuff is not duplicated in any of my lib*/X11 directories, though).

Based on my experience, I'd say change XORG_CONFIG to --datadir=$XORG_PREFIX/share instead. (Unless somebody knows where the original discussion that put in the --datadir switch is? I tried blfs-dev, but couldn't find anything. Maybe I was searching for the wrong strings again.)

comment:2 by Luca, 16 years ago

I think that the datadir could switched by adding some lines to file in /etc/profile.d.

Mine looks like that:

if [ -x /usr/X11R7/bin/Xorg ]; then

pathappend /usr/X11R7/bin


if [ -d /usr/X11R7/lib/pkgconfig ]; then

pathappend /usr/X11R7/lib/pkgconfig PKG_CONFIG_PATH


if [ -d /usr/X11R7/lib/aclocal ]; then

export ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I/usr/X11R7/lib/aclocal"


I used this method and ran into no problems (tried this way with other packages like Gnome-2.14.2, Gnome-2.16.0 and e17 (new enlightenment version actually in development).

comment:3 by DJ Lucas, 16 years ago

The datadir switch controlls other items as well, namely the location of some of the packages' default config files and fonts installation. I can't recall exactly why that was chosen, but no doubt it was my doing. What we have now, I believe, is the most consistent way to do things for 200 packages. I personally would rather keep the X installed files completely separate from the rest of the system given the possibility of installing to an alternate prefix. The ACLOCAL_FLAGS solution above is probably best. I don't have an X6 installation to check against, but I don't recall a share directory in /usr/X11R6/ either. Now, for a /usr installation, moving the files would be perfect, but that complicates difficult instructions even more.

comment:4 by dnicholson@…, 16 years ago

Meant to comment last night. I've really been looking closely at this and I think dropping the --datadir switch would work. At 7.0, some of the autotools weren't fixed up right, so this made sense. But now, all the right built in paths are fixed. An the autoconf macros going into ${libdir} is bad.

Above I expressed a concern about the app-defaults directory. Turns out that X will search through a whole slew of directories to find these settings. This is defined in libXt. Do strings on libXt, and after a while you'll find the search path with a bunch of tokens in it. The default path it tells other packages about (if they want to query) is ${datadir}/X11/app-defaults. It's in pkgconfig/xt.pc. But, that doesn't matter as it will look in /etc/X11, /usr/lib/X11, etc.

Everything else like the xkb database, rgb settings, stuff that the xserver needs to know about, I think these all take the correct path by default now, which is in ${datadir}/X11.

The fonts that I checked go to ${libdir}/X11. This is also the default path in the xserver. Also checked libXfont, and it expects the font encodings to be in ${libdir}/X11/fonts/encodings. Checked libfontenc and encodings. The paths defined there are ${libdir}/X11/fonts/encodings. Checked font-alias and font-misc-misc. They both expect the fonts in ${libdir}/X11/fonts.

comment:5 by Luca, 16 years ago

I had the idea of ACLOCAL_FLAGS some months ago and I tried that, I ran into no problems for packages that searched for Xorg and Gnome-<version> macros, however one or two weeks ago setting ACLOCAL_FLAGS broke every I ran and I updated nothing of the base system; a morning a of a package (I don't remember which one) started falling complaing about this setting, so I tried other packages from svn, cvs and git and each had the that broke and ended up with errors. I'm investingating deeper and actually I'm trying another solution.

comment:6 by dnicholson@…, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r6376.

I changed xterm to install to the right app-defaults dir. This is really asthetic, though, as the X Toolkit library libXt goes looking through a lot of paths to find the settings. It steps through ${sysconfdir}/X11/app-defaults, then ${datadir}/X11/app-defaults first, then through ${libdir}/X11/app-defaults.

Someone may want to look at lesstif, but I don't use it and don't think it would be affected anyway.

Note: See TracTickets for help on using tickets.