Skip to content

Instantly share code, notes, and snippets.

@mzpqnxow
Last active August 20, 2024 12:49
Show Gist options
  • Save mzpqnxow/f5318810e2daae040bbf3958997c07f9 to your computer and use it in GitHub Desktop.
Save mzpqnxow/f5318810e2daae040bbf3958997c07f9 to your computer and use it in GitHub Desktop.
Building lightweight (somewhat statically linked) smbclient executable
```
# This won't build a *complete* statically linked smbclient exe, but it will do better ... :/
$ ./configure --without-winbind \
--without-ldap \
--without-ads \
--disable-cups \
--without-quotas \
--disable-avahi \
--without-syslog \
--without-pam \
--disable-pthreadpool \
--without-acl-support \
--without-automount \
--without-pie \
--nopyc \
--nopyo \
--hostcc=musl-gcc \
--disable-python \
--without-ad-dc \
--disable-fault-handling \
--without-libunwind \
--disable-iprint \
--without-gettext \
--disable-python \
--without-json \
--with-iconv \
--without-libarchive \
--with-static-modules=ALL \
--without-systemd \
--disable-cephfs \
--disable-glusterfs \
--without-ads \
--without-winbind \
--without-ldap \
--disable-cups \
--disable-iprint \
--without-pam \
--disable-avahi \
--disable-tdb-mutex-locking \
--without-gpgme \
--hostcc=musl-gcc \
CC=musl-gcc \
LDFLAGS=-static
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment