GNOME Bugzilla – Bug 450453
Can not build SVN trunk using jhbuild
Last modified: 2007-06-26 05:49:26 UTC
Please describe the problem: Can not build SVN trunk using jhbuild Steps to reproduce: 1. jhbuild buildone gdm2 Actual results: slave.c: In function ‘gdm_slave_write_utmp_wtmp_record’: slave.c:4165: error: ‘struct utmpx’ has no member named ‘ut_syslen’ slave.c:4167: error: ‘struct utmpx’ has no member named ‘ut_syslen’ slave.c:4170: error: ‘struct utmpx’ has no member named ‘ut_syslen’ slave.c:4177: warning: implicit declaration of function ‘updwtmpx’ slave.c:4177: warning: nested extern declaration of ‘updwtmpx’ slave.c:4185: warning: suggest parentheses around && within || slave.c:4221: error: ‘struct __exit_status’ has no member named ‘e_termination’ slave.c:4222: error: ‘struct __exit_status’ has no member named ‘e_exit’ slave.c:4069: warning: unused variable ‘host_name’ slave.c: In function ‘gdm_slave_exec_script’: slave.c:5590: warning: unused variable ‘ctrun’ make[2]: *** [slave.o] Error 1 make[2]: Leaving directory `/opt/svn/gnome2-20/gdm2/daemon' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/svn/g Expected results: Does this happen every time? Other information:
Ariel: Thanks for catching this. I did expect that this change would cause some problems on Linux. The issue here is that utmp/utmpx has different implementations on different platforms, so typically this code has to be #ifdefed to get it to work. Based on your error messages, we probably need the following: - A check in configure to see if the utmpx structure has a ut_syslen member and only set these if it does. - On Solaris, the ut_exit structure is probably different on Linux, again probably need some configure testing to set this properly on Linux. - I'm not sure why including utmpx.h results in implicit declaration of function updwtmpx. Is this because you need a different header to also be included, or because the function to be called is different on Linux? I cleaned up the code in SVN head a bit to fix the unused variable and parens around the if-test it is complaining about.
I updated the code and I am getting almost the same output: slave.c: In function ‘gdm_slave_write_utmp_wtmp_record’: slave.c:4164: error: ‘struct utmpx’ has no member named ‘ut_syslen’ slave.c:4166: error: ‘struct utmpx’ has no member named ‘ut_syslen’ slave.c:4169: error: ‘struct utmpx’ has no member named ‘ut_syslen’ slave.c:4176: warning: implicit declaration of function ‘updwtmpx’ slave.c:4176: warning: nested extern declaration of ‘updwtmpx’ slave.c:4220: error: ‘struct __exit_status’ has no member named ‘e_termination’ slave.c:4221: error: ‘struct __exit_status’ has no member named ‘e_exit’ make[2]: *** [slave.o] Error 1 ariel
Right. I only fixed the warnings that were unrelated to utmp. I can't easily fix this for you since I don't have access to a Linux machine. I already pinged Ray Strode to look at this. The fix shouldn't be hard, but someone needs to take a look at the structures that are present on your distro and add some configure checking so that we make the right calls and set the structure properly.
Note bug #450453
Doh, I mean note bug #347871. That was the enhancement request where the feature was added that is causing this issue.
Thanks, Ray. This should now be fixed. If you find it is still broken, then reopen the bug. utmp logic tends to be very distro specific so there might still be some issues we find in this code on various distros.
I can build on ubuntu now. ariel