samba44 build failure on 11.0 p2

Hi, I'm trying to install net/samba44 on a fresh installation of FreeBSD-11.0:
Code:
uname -a
FreeBSD giskard 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
Code:
freebsd-version
11.0-RELEASE-p2

All options are set to default:
Code:
make showconfig
===> The following configuration options are available for samba44-4.4.5_1:
     ACL_SUPPORT=on: File system ACL support
     ADS=on: Active Directory client support
     AD_DC=on: Active Directory Domain Controller support
     CUPS=off: CUPS printing system support
     DEBUG=on: Build with debugging support
     DEVELOPER=off: With development support
     DNSUPDATE=on: Dynamic DNS update (require ADS)
     DOCS=on: Build and/or install documentation
     EXP_MODULES=off: Experimental modules
     FAM=on: File Alteration Monitor support
     LDAP=on: LDAP client support
     MANPAGES=off: Build manpages from DOCBOOK templates
     PTHREADPOOL=on: Pthread pool
     QUOTAS=on: Disk quota support
     SYSLOG=on: Syslog logging support
     UTMP=on: UTMP accounting support
====> Options available for the radio DNS: you can only select none or one of them
     NSUPDATE=off: Use samba NSUPDATE utility for AD DC
     BIND99=off: Use bind99 as AD DC DNS server frontend
     BIND910=off: Use bind910 as AD DC DNS server frontend
====> Options available for the radio ZEROCONF: you can only select none or one of them
     AVAHI=off: Zeroconf support via Avahi
     MDNSRESPONDER=off: Zeroconf support via mDNSResponder
===> Use 'make config' to modify these settings

The build fails with the following errors:
Code:
[2490/3804] Compiling source3/libsmb/libsmb_file.c
runner cc -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fno-color-diagnostics -g -fstack-protector -DLDAP_DEPRECATED -fno-strict-aliasing -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTATIC_smbclient_MODULES=NULL -DSTATIC_smbclient_MODULES_PROTO=extern void __smbclient_dummy_module_proto(void) -MD -I/usr/local/include -DLIBICONV_PLUG -Idefault/source3/libsmb -I../source3/libsmb -Idefault/source3 -I../source3 -Idefault/source3/include -I../source3/include -Idefault/source3/lib -I../source3/lib -Idefault/source4/heimdal/lib/com_err -I../source4/heimdal/lib/com_err -Idefault/source4/heimdal/lib/krb5 -I../source4/heimdal/lib/krb5 -Idefault/source4/heimdal/lib/gssapi -I../source4/heimdal/lib/gssapi -Idefault/source4/heimdal_build -I../source4/heimdal_build -Idefault/bin/default/source4/heimdal/lib/asn1 -Idefault/source4/heimdal/lib/asn1 -Idefault -I../../../../../../local/include -Idefault/include/public -I../include/public -Idefault/source4 -I../source4 -Idefault/lib -I../lib -Idefault/source4/lib -I../source4/lib -Idefault/source4/include -I../source4/include -Idefault/include -I../include -Idefault/lib/replace -I../lib/replace -Idefault -I.. -Idefault/lib/param -I../lib/param -Idefault/source4/heimdal/lib/hcrypto/libtommath -I../source4/heimdal/lib/hcrypto/libtommath -Idefault/source4/heimdal/lib/asn1 -I../source4/heimdal/lib/asn1 -Idefault/source4/heimdal/lib/hx509 -I../source4/heimdal/lib/hx509 -Idefault/libcli/ldap -I../libcli/ldap -Idefault/librpc -I../librpc -Idefault/source4/heimdal/lib/roken -I../source4/heimdal/lib/roken -Idefault/source4/heimdal/include -I../source4/heimdal/include -Idefault/source4/dsdb -I../source4/dsdb -Idefault/source4/lib/http -I../source4/lib/http -Idefault/libcli/auth -I../libcli/auth -Idefault/lib/addns -I../lib/addns -Idefault/auth/gensec -I../auth/gensec -Idefault/auth/credentials -I../auth/credentials -Idefault/lib/krb5_wrap -I../lib/krb5_wrap -Idefault/lib/ldb-samba -I../lib/ldb-samba -Idefault/source4/heimdal/base -I../source4/heimdal/base -Idefault/source4/lib/socket -I../source4/lib/socket -Idefault/libcli/registry -I../libcli/registry -Idefault/source4/librpc -I../source4/librpc -Idefault/source4/auth/kerberos -I../source4/auth/kerberos -Idefault/source4/param -I../source4/param -Idefault/lib/socket -I../lib/socket -Idefault/lib/util/charset -I../lib/util/charset -Idefault/source4/lib/events -I../source4/lib/events -Idefault/source3/lib/poll_funcs -I../source3/lib/poll_funcs -Idefault/lib/async_req -I../lib/async_req -Idefault/source4/auth/gensec -I../source4/auth/gensec -Idefault/nsswitch/libwbclient -I../nsswitch/libwbclient -Idefault/auth/kerberos -I../auth/kerberos -Idefault/source4/heimdal/lib/gssapi/gssapi -I../source4/heimdal/lib/gssapi/gssapi -Idefault/source4/heimdal/lib/gssapi/spnego -I../source4/heimdal/lib/gssapi/spnego -Idefault/source4/heimdal/lib/gssapi/krb5 -I../source4/heimdal/lib/gssapi/krb5 -Idefault/source4/heimdal/lib/gssapi/mech -I../source4/heimdal/lib/gssapi/mech -Idefault/source4/auth -I../source4/auth -Idefault/lib/dbwrap -I../lib/dbwrap -Idefault/source3/lib/pthreadpool -I../source3/lib/pthreadpool -Idefault/libcli/netlogon -I../libcli/netlogon -Idefault/libcli/security -I../libcli/security -Idefault/nsswitch -I../nsswitch -Idefault/auth/ntlmssp -I../auth/ntlmssp -Idefault/libcli/nbt -I../libcli/nbt -Idefault/libcli/drsuapi -I../libcli/drsuapi -Idefault/source4/libcli -I../source4/libcli -Idefault/lib/tsocket -I../lib/tsocket -Idefault/source4/heimdal/lib/wind -I../source4/heimdal/lib/wind -Idefault/source4/lib/tls -I../source4/lib/tls -Idefault/libds/common -I../libds/common -Idefault/source4/heimdal/lib/hcrypto -I../source4/heimdal/lib/hcrypto -Idefault/source4/heimdal/lib -I../source4/heimdal/lib -Idefault/source3/librpc -I../source3/librpc -Idefault/auth -I../auth -Idefault/libcli/cldap -I../libcli/cldap -Idefault/libcli/util -I../libcli/util -Idefault/libcli/smb -I../libcli/smb -Idefault/libcli/lsarpc -I../libcli/lsarpc -Idefault/source4/libcli/ldap -I../source4/libcli/ldap -Idefault/dynconfig -I../dynconfig -Idefault/source3/param -I../source3/param -Idefault/lib/compression -I../lib/compression -Idefault/source4/lib/stream -I../source4/lib/stream -Idefault/source3/lib/unix_msg -I../source3/lib/unix_msg -Idefault/lib/crypto -I../lib/crypto -Idefault/lib/smbconf -I../lib/smbconf -I/usr/local/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../source3/libsmb/libsmb_dir.c -c -o default/source3/libsmb/libsmb_dir_1.o
runner cc -pipe -fno-omit-frame-pointer -DLIBICONV_PLUG -fno-color-diagnostics -g -fstack-protector -DLDAP_DEPRECATED -fno-strict-aliasing -fPIC -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTATIC_smbclient_MODULES=NULL -DSTATIC_smbclient_MODULES_PROTO=extern void __smbclient_dummy_module_proto(void) -MD -I/usr/local/include -DLIBICONV_PLUG -Idefault/source3/libsmb -I../source3/libsmb -Idefault/source3 -I../source3 -Idefault/source3/include -I../source3/include -Idefault/source3/lib -I../source3/lib -Idefault/source4/heimdal/lib/com_err -I../source4/heimdal/lib/com_err -Idefault/source4/heimdal/lib/krb5 -I../source4/heimdal/lib/krb5 -Idefault/source4/heimdal/lib/gssapi -I../source4/heimdal/lib/gssapi -Idefault/source4/heimdal_build -I../source4/heimdal_build -Idefault/bin/default/source4/heimdal/lib/asn1 -Idefault/source4/heimdal/lib/asn1 -Idefault -I../../../../../../local/include -Idefault/include/public -I../include/public -Idefault/source4 -I../source4 -Idefault/lib -I../lib -Idefault/source4/lib -I../source4/lib -Idefault/source4/include -I../source4/include -Idefault/include -I../include -Idefault/lib/replace -I../lib/replace -Idefault -I.. -Idefault/lib/param -I../lib/param -Idefault/source4/heimdal/lib/hcrypto/libtommath -I../source4/heimdal/lib/hcrypto/libtommath -Idefault/source4/heimdal/lib/asn1 -I../source4/heimdal/lib/asn1 -Idefault/source4/heimdal/lib/hx509 -I../source4/heimdal/lib/hx509 -Idefault/libcli/ldap -I../libcli/ldap -Idefault/librpc -I../librpc -Idefault/source4/heimdal/lib/roken -I../source4/heimdal/lib/roken -Idefault/source4/heimdal/include -I../source4/heimdal/include -Idefault/source4/dsdb -I../source4/dsdb -Idefault/source4/lib/http -I../source4/lib/http -Idefault/libcli/auth -I../libcli/auth -Idefault/lib/addns -I../lib/addns -Idefault/auth/gensec -I../auth/gensec -Idefault/auth/credentials -I../auth/credentials -Idefault/lib/krb5_wrap -I../lib/krb5_wrap -Idefault/lib/ldb-samba -I../lib/ldb-samba -Idefault/source4/heimdal/base -I../source4/heimdal/base -Idefault/source4/lib/socket -I../source4/lib/socket -Idefault/libcli/registry -I../libcli/registry -Idefault/source4/librpc -I../source4/librpc -Idefault/source4/auth/kerberos -I../source4/auth/kerberos -Idefault/source4/param -I../source4/param -Idefault/lib/socket -I../lib/socket -Idefault/lib/util/charset -I../lib/util/charset -Idefault/source4/lib/events -I../source4/lib/events -Idefault/source3/lib/poll_funcs -I../source3/lib/poll_funcs -Idefault/lib/async_req -I../lib/async_req -Idefault/source4/auth/gensec -I../source4/auth/gensec -Idefault/nsswitch/libwbclient -I../nsswitch/libwbclient -Idefault/auth/kerberos -I../auth/kerberos -Idefault/source4/heimdal/lib/gssapi/gssapi -I../source4/heimdal/lib/gssapi/gssapi -Idefault/source4/heimdal/lib/gssapi/spnego -I../source4/heimdal/lib/gssapi/spnego -Idefault/source4/heimdal/lib/gssapi/krb5 -I../source4/heimdal/lib/gssapi/krb5 -Idefault/source4/heimdal/lib/gssapi/mech -I../source4/heimdal/lib/gssapi/mech -Idefault/source4/auth -I../source4/auth -Idefault/lib/dbwrap -I../lib/dbwrap -Idefault/source3/lib/pthreadpool -I../source3/lib/pthreadpool -Idefault/libcli/netlogon -I../libcli/netlogon -Idefault/libcli/security -I../libcli/security -Idefault/nsswitch -I../nsswitch -Idefault/auth/ntlmssp -I../auth/ntlmssp -Idefault/libcli/nbt -I../libcli/nbt -Idefault/libcli/drsuapi -I../libcli/drsuapi -Idefault/source4/libcli -I../source4/libcli -Idefault/lib/tsocket -I../lib/tsocket -Idefault/source4/heimdal/lib/wind -I../source4/heimdal/lib/wind -Idefault/source4/lib/tls -I../source4/lib/tls -Idefault/libds/common -I../libds/common -Idefault/source4/heimdal/lib/hcrypto -I../source4/heimdal/lib/hcrypto -Idefault/source4/heimdal/lib -I../source4/heimdal/lib -Idefault/source3/librpc -I../source3/librpc -Idefault/auth -I../auth -Idefault/libcli/cldap -I../libcli/cldap -Idefault/libcli/util -I../libcli/util -Idefault/libcli/smb -I../libcli/smb -Idefault/libcli/lsarpc -I../libcli/lsarpc -Idefault/source4/libcli/ldap -I../source4/libcli/ldap -Idefault/dynconfig -I../dynconfig -Idefault/source3/param -I../source3/param -Idefault/lib/compression -I../lib/compression -Idefault/source4/lib/stream -I../source4/lib/stream -Idefault/source3/lib/unix_msg -I../source3/lib/unix_msg -Idefault/lib/crypto -I../lib/crypto -Idefault/lib/smbconf -I../lib/smbconf -I/usr/local/include -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H=1 -D_GNU_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 ../source3/libsmb/libsmb_file.c -c -o default/source3/libsmb/libsmb_file_1.o
In file included from ../source3/libsmb/libsmb_cache.c:26:
../source3/include/libsmb_internal.h:249:17: error: unknown type name 'smbc_splice_fn'
                smbc_splice_fn                  splice_fn;
                ^
../source3/include/libsmb_internal.h:250:3: error: unknown type name 'smbc_notify_fn'
                smbc_notify_fn                  notify_fn;
                ^
In file included from ../source3/libsmb/libsmb_context.c:28:
../source3/include/libsmb_internal.h:249:17: error: unknown type name 'smbc_splice_fn'
                smbc_splice_fn                  splice_fn;
                ^
In file included from ../source3/libsmb/libsmb_dir.c:29:
../source3/include/libsmb_internal.h:249:17: error: unknown type name 'smbc_splice_fn'
                smbc_splice_fn                  splice_fn;
                ^
In file included from ../source3/libsmb/libsmb_file.c:28:
../source3/include/libsmb_internal.h:249:17: error: unknown type name 'smbc_splice_fn'
                smbc_splice_fn                  splice_fn;
                ^
../source3/include/libsmb_internal.h:250:3: error: unknown type name 'smbc_notify_fn'
                smbc_notify_fn                  notify_fn;
                ^
../source3/include/libsmb_internal.h:250:3: error: unknown type name 'smbc_notify_fn'
                smbc_notify_fn                  notify_fn;
                ^
../source3/include/libsmb_internal.h:351:3: error: unknown type name 'smbc_notify_callback_fn'
                smbc_notify_callback_fn cb, void *private_data);
                ^
../source3/include/libsmb_internal.h:250:3: error: unknown type name 'smbc_notify_fn'
                smbc_notify_fn                  notify_fn;
                ^
3 errors generated.
../source3/include/libsmb_internal.h:351:3: error: unknown type name 'smbc_notify_callback_fn'
                smbc_notify_callback_fn cb, void *private_data);
                ^
../source3/include/libsmb_internal.h:351:3: error: unknown type name 'smbc_notify_callback_fn'
                smbc_notify_callback_fn cb, void *private_data);
                ^
../source3/include/libsmb_internal.h:351:3: error: unknown type name 'smbc_notify_callback_fn'
                smbc_notify_callback_fn cb, void *private_data);
                ^
../source3/libsmb/libsmb_context.c:170:9: warning: implicit declaration of function 'smbc_setPort' is invalid in C99 [-Wimplicit-function-declaration]
        smbc_setPort(context, 0);
        ^
../source3/libsmb/libsmb_context.c:197:9: warning: implicit declaration of function 'smbc_setFunctionSplice' is invalid in C99 [-Wimplicit-function-declaration]
        smbc_setFunctionSplice(context, SMBC_splice_ctx);
        ^
../source3/libsmb/libsmb_context.c:217:9: warning: implicit declaration of function 'smbc_setFunctionNotify' is invalid in C99 [-Wimplicit-function-declaration]
        smbc_setFunctionNotify(context, SMBC_notify_ctx);
        ^
3 warnings and 3 errors generated.
3 errors generated.
../source3/libsmb/libsmb_dir.c:2059:2: error: unknown type name 'smbc_notify_callback_fn'
        smbc_notify_callback_fn cb;
        ^
../source3/libsmb/libsmb_dir.c:2070:2: error: unknown type name 'smbc_notify_callback_fn'
        smbc_notify_callback_fn cb, void *private_data)
        ^
../source3/libsmb/libsmb_dir.c:2130:45: error: array has incomplete element type 'struct smbc_notify_callback_action'
                struct smbc_notify_callback_action actions[num_changes];
                                                          ^
../source3/libsmb/libsmb_dir.c:2130:10: note: forward declaration of 'struct smbc_notify_callback_action'
                struct smbc_notify_callback_action actions[num_changes];
                       ^
../source3/libsmb/libsmb_dir.c:2197:11: error: unknown type name 'smbc_notify_callback_fn'
                               smbc_notify_callback_fn cb, void *private_data)
                               ^
../source3/libsmb/libsmb_dir.c:2227:3: error: unknown type name 'smbc_notify_callback_fn'
                smbc_notify_callback_fn cb, void *private_data)
                ^
8 errors generated.
Waf: Leaving directory `/usr/ports/net/samba44/work/samba-4.4.5/bin'
Build failed:
 -> task failed (err #1):
        {task: cc libsmb_cache.c -> libsmb_cache_1.o}
 -> task failed (err #1):
        {task: cc libsmb_context.c -> libsmb_context_1.o}
 -> task failed (err #1):
        {task: cc libsmb_file.c -> libsmb_file_1.o}
 -> task failed (err #1):
        {task: cc libsmb_dir.c -> libsmb_dir_1.o}
  File "buildtools/bin/waf", line 76, in <module>
        Scripting.prepare(t, cwd, VERSION, wafdir)
  File "/usr/ports/net/samba44/work/samba-4.4.5/third_party/waf/wafadmin/Scripting.py", line 147, in prepare
        error(str(e))
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/samba44
*** Error code 1

Stop.
make: stopped in /usr/ports/net/samba44

Any ideas what's the problem? Thanks!
 
It is not fixed yet. One hour ago I had the experience. At "heimdal", when compiling samba44 port it stopped with an error (the cc.py - 147 line stuff). The error, as decribed here https://bugzilla.samba.org/show_bug.cgi?id=10515 is still present. I don't know who patched what on the 3. Jannuary 2017? And the patch from https://attachments.samba.org/attachment.cgi?id=12791 for the cc.py might fix the first problem but will generally not work for the further process (I edited the files manually and tried to compile it again, same error on 147er line, something at ~1800/3874).

So you can not install FreeBSD 11.0 and Samba44 from Ports until now (great :-( ). FreeBSD 11.0 AND { Samba43 port OR Samba42 port} works, but has got other issues ...
 
Last edited:
I was having the same problem with this. After I uninstalled net/samba36-libsmbclient, I was able to compile and install samba44 without issue.

I used pkg info | grep libsmbclient to confirm that this port was installed then followed these specific steps:
sudo pkg delete -f samba36-libsmbclient-3.6.25_2
sudo portmaster net/samba44
 
I was having the same problem with this. After I uninstalled net/samba36-libsmbclient, I was able to compile and install samba44 without issue.

I used pkg info grep libsmbclient to confirm that this port was installed then followed these specific steps:
sudo pkg delete -f samba36-libsmbclient-3.6.25_2
sudo portmaster net/samba44

I never had a samba36 installation on this server, it was a brand new one and it was all installed from the scratch. So you can't compare that - or is there an issue with a samba36-libsmbclient, which gets installed when installing samba44? I don't know.
 
So you can't compare that - or is there an issue with a samba36-libsmbclient, which gets installed when installing samba44?
Not sure if it still happens but I think Gnome3 (and XFCE, plus a few other Desktops) may have pulled it in automatically. Which causes a conflict if you install samba44 afterwards.
 
Not sure if it still happens but I think Gnome3 (and XFCE, plus a few other Desktops) may have pulled it in automatically. Which causes a conflict if you install samba44 afterwards.

This was exactly my problem. libsmbclient was installed by the file manager, double commander, on my system.
 
Yes, they are waiting for a fix for upstream I think. BTW, why are you building ports on a live system? It's fragile, depending on what else is installed. Please consider using a "clean room" build tool like ports-mgmt/poudriere or ports-mgmt/synth. The latter is an excellent option if you're not a ports developer.
 
There's nothing wrong (or to worry about) with building ports on a live system. Installing ports on the other hand...
 
There's nothing wrong (or to worry about) with building ports on a live system. Installing ports on the other hand...
Building a port could be dangerous too, just think about the build dependencies that are installed before the actual build of the port.
 
Hi!

I’ve gotten the same error.



I’ve fixed source files:

1. in the path ../net/samba44/work/samba-4.4.8/source3/libsmb -> libsmb_cache.c, libsmb_context.c, libsmb_dir.c, libsmb_file.c, libsmb_misc.c, libsmb_path.c, libsmb_printjob.c, libsmb_server.c, libsmb_setget.c, libsmb_stat.c, libsmb_xattr.c

in this files I’ve commented out line:

Code:
/* #include "libsmbclient.h" */



2. in the path ../net/samba44/work/samba-4.4.8/source3/include -> libsmb_internal.h

In this file I've added line:

Code:
#include "libsmbclient.h"
before line

#include "libsmb/clirap.h"



3. in the path ../net/samba44/work/samba-4.4.8/examples/libsmbclient -> testnotyfy.c

In this file I've fixed line:
Code:
#include <libsmbclient.h>
to
Code:
#include "../../source3/include/libsmbclient.h"



Then I installed port samba44



Good luck!
 
Last edited:
Hello!
This is instruction.

I've began install port samba44 typed
cd /usr/ports/net/samba44
make install


When I've gotten error messages
I've fixed sources files (see previos messages)

And then I've typed
make install

And got install samba44 port.

Best Regards
 
Last edited:
Hello!
This is instruction.
Thanks for instruction, Oleg.
I've tried it and got an error:
Code:
../examples/libsmbclient/testnotify.c:(.text+0xd4): undefined reference to `smbc_notify'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Waf: Leaving directory `/usr/ports/net/samba44/work/samba-4.4.8/bin'
Build failed:  -> task failed (err #1):
        {task: cc_link testnotify_13.o -> testnotify}
===> Compilation failed unexpectedly.
 
Hello!
Yes andros, You are absolutely right.
But my instruction was for version samba-4.4.8_1.
Please, have a look:
Code:
samba44-4.4.8_1
Name           : samba44
Version        : 4.4.8_1
Installed on   : Sun Feb  5 21:40:40 2017 MSK
Origin         : net/samba44
Architecture   : freebsd:11:x86:32
Prefix         : /usr/local
Categories     : net
Licenses       : GPLv3
Maintainer     : timur@FreeBSD.org
WWW            : http://www.samba.org/
Comment        : Free SMB/CIFS and AD/DC server and client for Unix
Options        :
        ACL_SUPPORT    : on
        ADS            : on
        AD_DC          : on
        AVAHI          : on
        BIND910        : off
        BIND99         : on
        CUPS           : on
        DEBUG          : off
        DEVELOPER      : off
        DNSUPDATE      : on
        DOCS           : on
        EXP_MODULES    : off
        FAM            : on
        LDAP           : on
        MANPAGES       : on
        MDNSRESPONDER  : off
        NSUPDATE       : off
        PTHREADPOOL    : on
        QUOTAS         : on
        SYSLOG         : on
        UTMP           : on
But now I'm trying to upgrade from samba-4.4.8_1 to samba-4.4.8_2 and I've gotten the same error.
I'm trying to find resolve this problem.
 
Hi!
My goal is simply install new version of samba and I've made:
in the file /usr/ports/net/samba44/work/samba-4.4.8/examples/libsmbclient/testnotify.c
I've fixed line
Code:
#include <libsmbclient.h>
to
Code:
#include "../../source3/include/libsmbclient.h"
and commented out lines
Code:
/*      ret = smbc_notify(fd, 1,
                          SMBC_NOTIFY_CHANGE_SECURITY|
                          SMBC_NOTIFY_CHANGE_FILE_NAME,
                          1000, notify_cb, &count);*/
I think file testnotify.c is simple example.

And then I've installed new version of samba. Please have a look:
Code:
oleg.Acer[~] <1015-15>$ pkg info samba44
samba44-4.4.8_2
Name           : samba44
Version        : 4.4.8_2
Installed on   : Sat Mar 25 00:45:41 2017 MSK
Origin         : net/samba44
Architecture   : freebsd:11:x86:32
Prefix         : /usr/local
Categories     : net
Licenses       : GPLv3
Maintainer     : timur@FreeBSD.org
WWW            : http://www.samba.org/
Comment        : Free SMB/CIFS and AD/DC server and client for Unix
Options        :
        ACL_SUPPORT    : on
        ADS            : off
        AD_DC          : off
        AVAHI          : on
        BIND910        : off
        BIND99         : off
        CUPS           : on
        DEBUG          : off
        DEVELOPER      : off
        DNSUPDATE      : off
        DOCS           : on
        EXP_MODULES    : off
        FAM            : on
        LDAP           : on
        MANPAGES       : on
        MDNSRESPONDER  : off
        NSUPDATE       : off
        PTHREADPOOL    : on
        QUOTAS         : on
        SYSLOG         : on
        UTMP           : on
Shared Libs required:
Good luck!
 
Hi.
If You want to compile file testnotify.c after installed samba44
You might make the next:
1. Copy 2 files /usr/ports/net/samba44/work/samba-4.4.8/examples/libsmbclient/testnotify.c and
/usr/ports/net/samba44/work/samba-4.4.8/examples/libsmbclient/get_auth.data_fn.h in the your directory.
2. In the your directory.
Fix file testnotify.c
in the line
Code:
#include "../../source3/include/libsmbclient.h"
to
Code:
#include "/usr/local/include/samba4/libsmbclient.h"

Delete comments
Code:
   ret = smbc_notify(fd, 1,
             SMBC_NOTIFY_CHANGE_SECURITY|
             SMBC_NOTIFY_CHANGE_FILE_NAME,
             1000, notify_cb, &count);
and type cc -Xlinker /usr/local/lib/samba4/libsmbclient.so testnotify.c

You will get a.out. You might to copy it to the
/usr/ports/net/samba44/work/samba-4.4.8/bin/default/examples/libsmbclient/testnotify

That's all.

p.s. Sorry for my English. I'm only study it.
 
Back
Top