GNOME Bugzilla – Bug 454777
Missing MAXPATHLEN declaration
Last modified: 2007-07-09 19:53:17 UTC
Hi, I'm unable to build gdm from HEAD (using jhbuild). Here's the error message: make[2]: Entering directory `/opt/svn/gnome2/gdm2/daemon' if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../common -DAUTHDIR=\"/opt/gnome2/var/gdm\" -DBINDIR=\"/opt/gnome2/bin\" -DDATADIR=\"/opt/gnome2/share\" -DDMCONFDIR=\"/opt/gnome2/etc/dm\" -DGDMCONFDIR=\"/opt/gnome2/etc/gdm\" -DGDMLOCALEDIR=\"/opt/gnome2/etc/gdm\" -DLIBDIR=\"/opt/gnome2/lib64\" -DLIBEXECDIR=\"/opt/gnome2/libexec\" -DLOGDIR=\"/var/log/gdm\" -DPIXMAPDIR=\"/opt/gnome2/share/pixmaps\" -DSBINDIR=\"/opt/gnome2/sbin\" -DGNOMELOCALEDIR=\""/opt/gnome2/share/locale"\" -DGDM_DEFAULTS_CONF=\"/opt/gnome2/share/gdm/defaults.conf\" -DGDM_CUSTOM_CONF=\"/opt/gnome2/etc/gdm/custom.conf\" -DGDM_OLD_CONF=\"/opt/gnome2/etc/gdm/gdm.conf\" -DPNG_NO_MMX_CODE -I/opt/gnome2/include/gtk-2.0 -I/opt/gnome2/lib64/gtk-2.0/include -I/opt/gnome2/include/atk-1.0 -I/opt/gnome2/include/cairo -I/opt/gnome2/include/pango-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include -I/opt/gnome2/include -I/opt/gnome2/include/libglade-2.0 -I/opt/gnome2/include/libxml2 -I/usr/include/freetype2 -I/usr/include/libpng12 -DPNG_NO_MMX_CODE -I/opt/gnome2/include/gtk-2.0 -I/opt/gnome2/lib64/gtk-2.0/include -I/opt/gnome2/include/atk-1.0 -I/opt/gnome2/include/cairo -I/opt/gnome2/include/pango-1.0 -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include -I/opt/gnome2/include -I/usr/include/freetype2 -I/usr/include/libpng12 -DLANG_CONFIG_FILE=\"/opt/gnome2/etc/sysconfig/i18n\" -DGREETERTHEMEDIR=\""/opt/gnome2/share/gdm/themes"\" -I/opt/gnome2/include/dbus-1.0 -I/opt/gnome2/lib64/dbus-1.0/include -I/opt/gnome2/include/glib-2.0 -I/opt/gnome2/lib64/glib-2.0/include -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -g -O2 -Wall -Wmissing-prototypes -Wno-strict-aliasing -Wno-sign-compare -MT slave.o -MD -MP -MF ".deps/slave.Tpo" -c -o slave.o slave.c; \ then mv -f ".deps/slave.Tpo" ".deps/slave.Po"; else rm -f ".deps/slave.Tpo"; exit 1; fi slave.c:4067: warning: no previous prototype for 'gdm_slave_parse_enriched_string' slave.c: In function 'gdm_slave_update_pseudo_device': slave.c:4124: error: 'MAXPATHLEN' undeclared (first use in this function) slave.c:4124: error: (Each undeclared identifier is reported only once slave.c:4124: error: for each function it appears in.) slave.c:4124: warning: unused variable 'buf' slave.c:4108: warning: unused variable 'pseudo_device' slave.c: In function 'gdm_slave_write_utmp_wtmp_record': slave.c:4238: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int' slave.c:4259: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int' slave.c:4271: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int' slave.c:4288: warning: field precision should have type 'int', but argument 4 has type 'long unsigned int' make[2]: *** [slave.o] Error 1
Created attachment 91402 [details] [review] Simple fix Created a simple patch to fix the issue: it checks if MAXPATHLEN is defined and otherwise try to use PATH_MAX (which should be defined on GNU systems)
+1 (laurent: on dirait qu'on passe un bout du week end a compiler gnome ;)
Build bug -> bumping priority. Thanks for the patch to fix this, Laurent. :-)
Thanks. Fixed in SVN head.