When I compile Samba 4 alpha 17, I get the following error when compiling for plain tdb (and not tdb2): In file included from ../source4/ntvfs/common/brlock.c:29: ../lib/tdb_compat/tdb_compat.h:105:17: error: tdb.h: No such file or directory In file included from ../source4/ntvfs/common/brlock.c:29: ../lib/tdb_compat/tdb_compat.h:111: error: expected declaration specifiers or '...' before 'tdb_log_func' ../lib/tdb_compat/tdb_compat.h: In function 'tdb_open_compat': ../lib/tdb_compat/tdb_compat.h:113: error: storage size of 'lctx' isn't known ../lib/tdb_compat/tdb_compat.h:114: error: 'log_fn' undeclared (first use in this function) ../lib/tdb_compat/tdb_compat.h:114: error: (Each undeclared identifier is reported only once ../lib/tdb_compat/tdb_compat.h:114: error: for each function it appears in.) ../lib/tdb_compat/tdb_compat.h:119: warning: return makes pointer from integer without a cast ../lib/tdb_compat/tdb_compat.h:121: warning: return makes pointer from integer without a cast ../lib/tdb_compat/tdb_compat.h: At top level: ../lib/tdb_compat/tdb_compat.h:126: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tdb_nextkey_compat' Waf: Leaving directory `/usr/ports/net/samba4/work/samba-4.0.0alpha17/bin' So the compiler can't find tdb.h. I have two tdb.h in the system: One coming from FreeBSD ports system under /usr/local/include, the other coming from Samba under lib/tdb/include, but neither path is in the include path. Strange is, somewhat before the file messaging.c, also requiring tdb.h, compiled just fine, but there, /usr/local/include was in the compilers include path. I have no idea what would be the right tdb.h. And I could not figure out where "-I/usr/local/include" would enter the build system, I could not find any reference to it. And nowhere had lib/tdb/include in the compilers include path.
Please remove the "tdb_compat.h" include in "source4/ntvfs/common/brlock.c" and rebuild. We will push a fix in the GIT repo as soon as possible.
Please tell us if that was enough otherwise we have to look further.
When I comment out "#include <tdb_compat.h>" in brlock.c, that file will compile fine. But brlock_tdb.c will not and there I cannot comment out tdb_compat.h as it does use tdb. Btw., where is defined that some modules are compiled with /usr/local/include added to the include path and some are not? I tried to understand the build scripts but I'm hopelessly lost ...
I with the help of Jelmer worked out a new attempt - here the patch: http://gitweb.samba.org/samba.git/?p=mdw/samba.git;a=commitdiff;h=7669bf7868264390abfd73100e421cabd1d3fea1 Also this will land in the GIT repo as soon as possible.
You will have to evaluate "bin/config.log". (In reply to comment #3) > Btw., where is defined that some modules are compiled with /usr/local/include > added to the include path and some are not? I tried to understand the build > scripts but I'm hopelessly lost ...
Did the situation improve? Can we close this issue?
With the patched wscript_build source4/ntvfs/common builds without error. But in source3/registry/reg_perfcount.c I have the same problem, tdb.h not found. reg_perfcount.c uses tdb so commenting out the offending include would not help. Unfortunately I don't see a wscript_build file in this directory so I can't check if the same fix would help here.
Günther, you seem to be a maintainer of s3's WAF part. Would you like to look into this (source3/registry/reg_perfcount.c doesn't find "tdb.h")?
Kai, could you help out please? We need to make sure that "source3/registry/reg_perfcount.c" does find "tdb.h" in the combined WAF build (see comments above). Probably a WAF dependency is missing. Do you have an idea where this might be?
I'll need the complete current error and the config.log file
Created attachment 6957 [details] Logs of the compile error Contains config.log (of ./configure) and make.log (of waf -vvv) of a non-development build
Created attachment 6960 [details] patch to get tdb headers and correct dep on tdb I'll take build bugs for now, as I'm most active on this. Try the attached patch. The issue here is that you have a copy of tdb already installed on this host - I have already tested a compile of Samba4 on FreeBSD and it worked fine.
It will now fail in source3/libnet/libnet_dssync_passdb.c with the same error (file tdb.h not found)
You are right: When I deinstall tdb samba-4 will compile just fine. I don't know when tdb came onto my host, it has no dependent ports. Maybe when I installed some Samba version from the ports tree some time ago.
Created attachment 6963 [details] Patch which fixes the libnet dependency on tdb Christoph, do you still have the possibility to test with the installed TDB package? So we could track down all stumbling blocks. Attached the patch for fixing the libnet issue.
With the last patch the build completes. Thank you very much for supplying the patches so fast.
Thank you both. Matthias, Please autobuild these patches.
Okay, patches committed to autobuild, marking as "FIXED".