The configure scripts for xdm, lbxproxy, and xfs do not define the _XOPEN_SOURCE macro on Hurd systems, causing these packages to fail to build. The only time they do define this macro is on Linux systems. xdm uses crypt(), so it #includes <unistd.h>. glibc requires _XOPEN_SOURCE to be defined when that header file is included, if you wish to use crypt(3): http://unixhelp.ed.ac.uk/CGI/man-cgi?crypt+3 lbxproxy manipulates the fds_bits member of variables of type fd_set, a typedefed struct. This member is normally named __fds_bits on glibc systems, unless _XOPEN_SOURCE is defined. This doesn't seem to be documented in select(3); read the definition for fd_set in /usr/include/sys/select.h on a glibc machine. xfs does the same fds_bits manipulation as lbxproxy. In all three programs, working around the problem by modifying the configure scripts directly results in correct builds[1] for me. Here's an example patch for xdm: --- configure.orig 2006-05-20 18:45:58.000000000 -0700 +++ configure 2006-06-20 20:00:11.000000000 -0700 @@ -21964,7 +21964,7 @@ case $host_os in - linux*) + linux*|gnu*) OS_CFLAGS="-D_XOPEN_SOURCE" SU="su" ;; A better solution, apart from of course modifying configure.ac, would be to base the condition on whether the system uses glibc, rather than what the host kernel is. I've only compiled the subset of X11R7.1 on The Hurd that I felt I needed to run the various X clients. This same problem could also be in the X server, or elsewhere. ----- 1. Except for xdm, which I'm reporting other bugs on. I have not yet tested lbxproxy or xfs in any capacity.
I've put the simple fix shown into xdm CVS head for now until someone figures out a better solution on testing for the __GLIBC__ define or something similar. CVSROOT: /cvs/xorg Module name: app Changes by: alanc@kemper.freedesktop.org 06/06/27 16:33:26 Log message: 2006-06-27 Alan Coopersmith <alan.coopersmith@sun.com> * configure.ac: Bugzilla #7317 <https://bugs.freedesktop.org/show_bug.cgi?id=7317> xdm needs to define _XOPEN_SOURCE to build on Hurd (J.P. Larocque) Modified files: app/xdm/: ChangeLog configure.ac Revision Changes Path 1.55 +6 -0 app/xdm/ChangeLog http://webcvs.freedesktop.org/xorg/app/xdm/ChangeLog 1.43 +2 -2 app/xdm/configure.ac http://webcvs.freedesktop.org/xorg/app/xdm/configure.ac
The same holds for GNU/kFreeBSD. Could you please change detection by case $host_os in - linux*|gnu*) + linux*|gnu*|*-gnu) OS_CFLAGS="-D_XOPEN_SOURCE" SU="su" ;; Thanks in advance. Petr
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
xfs should also be fixed now, since AC_USE_SYSTEM_EXTENSIONS was added to it's configure.ac.
(In reply to comment #4) > xfs should also be fixed now, since AC_USE_SYSTEM_EXTENSIONS was added > to it's configure.ac. xdm has been switched to AC_USE_SYSTEM_EXTENSIONS too, and lbxproxy is no longer actively maintained, so closing as fixed.
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.