Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#16957 - [xrdb] Preprocessor fails since xorg-server-utils 7.5-2 (xrdb 1.0.6)

Attached to Project: Arch Linux
Opened by P.H. (Vain) - Sunday, 01 November 2009, 13:28 GMT
Last edited by Jan de Groot (JGC) - Sunday, 01 November 2009, 14:24 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Since I upgraded to xorg-server-utils 7.5-2, xrdb no longer processes any preprocessor statements in Xresource-files. This results in a weird looking XDM, for example (no colors, "CLIENTHOST" not replaced, etc).

This is caused by the way we configure our xrdb:

... --with-cpp=/usr/bin/mcpp\ -@old

Since xrdb 1.0.6 (git commit fc0b73673a7b91b386d8a346652f9cc0c4a68d44 in git://anongit.freedesktop.org/git/xorg/app/xrdb) they use an additional check whether the given preproc-program is accessible/executable. This done via access(). As we pass an argument to mcpp (the "-@old"), this string (as a whole) is tested for accessibility: "/usr/bin/mcpp -@old". Of course, this fails. Hence, no preprocessor is invoked at all.


Steps to reproduce:

$ cat > /tmp/someXresource <<EOF
#ifdef COLOR
hello*world: HAS_COLORS
#else
hello*world: NO_COLORS
#endif
EOF

$ xrdb -merge /tmp/someXresource
xrdb: "hello*world" on line 4 overrides entry on line 2

$ xrdb -query
...
hello*world: NO_COLORS


Quick workaround/fix:

Configure xrdb for the use with "cpp":

... --with-cpp=/usr/bin/cpp

Doing so won't give an error message and set "hello*world: HAS_COLORS" in the example above (or well, it should do so because "COLOR" should be defined). However, this adds a dependency for "gcc" to the package. Maybe "mcpp" without the "-@old" would do it? Dunno.
This task depends upon

Closed by  Jan de Groot (JGC)
Sunday, 01 November 2009, 14:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  Should be fixed with 7.5-3.

Loading...