[Samba] Building from source on an ARM71 based router

Zac Morris zac at zacwolf.com
Sat Jun 3 00:59:43 UTC 2017


I am trying to build Samba 4.6.4 on an ARM 7 Cortex based router (Netgear
R8000), running *DD-WRT v3.0-r31980M kongac (05/11/17)*

I'm working with some folks via the DDWRT, but we're running into an issue
trying to build from source.

I have python 2.7 already installed on the router, and I'm executing the
install_with_python.sh script.

./install_with_python.sh /opt/test/samba-4.6.4

/opt/test/samba-4.6.4 is the location that I extracted the source code
tarball, is that what I should be using for the [prefix]?

Since I already have python installed, I created a symlink to my
pre-installed python 2.7 binary to samba-4.6.4/python/bin/python

Which gives the output:

Checking for program gcc or cc           : /opt/bin/gcc
Checking for program cpp                 : /opt/bin/cpp
Checking for program ar                  : /opt/bin/ar
Checking for program ranlib              : /opt/bin/ranlib
Checking for gcc                         : ok
Checking for program git                 : /opt/usr/bin/git
Check for -MD                            : yes
Checking for program gdb                 : /opt/usr/bin/gdb
Checking build system                    : Linux router 4.4.67 #317 SMP Thu
May 11 12:58:51 CEST 2017 armv7l GNU/Linux
Checking for header sys/utsname.h        : yes
*Checking uname sysname type*              : Traceback (most recent call
last):
  File "./buildtools/bin/waf", line 76, in <module>
    Scripting.prepare(t, cwd, VERSION, wafdir)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Scripting.py", line
145, in prepare
    prepare_impl(t, cwd, ver, wafdir)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Scripting.py", line
135, in prepare_impl
    main()
  File "/opt/test/samba-4.6.4/wscript", line 350, in main
    wildcard_main(wildcard_cmd)
  File "./buildtools/wafsamba/samba_wildcard.py", line 110, in wildcard_main
    fun(ctx)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Scripting.py", line
241, in configure
    conf.sub_config([''])
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Configure.py", line
237, in sub_config
    self.recurse(k, name='configure')
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Utils.py", line 656,
in recurse
    f(self)
  File "/opt/test/samba-4.6.4/wscript", line 101, in configure
    conf.RECURSE('lib/replace')
  File "./buildtools/wafsamba/samba_utils.py", line 451, in RECURSE
    return ctx.sub_config(relpath)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Configure.py", line
237, in sub_config
    self.recurse(k, name='configure')
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Utils.py", line 656,
in recurse
    f(self)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Utils.py", line 743,
in wrap
    ret = fun(k)
  File "/opt/test/samba-4.6.4/lib/replace/wscript", line 28, in configure
    conf.RECURSE('buildtools/wafsamba')
  File "./buildtools/wafsamba/samba_utils.py", line 451, in RECURSE
    return ctx.sub_config(relpath)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Configure.py", line
237, in sub_config
    self.recurse(k, name='configure')
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Utils.py", line 656,
in recurse
    f(self)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Utils.py", line 743,
in wrap
    ret = fun(k)
  File
"/opt/test/samba-4.6.4/lib/replace/../../buildtools/wafsamba/wscript", line
308, in configure
    conf.CHECK_UNAME()
  File "./buildtools/wafsamba/samba_conftests.py", line 452, in CHECK_UNAME
    msg="Checking uname %s type" % v):
  File "./buildtools/wafsamba/samba_autoconf.py", line 436, in CHECK_CODE
    define_ret=define_ret)
  File "./buildtools/wafsamba/samba_conftests.py", line 52, in check
    ret = self.run_c_code(*k, **kw)
  File "/opt/test/samba-4.6.4/third_party/waf/wafadmin/Tools/config_c.py",
line 575, in run_c_code
    proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE,
stderr=Utils.pproc.PIPE)
  File "/opt/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/opt/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory


So something seems to be wrong at the "*Checking uname sysname type*" step
and I just can't figure out what it is.  I've tried parsing through all of
the individual python scripts lists above, but I just don't know enough
Python syntax to understand what's breaking. Obviously there's a file
missing, but I can't figure out what file.

Is the [prefix] that I'm passing into the install script supposed to be
something else? Are there special config parms I should be passing into the
script?  Since I'm building directing on the device I plan to use the code
on, I shouldn't have to deal with any -cross-build / toolchain issues
should I?

The build-from-source documentation seems to be for the old autoconf based
build process, and I can't really find any details about the was builder.

Can anyone at least point me in the right direction towards figuring out
what the issue is? I'm hitting a brick wall.

I'm attaching the config.log, but it doesn't show any errors, just stops at
the point where the problem seems to occur.


More information about the samba mailing list