Bug 29236 - COMPILEDDEFAULTFONTPATH set to incompletely expanded string
Summary: COMPILEDDEFAULTFONTPATH set to incompletely expanded string
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-25 02:52 UTC by Tilman Sauerbeck
Modified: 2018-06-12 18:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Tilman Sauerbeck 2010-07-25 02:52:12 UTC
This bug is in the 1.8.x series of xserver. I couldn't get the master branch to build because of missing dependencies, so I don't know whether it's fixed yet.

When running configure with no extra arguments, you will end up with
FONTPATH set to
   ${FONTROOTDIR}/misc/,${FONTROOTDIR}/TTF/,${FONTROOTDIR}/OTF/,${FONTROOTDIR}/Type1/,${FONTROOTDIR}/100dpi/,${FONTROOTDIR}/75dpi/

${FONTROOTDIR} in turn is defined as ${datadir}/fonts/X11, and ${datadir} is ${prefix}/share (or something, at least it references ${prefix}.
So there's three indirections there.

In configure.ac, we're using AC_DEFINE_DIR to expand FONTPATH and store the result in COMPILEDDEFAULTFONTPATH. Unfortunately, AC_DEFINE_DIR only evaluates the given variable twice, ie it resolves the ${FONTROOTDIR} and ${datadir} references, but it leaves ${prefix} unresolved.

That means that you end up with include/xorg-config.h #define'ing COMPILEDFONTPATH to a string literal that references ${prefix}.

COMPILEDFONTPATH is assigned to defaultFontPath in dix/globals.c and so you end up with that unexpanded string in the Xorg binary.
Comment 1 Adam Jackson 2018-06-12 18:44:28 UTC
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please file a new report if you continue to experience issues with a current server.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.