New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build fails against samba 4.15.5 #348
Comments
|
It's looks like we could use pkg_check_modules for NDR library with NDR_VERSION variable to check API in compile time:
diff --git a/librpc/wscript_build b/librpc/wscript_build
index b82209b4299..59d6c31363d 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -361,11 +361,6 @@ bld.SAMBA_SUBSYSTEM('NDR_DRSBLOBS',
header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')]
)
-bld.SAMBA_SUBSYSTEM('NDR_ODJ',
- source='gen_ndr/ndr_ODJ.c ndr/ndr_ODJ.c',
- public_deps='NDR_LSA NDR_NETLOGON NDR_SECURITY',
- deps='ndr')
-
bld.SAMBA_SUBSYSTEM('NDR_KRB5PAC',
source='',
deps='ndr-krb5pac')
@@ -654,7 +649,7 @@ bld.SAMBA_LIBRARY('ndr',
public_deps='samba-errors talloc samba-util util_str_hex',
public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h',
header_path= [('*gen_ndr*', 'gen_ndr')],
- vnum='2.0.0',
+ vnum='1.0.1',
abi_directory='ABI',
abi_match='!ndr_table_* ndr_* GUID_* _ndr_pull_error* _ndr_push_error*',
) |
I'm also seeing these build failures:
I wonder if this is related? |
Ok, will need to first get version of samba during compile time, then set some flag SAMBA_VERSION_ABOVE_X, push it to config.h, then load into code and use #ifdef to make code compatible to both versions above and below the problematic version.
Probably, yes. ndr_security fails to compile due to changed samba f-n signatures, and ndr_security contains |
I managed to get it to build/run with my ndr patch, plus specifying -DCMAKE_SHARED_LINKER_FLAGS=-undefined to ignore the undefined failiures. |
@dmulder I've been on a vacation, so wasn't able to work on this. Does this still need attention? |
Need to solve this since ALT is upgrading samba to 4.15. |
Fixed by 9fa2f3a |
[ 5s] /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.c: In function 'ndr_pull_security_token':
[ 5s] /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.c:1105:23: error: too few arguments to function 'ndr_get_array_size'
[ 5s] 1105 | size_sids_0 = ndr_get_array_size(ndr, &r->sids);
[ 5s] | ^~~~~~~~~~~~~~~~~~
[ 5s] In file included from /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.h:28,
[ 5s] from /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.c:24:
[ 5s] /usr/include/samba-4.0/ndr.h:658:19: note: declared here
[ 5s] 658 | enum ndr_err_code ndr_get_array_size(struct ndr_pull *ndr, const void *p, uint32_t *size);
[ 5s] | ^~~~~~~~~~~~~~~~~~
[ 5s] /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.c: In function 'ndr_pull_security_unix_token':
[ 5s] /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.c:1182:25: error: too few arguments to function 'ndr_get_array_size'
[ 5s] 1182 | size_groups_0 = ndr_get_array_size(ndr, &r->groups);
[ 5s] | ^~~~~~~~~~~~~~~~~~
[ 5s] In file included from /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.h:28,
[ 5s] from /home/abuild/rpmbuild/BUILD/admc-0.9.0/src/adldap/samba/ndr_security.c:24:
[ 5s] /usr/include/samba-4.0/ndr.h:658:19: note: declared here
[ 5s] 658 | enum ndr_err_code ndr_get_array_size(struct ndr_pull *ndr, const void *p, uint32_t *size);
[ 5s] | ^~~~~~~~~~~~~~~~~~
[ 5s] make[2]: *** [src/adldap/CMakeFiles/adldap.dir/build.make:235: src/adldap/CMakeFiles/adldap.dir/samba/ndr_security.c.o] Error 1
You need to patch admc according to the samba ndr change in https://gitlab.com/samba-team/samba/-/commit/c35f4180a44eb3caecad0f2daab46574bc52be83
The text was updated successfully, but these errors were encountered: