Bug 8709 - Compile error at origin/master samb3/smbd/utmp.c
Summary: Compile error at origin/master samb3/smbd/utmp.c
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: Build environment (show other bugs)
Version: unspecified
Hardware: x86 FreeBSD
: P5 normal
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
Depends on:
Reported: 2012-01-17 11:39 UTC by Christoph Theis
Modified: 2012-09-12 21:23 UTC (History)
1 user (show)

See Also:

make and config log files (889.18 KB, application/zip)
2012-01-17 11:39 UTC, Christoph Theis
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Theis 2012-01-17 11:39:32 UTC
Created attachment 7243 [details]
make and config log files

Compiling origin/master I get a compile error at source3/smbd/utmp.c (see make.log in attached file).
My system is FreeBSD 9.0. There is no utmp.h anymore in the base but a utmpx.h. configure notices this, but in the make.log I see that WITH_UTMP_H is set nonetheless.
Comment 1 Matthias Dieter Wallnöfer 2012-01-17 20:02:27 UTC
The bugs lie in Samba 3.x-specific parts of the WAF build system.
Comment 2 Matthias Dieter Wallnöfer 2012-02-23 16:51:45 UTC
A fix is on the way to "master" (currently under autobuild) - http://gitweb.samba.org/samba.git/?p=mdw/samba.git;a=commitdiff;h=cd995e6c5d5f9c0a27ea08101185da3575bb83eb.
Comment 3 Christoph Theis 2012-02-23 17:58:43 UTC
utmp.c compiles if I add
#ifndef HAVE_UTMP_H
# define utmp utmpx
# define HAVE UT_UT_TV

I know, this is not good style :) I did it to check what is missing.
Comment 4 Christoph Theis 2012-03-06 15:32:05 UTC
It still doesn't compile, also not on alpha-18. 
FreeBSD doesn't have neither an utmp.h (that is fixed) nor a "struct utmp" (which is still used in utmp.c and causes the compile errors).

My guess is that utmp.c needs some major rework to have a path with "struct utmpx" when that is available and some fallbacks to "struct utmp" and even without anything.
Comment 5 Volker Lendecke 2012-03-14 11:29:33 UTC
After the configure phase, you should manually edit bin/default/include/config.h and comment out the WITH_UTMP line. That works for me.
Comment 6 Björn Jacke 2012-09-12 21:23:14 UTC
the waf build isn't supported in 3.6. I guess it works for you in latest 4.0 (pre)release ? Please reopen this bug ... thanks!