Closed wongsyrone closed 8 years ago
https://bugzilla.samba.org/show_bug.cgi?id=10128
I built samba 4.2.0 on a custom embedded system now, and the major hurdles to overcome were as follows: libldap.so depends on other shared libraries (openssl). With a native linker, the linker would typically find those, but with a cross linker, the -L parameter is not enough (it is being used for finding -l
but not for dependencies of those libs). On samba3 there was the LDAP_LIBS configuration variable to handle this. Here came -rpath-link switch to the rescue - for each -L switch in LDFLAGS I also added a corresponding -rpath-link switch, telling the linker where to look for those dependent libs (e.g. if LDFLAGS was "-L /foo" now it's "-L /foo -Xlinker -rpath-link=/foo) Python (sigh). You really need a functioning python-config for the target, that can run on the host. So that when you run "python-config --includes" it will print out the include directories for the target's python, on the build machine. Python 2.7 doesn't have that out-of-the box. You can backport the fix from Python 3, as buildroot are doing, but I had to tweak that too. Bottom line is that python-config --includes must be correct. Then you put it in configure's environment (PYTHON_CONFIG=/path/to/target/python-config ./configure)
Strangely, for Python libraries and link flags, python-config is not consulted. I wish it were because if you get it right, that solves everything. There's a partial solution in the form of python_LIBDIR (which allows you ONLY to add to linker search path) and python_LDFLAGS (which allows you ONLY to set more link flags). Best thing is to set them to empty string, relying on existing LDFLAGS that already points to python libs. However, the additional libraries to link against (additional -l flags) are taken from the build machine python (distutils) and that's a bug. Luckily for me they were the same, but even if my target python was statically-linked, I would run into a problem b/c the order of libraries included is dependencies first, python second.
Another issue I encountered was that my embedded kernel didn't support IPv6 and I couldn't find a way in the build system to disable IPv6 - IPv6 was enabled based on it being supported by libc. That means smbd cannot listen to connections. My fix for that was simply to add IPv6 support.
So to summarize: PYTHON_CONFIG=/path/to/my/target python-config \ python_LDFLAGS="" \ python_LIBDIR="" \ LDFLAGS="${LDFLAGS} -Xlinker -rpath-link=/path/to/openssl/libs \ ./configure --cross-compile --cross-answeres=/my/answers/file ....
BUILDROOT PYTHON PATCHES 009-no-termcap-host-path.patch 002-fix-get-python-inc.patch 004-sysconfigdata-install-location.patch X 005-pyc-pyo-conditional.patch 006-cross-compile-getaddrinfo.patch X 007-disable-extensions.patch X 011-remove-python-symlink.patch X 014-abort-on-failed-modules.patch 016-serial-ioctl-workaround.patch X 018-fix-add-gcc-paths-logic.patch X 114-remove-idle-editor.patch
OPENWRT PYTHON PATCHES 003-do-not-compile-tests-at-build.patch 004-do-not-write-bytes-codes.patch 005-fix-libffi-x86-64-configure.patch 009-do-not-use-dblib_dir-when-cross-compiling.patch 010-do-not-add-rt-lib-dirs-when-cross-compiling.patch 011-do-not-prefer-ncursesw.patch
IMPORTANT FOR SAMBA 010-fix-python-config.patch
FINAL PATCH LIST OF SAMBA 4.3 000-disable-libbsd.patch 002-use-external-asn1-compile-compile-et.patch 004-pythogn-DEBUGLEVEL-undefined.patch 110-multicall.patch 111-multicall-wscript-build.patch 120-add_missing_ifdef.patch 200-remove_printer_support.patch 220-remove_services.patch 230-remove_winreg_support.patch 270-remove_registry_backend.patch 280-strip_srvsvc.patch 300-assert_debug_level.patch 320-debug_level_checks.patch 390-remove-auth-winbind.patch 800-ldap-sasl.patch 810-ldap-determine-suffix-automatically.patch 900-getgrent_r-getpwent_r-ugly-hack.patch
Missing dependencies: Package samba43-server is missing dependencies for the following libraries: libauth-samba4.so libcli-cldap-samba4.so libcli-nbt-samba4.so libcli-smb-common-samba4.so libcliauth-samba4.so libdcerpc-samba-samba4.so liberrors-samba4.so libgenrand-samba4.so libgse-samba4.so liblibcli-lsa3-samba4.so liblibsmb-samba4.so libmsrpc3-samba4.so libndr-nbt.so.0 libndr-samba-samba4.so libndr-standard.so.0 libndr.so.0 libnetapi.so.0 libpopt-samba3-samba4.so libreplace-samba4.so libsamba-cluster-support-samba4.so libsamba-debug-samba4.so libsamba-hostconfig.so.0 libsamba-passdb.so.0 libsamba-security-samba4.so libsamba-sockets-samba4.so libsamba-util.so.0 libsamba3-util-samba4.so libsecrets3-samba4.so libserver-role-samba4.so libsmbconf.so.0 libsmbd-base-samba4.so libsmbd-shim-samba4.so libsmbregistry-samba4.so libsocket-blocking-samba4.so libsys-rw-samba4.so libtalloc.so.2 libtdb.so.1 libtevent.so.0 libutil-cmdline-samba4.so libutil-tdb-samba4.so ... and so on. To be honest, copy all so files is totally a wrong way.
Solution 1: just copy these so files to /usr/lib IPK size: 6202570 Solution 2 : use --nonshared-binary or --builtin-libraries IPK size: 4999069
done in a65b4d5b9af4be26f7e1f93317748f9d48e7d2c8
binary too BIG
@wongsyrone I have a better idea on the patching the python-config, I explored the source, python-config reads some environment var. to add up the output path. Thus all we need is set up such env vars.
add this lines in Makefile before running configure:
export _python_sysroot=$(STAGING_DIR)
export _python_prefix=/usr
export _python_exec_prefix=/usr/bin
A normal version of python-config will output the correct path of include in the staging_dir
@pentie I appreciate your work but waf needs cflags, ldflags, etc. Have you tested with your changes? We'd better focus on reducing package size IMO.
@wongsyrone python2-config will still provide cflags/ldflags correctly, this env variables only amend to the path of the -L -I flags. The python part is flawless.
I got the package compiles, but it fails on the final linking the nmbd(ld segfaults, nothing to do with package), I think there is something wrong with the offcial SDK, I'm going to compile the build tree from scratch.
@pentie You can try this tree, it works.
for the record I encounter for now, I did this changes to the Makefile
--- /tmp/samba43related/samba43/Makefile 2015-10-22 11:43:35.000000000 +0800
+++ Makefile 2015-10-23 14:14:51.760517000 +0800
@@ -61,6 +61,10 @@
TARGET_LDFLAGS += -Wl,--gc-sections
+export _python_sysroot=$(STAGING_DIR)
+export _python_prefix=/usr
+export _python_exec_prefix=/usr/bin
+
# Use host compiled python2 as interpreter
# Use target python2-config to retrive cflags, ldflags, libs, etc.
# Must have python2 patched to make python2-config works
@@ -136,7 +140,7 @@
./buildtools/bin/waf configure -j$(shell nproc) \
--cross-compile \
--cross-answers=$(PKG_BUILD_DIR)/cache.txt \
- --hostcc=$(HOSTCC) \
+ --hostcc="$(HOSTCC)" \
$(SAMBA_CONFIGURE_ARGS) \
--with-lockdir=/var/lock \
--with-logfilebase=/var/log \
$(HOSTCC)
here is "ccache gcc", without quotes, waf reads gcc as a command, breaks everything ( took my quite a while to find out, ah)
@wongsyrone
collect2: ld terminated with signal 11 [Segmentation fault]
How do you handle this change?
@mormts I'm using trunk code and musl-libc, haven't noticed this kind of error
@mormts
It seems yours is similar to @pentie 's, pls read his comment above.
@wongsyrone
Use the trunk musl return is also such a problem
@mormts SDK or toolchain built by yourself?
@wongsyrone no
my configuration: GCC: 5.2 + SSP enabled + -D_FORTIFY_SOURCE=1 + Full RELRO gdb: 7.8 binutils: 2.25.1 target: mvebu (ARM)
I have no idea why you guys have such a problem.
@pentie @mormts pls remove this line: https://github.com/wongsyrone/openwrt-1/blob/master/package/external/samba43related/samba43/Makefile#L154 and re-compile.
Ok good I try
@pentie @mormts Also, pls discard all changes made by yourselves if not work, and use my packages-1 repo instead.
@wongsyrone openwrt-1 packages-1 The same is the error Really don't understand .......
https://archives.gentoo.org/gentoo-dev/message/d75c3ba798825052daee35e846e79797 https://lists.samba.org/archive/samba/2015-September/194453.html
Some important options:
--with-static-modules=STATIC_MODULES Comma-separated list of names of modules to statically link in --with-shared-modules=SHARED_MODULES Comma-separated list of names of modules to build shared --bundled-libraries=BUNDLED_LIBS comma separated list of bundled libraries. May include !LIBNAME to disable bundling a library. Can be 'NONE' or 'ALL' [auto] --private-libraries=PRIVATE_LIBS comma separated list of normally public libraries to build instead as private libraries. May include !LIBNAME to disable making a library private. Can be 'NONE' or 'ALL' [auto] --builtin-libraries=BUILTIN_LIBRARIES command separated list of libraries to build directly into binaries [NONE] --nonshared-binary=NONSHARED_BINARIES Disable use of shared libs for the listed binaries
maybe we can use
--targets=COMPILE_TARGETS build given task generators, e.g. "target1,target2"
to build the multicall binary, not tested yet.
grep SAMBA3_MODULE -r examples/VFS/wscript_build:bld.SAMBA3_MODULE('vfs_skel_opaque', examples/VFS/wscript_build:bld.SAMBA3_MODULE('vfs_skel_transparent', examples/VFS/wscript_build:bld.SAMBA3_MODULE('vfs_shadow_copy_test', examples/pdb/wscript_build:bld.SAMBA3_MODULE('pdb_test', examples/auth/wscript_build:bld.SAMBA3_MODULE('auth_skel', buildtools/wafsamba/samba3.py:def SAMBA3_MODULE(bld, name, _args, *_kwargs): buildtools/wafsamba/samba3.py:Build.BuildContext.SAMBA3_MODULE = SAMBA3_MODULE source3/libgpo/gpext/wscript_build:bld.SAMBA3_MODULE('gpext_registry', source3/libgpo/gpext/wscript_build:bld.SAMBA3_MODULE('gpext_scripts', source3/libgpo/gpext/wscript_build:bld.SAMBA3_MODULE('gpext_security', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_ad', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_rfc2307', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_rid', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_passdb', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_ldap', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_nss', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_tdb', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_tdb2', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_hash', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_autorid', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('nss_info_template', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('nss_info_hash', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('nss_info_rfc2307', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('nss_info_sfu20', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('nss_info_sfu', source3/winbindd/wscript_build:bld.SAMBA3_MODULE('idmap_script', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_sam', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_unix', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_winbind', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_wbc', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_domain', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_builtin', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_script', source3/auth/wscript_build:bld.SAMBA3_MODULE('auth_samba4', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_default', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_audit', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_extd_audit', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_full_audit', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_fake_perms', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_fake_acls', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_recycle', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_netatalk', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_fruit', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_default_quota', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_readonly', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_cap', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_expand_msdfs', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_shadow_copy', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_shadow_copy2', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_afsacl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_xattr_tdb', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_posix_eadb', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_posixacl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_aixacl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_aixacl2', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_solarisacl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_zfsacl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_nfs4acl_xattr', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_hpuxacl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_tru64acl', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_catia', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_streams_xattr', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_streams_depot', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_cacheprime', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_prealloc', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_commit', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_gpfs', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_readahead', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_tsmsm', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_fileid', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_aio_fork', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_aio_pthread', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_aio_posix', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_aio_linux', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_preopen', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_syncops', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_acl_xattr', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_acl_tdb', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_smb_traffic_analyzer', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_dirsort', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_scannedonly', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_crossrename', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_linux_xfs_sgid', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_time_audit', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_media_harmony', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_unityed_media', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_dfs_samba4', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_btrfs', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_shell_snap', source3/modules/wscript_build:bld.SAMBA3_MODULE('perfcount_test', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_ceph', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_glusterfs', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_worm', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_snapper', source3/modules/wscript_build:bld.SAMBA3_MODULE('vfs_vxfs', source3/passdb/wscript_build:bld.SAMBA3_MODULE('pdb_tdbsam', source3/passdb/wscript_build:bld.SAMBA3_MODULE('pdb_ldapsam', source3/passdb/wscript_build:bld.SAMBA3_MODULE('pdb_smbpasswd', source3/passdb/wscript_build:bld.SAMBA3_MODULE('pdb_wbc_sam', source3/passdb/wscript_build:bld.SAMBA3_MODULE('pdb_samba_dsdb',
grep SAMBA3_SUBSYSTEM -r librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('SRV_NDR_WINBIND', buildtools/wafsamba/samba3.py:def SAMBA3_SUBSYSTEM(bld, name, _args, *_kwargs): buildtools/wafsamba/samba3.py:Build.BuildContext.SAMBA3_SUBSYSTEM = SAMBA3_SUBSYSTEM source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_LIBNETAPI', source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_LIBNET_JOIN', source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_OPEN_FILES', source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_SMBXSRV', source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_LEASES_DB', source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_SECRETS', source3/librpc/wscript_build:bld.SAMBA3_SUBSYSTEM('NDR_PERFCOUNT', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('rpc', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_CONFIG', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_NCACN_NP', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SERVER_LOOP', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_CRYPTO', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_PIPE_REGISTER', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('SRV_ACCESS_CHECK', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SERVER', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_DSSETUP', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_EPMAPPER', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_FSS_STATE', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_FSS_AGENT', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_EVENTLOG', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_INITSHUTDOWN', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_LSARPC', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_NETDFS', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_NETLOGON', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_NTSVCS', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_RPCECHO', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SAMR', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SPOOLSS', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SRVSVC', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SVCCTL', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_WINREG', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_WKSSVC', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_MDSSVC', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SERVER_REGISTER', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SERVICE', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_SOCK_HELPER', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('EPMD', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('LSASD', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('FSSD', source3/rpc_server/wscript_build:bld.SAMBA3_SUBSYSTEM('MDSSD', source3/smbd/notifyd/wscript_build:bld.SAMBA3_SUBSYSTEM('notifyd', source3/libgpo/gpext/wscript_build:bld.SAMBA3_SUBSYSTEM('gpext', source3/param/wscript_build:bld.SAMBA3_SUBSYSTEM('PARAM_UTIL', source3/param/wscript_build:bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX', source3/param/wscript_build:bld.SAMBA3_SUBSYSTEM('param_service', source3/winbindd/wscript_build:bld.SAMBA3_SUBSYSTEM('IDMAP_RW', source3/winbindd/wscript_build:bld.SAMBA3_SUBSYSTEM('IDMAP_TDB_COMMON', source3/winbindd/wscript_build:bld.SAMBA3_SUBSYSTEM('IDMAP_HASH', source3/winbindd/wscript_build:bld.SAMBA3_SUBSYSTEM('IDMAP_AD', source3/winbindd/wscript_build:bld.SAMBA3_SUBSYSTEM('IDMAP_AUTORID_TDB', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('AVAHI', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('GROUPDB', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('TLDAP', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('pdb', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('param', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('REGFIO', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('REG_API_REGF', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('REG_SMBCONF', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('REG_FULL', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('KRBCLIENT', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('samba3util', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('TDB_LIB', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('samba3core', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBNTLMSSP', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('auth_generic', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('CLDAP', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('sysquotas', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LOCKING', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LEASES_DB', source3/wscript_build: bld.SAMBA3_SUBSYSTEM('PROFILE', source3/wscript_build: bld.SAMBA3_SUBSYSTEM('PROFILE', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('PRINTBASE', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('PRINTBACKEND', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('PRINTING', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('PASSWD_UTIL', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('FNAME_UTIL', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBNET', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBNET_SAMSYNC', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBNMB', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('SERVICES', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('PASSCHANGE', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('SLCACHE', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('DCUTIL', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('tdb-wrap3', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('errors3', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('INIT_LSA', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('INIT_NETLOGON', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('INIT_SAMR', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBLSA', source3/wscript_build:bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE', source3/lib/asys/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBASYS', source3/lib/poll_funcs/wscript_build:bld.SAMBA3_SUBSYSTEM('POLL_FUNCS_TEVENT', source3/lib/unix_msg/wscript_build:bld.SAMBA3_SUBSYSTEM('UNIX_MSG', source3/lib/pthreadpool/wscript_build: bld.SAMBA3_SUBSYSTEM('PTHREADPOOL', source3/lib/pthreadpool/wscript_build: bld.SAMBA3_SUBSYSTEM('PTHREADPOOL', source3/auth/wscript_build:bld.SAMBA3_SUBSYSTEM('TOKEN_UTIL', source3/auth/wscript_build:bld.SAMBA3_SUBSYSTEM('USER_UTIL', source3/auth/wscript_build:bld.SAMBA3_SUBSYSTEM('AUTH_COMMON', source3/modules/wscript_build:bld.SAMBA3_SUBSYSTEM('NFS4_ACLS', source3/modules/wscript_build:bld.SAMBA3_SUBSYSTEM('VFS_AIXACL_UTIL', source3/modules/wscript_build:bld.SAMBA3_SUBSYSTEM('vfs', source3/modules/wscript_build:bld.SAMBA3_SUBSYSTEM('perfcount', lib/afs/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBAFS', lib/afs/wscript_build:bld.SAMBA3_SUBSYSTEM('LIBAFS_SETTOKEN',
grep SAMBA3_BINARY -r buildtools/wafsamba/samba3.py:def SAMBA3_BINARY(bld, name, _args, *_kwargs): buildtools/wafsamba/samba3.py:Build.BuildContext.SAMBA3_BINARY = SAMBA3_BINARY source3/smbd/notifyd/wscript_build:bld.SAMBA3_BINARY('notifyd-tests', source3/smbd/notifyd/wscript_build:bld.SAMBA3_BINARY('notifydd', source3/param/wscript_build:bld.SAMBA3_BINARY('test_lp_load', source3/wscript_build:bld.SAMBA3_BINARY('smbd/smbd', source3/wscript_build:bld.SAMBA3_BINARY('nmbd/nmbd', source3/wscript_build:bld.SAMBA3_BINARY('winbindd/winbindd', source3/wscript_build:bld.SAMBA3_BINARY('rpcclient/rpcclient', source3/wscript_build:bld.SAMBA3_BINARY('client/smbclient', source3/wscript_build:bld.SAMBA3_BINARY('net', source3/wscript_build:bld.SAMBA3_BINARY('profiles', source3/wscript_build:bld.SAMBA3_BINARY('smbspool', source3/wscript_build:bld.SAMBA3_BINARY('smbspool_krb5_wrapper', source3/wscript_build:bld.SAMBA3_BINARY('testparm', source3/wscript_build:bld.SAMBA3_BINARY('smbta-util', source3/wscript_build:bld.SAMBA3_BINARY('smbstatus', source3/wscript_build:bld.SAMBA3_BINARY('smbcontrol', source3/wscript_build:bld.SAMBA3_BINARY('smbtree', source3/wscript_build:bld.SAMBA3_BINARY('smbpasswd', source3/wscript_build:bld.SAMBA3_BINARY('pdbedit', source3/wscript_build:bld.SAMBA3_BINARY('smbget', source3/wscript_build:bld.SAMBA3_BINARY('nmblookup', source3/wscript_build:bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3, source3/wscript_build:bld.SAMBA3_BINARY('smbconftort', source3/wscript_build:bld.SAMBA3_BINARY('replacetort', source3/wscript_build:bld.SAMBA3_BINARY('msgtest', source3/wscript_build:bld.SAMBA3_BINARY('msg_sink', source3/wscript_build:bld.SAMBA3_BINARY('msg_source', source3/wscript_build:bld.SAMBA3_BINARY('smbcacls', source3/wscript_build:bld.SAMBA3_BINARY('smbcquotas', source3/wscript_build:bld.SAMBA3_BINARY('eventlogadm', source3/wscript_build:bld.SAMBA3_BINARY('sharesec', source3/wscript_build:bld.SAMBA3_BINARY('pdbtest', source3/wscript_build:bld.SAMBA3_BINARY('vfstest', source3/wscript_build:bld.SAMBA3_BINARY('log2pcap', source3/wscript_build:bld.SAMBA3_BINARY('locktest2', source3/wscript_build:bld.SAMBA3_BINARY('debug2html', source3/wscript_build:bld.SAMBA3_BINARY('smbfilter', source3/wscript_build:bld.SAMBA3_BINARY('versiontest', source3/wscript_build:bld.SAMBA3_BINARY('ntlm_auth', source3/wscript_build:bld.SAMBA3_BINARY('timelimit', source3/wscript_build:bld.SAMBA3_BINARY('rpc_open_tcp', source3/wscript_build:bld.SAMBA3_BINARY('dbwrap_tool', source3/wscript_build:bld.SAMBA3_BINARY('dbwrap_torture', source3/wscript_build:bld.SAMBA3_BINARY('split_tokens', source3/wscript_build:bld.SAMBA3_BINARY('vlp', source3/wscript_build:bld.SAMBA3_BINARY('samba-regedit', source3/wscript_build:bld.SAMBA3_BINARY('spotlight2sparql', source3/lib/asys/wscript_build:bld.SAMBA3_BINARY('asystest', source3/lib/unix_msg/wscript_build:bld.SAMBA3_BINARY('unix_msg_test', source3/lib/unix_msg/wscript_build:bld.SAMBA3_BINARY('unix_msg_test_drain', source3/lib/unix_msg/wscript_build:bld.SAMBA3_BINARY('unix_msg_test_source', source3/lib/pthreadpool/wscript_build:bld.SAMBA3_BINARY('pthreadpooltest',
It seems we can't disable krb5 in samba 4.3.x, which may increase ipk size. Extroot or high-end devices should eliminate the package size concern.
I'm closing this. To be honest, I don't know how to reduce it.
please help me for the below compilation error:
[ 224/1998] Generating param_functions.c
[ 225/1998] Generating param_functions.h
[ 226/1998] Generating param_local.h
[ 227/1998] Generating param_global.h
[ 228/1998] Generating param_table_gen.c
[ 229/1998] Compiling IDL librpc/idl/atsvc.idl
[ 230/1998] Compiling IDL librpc/idl/auth.idl
[ 231/1998] Compiling IDL librpc/idl/drsuapi.idl
/home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/atsvc.idl:5:1: error: expected identifier or '(' before '[' token
[ uuid("1ff70682-0a51-30e8-076d-740be8cee98b"),
^
/home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/drsuapi.idl:3:8: error: expected '=', ',', ';', 'asm' or 'attribute' before string constant
import "security.idl", "misc.idl", "lsa.idl", "samr.idl";
^
/home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/drsuapi.idl:5:1: error: expected identifier or '(' before '[' token
[
^
/home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/auth.idl:12:8: error: expected '=', ',', ';', 'asm' or 'attribute' before string constant
import "misc.idl", "security.idl", "lsa.idl", "krb5pac.idl";
^
/home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/auth.idl:13:1: error: expected identifier or '(' before '[' token
[
^
Failed to parse /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/atsvc.idl at /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/pidl/pidl line 610.
Failed to parse /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/auth.idl at /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/pidl/pidl line 610.
Failed to parse /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/librpc/idl/drsuapi.idl at /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/pidl/pidl line 610.
Waf: Leaving directory /home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/bin' Build failed: -> task failed (err #1): {task: PIDL_ATSVC atsvc.idl,CUtil.pm,Compat.pm,Dump.pm,Expr.pm,IDL.pm,NDR.pm,ODL.pm,ClientNDR.pm,ServerNDR.pm,Template.pm,Header.pm,Proxy.pm,Stub.pm,Header.pm,Client.pm,Parser.pm,Server.pm,Python.pm,TDR.pm,Template.pm,Samba4.pm,Typelist.pm,Util.pm,Conformance.pm,NDR.pm,Pidl.pm,Driver.pm -> atsvc.h,ndr_atsvc.c,ndr_atsvc.h,srv_atsvc.c,srv_atsvc.h,ndr_atsvc_s.c,ndr_atsvc_c.c,ndr_atsvc_c.h,py_atsvc.c} -> task failed (err #1): {task: PIDL_DRSUAPI drsuapi.idl,CUtil.pm,Compat.pm,Dump.pm,Expr.pm,IDL.pm,NDR.pm,ODL.pm,ClientNDR.pm,ServerNDR.pm,Template.pm,Header.pm,Proxy.pm,Stub.pm,Header.pm,Client.pm,Parser.pm,Server.pm,Python.pm,TDR.pm,Template.pm,Samba4.pm,Typelist.pm,Util.pm,Conformance.pm,NDR.pm,Pidl.pm,Driver.pm -> drsuapi.h,ndr_drsuapi.c,ndr_drsuapi.h,srv_drsuapi.c,srv_drsuapi.h,ndr_drsuapi_s.c,ndr_drsuapi_c.c,ndr_drsuapi_c.h,py_drsuapi.c} -> task failed (err #1): {task: PIDL_AUTH auth.idl,CUtil.pm,Compat.pm,Dump.pm,Expr.pm,IDL.pm,NDR.pm,ODL.pm,ClientNDR.pm,ServerNDR.pm,Template.pm,Header.pm,Proxy.pm,Stub.pm,Header.pm,Client.pm,Parser.pm,Server.pm,Python.pm,TDR.pm,Template.pm,Samba4.pm,Typelist.pm,Util.pm,Conformance.pm,NDR.pm,Pidl.pm,Driver.pm -> auth.h,ndr_auth.c,ndr_auth.h,srv_auth.c,srv_auth.h,ndr_auth_s.c,ndr_auth_c.c,ndr_auth_c.h,py_auth.c} make[2]: *** [/home/tymon/work/openwrt/git/official/trunk/qca/build_dir/target-arm_cortex-a9+neon-vfpv4_musl-1.1.14_eabi/samba-4.4.0/.built] Error 1 make[2]: Leaving directory
/home/tymon/work/openwrt/git/official/trunk/qca/package/network/services/samba4'
make[1]: * [package/network/services/samba4/compile] Error 2
make[1]: Leaving directory `/home/tymon/work/openwrt/git/official/trunk/qca'
make: * [package/network/services/samba4/compile] Error 2
@wongsyrone
waf needs python2 to work. package python should be tweaked to fit need of samba 4.1 or higher
Build Requires: https://github.com/wongsyrone/packages-1/commit/4f3a6ecca7d6d076c0b0ce17bdad2b5dd13450b1 https://github.com/wongsyrone/packages-1/commit/60ca6f0f2b6712e023bc4af38f15a10d1aa78154
Notice: I simply removed two functions in source4/torture/local/nss_tests.c to pass linking stage since nobody will run
smbtorture
on embedded system, hardware is expensive. :)