Time to upgrade Samba

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4  Next
Author Message
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Wed May 31, 2017 2:51    Post subject: Reply with quote
I've downloaded the 4.6 tarball, and via entware-ng I've been able to install the c-compiler tools in my /opt partition, but when I run ./configure for the extracted tar I get a bunch of python warnings, and then an error of "OSError: [Errno 2] No such file or directory"

Code:
./configure configure -j7
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 DD-WRT
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
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1858
Location: Hung Hom, Hong Kong

PostPosted: Thu Jun 01, 2017 15:45    Post subject: Reply with quote
ZacWolf wrote:
I've downloaded the 4.6 tarball, and via entware-ng I've been able to install the c-compiler tools in my /opt partition, but when I run ./configure for the extracted tar I get a bunch of python warnings, and then an error of "OSError: [Errno 2] No such file or directory"


Thank you first for taking the challenge! Wink

Did you install the full Python in your test setup?

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Fri Jun 02, 2017 18:40    Post subject: Reply with quote
mwchang wrote:

Thank you first for taking the challenge! Wink

Did you install the full Python in your test setup?


So I tried a few different things.

First all, I'm doing this on my router (R8000), that I ran bootstrap on, to build my /opt environment.

I first tried installing python 2.7 via opkg:
opkg install python

The I ran samba-4.6.4/configure and got the errors I posted previously.

Then I installed pthyon 3 via opkg:
opkg install python3

Re-ran and basically got various python syntax errors, that point to syntax changes between python 2 and 3, so python3 won't work.

Then I saw that the samba source directory has a subdirectory: samba-4.6.4/python_install/Python-2.6.5.tar
so I untar'ed that and tried: /.configure

I went down a rabbit hole of trying to get that version of python to build, so I just gave up, and created a symlink to samba-4.6.4/python/bin/python to my opkg install python 2.7

I then reconfigured my PATH to:
/opt/test/samba-4.6.4/buildtools/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin

Then I ran:
/opt/test/samba-4.6.4/install_with_python.sh

And I end up with the original errors I posted. It looks like it is failing at:
Checking uname sysname type

Here's my output from config.log
Code:

# project samba configured on Fri Jun  2 19:12:49 2017 by
# waf 1.5.19 (abi 7, python 2070df0 on linux2)
# using ./buildtools/bin/waf configure --prefix=/opt/test/samba-4.6.4
#

----------------------------------------
Checking for program gcc or cc
  find program=['gcc', 'cc'] paths=[] var='CC'
  -> '/opt/bin/gcc'

----------------------------------------
Checking for program cpp
  find program=['cpp'] paths=[] var='CPP'
  -> '/opt/bin/cpp'

----------------------------------------
Checking for program ar
  find program=['ar'] paths=[] var='AR'
  -> '/opt/bin/ar'

----------------------------------------
Checking for program ranlib
  find program=['ranlib'] paths=[] var='RANLIB'
  -> '/opt/bin/ranlib'

----------------------------------------
Checking for gcc
ok

----------------------------------------
Checking for program git
  find program=['git'] paths=[] var='GIT'
  -> '/opt/usr/bin/git'

----------------------------------------
Check for -MD
==>
int main() {return 0;}

<==
[1/1] Compiling test.c
['/opt/bin/gcc', '-MD', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', '/opt/test/samba-4.6.4/bin/.conf_check_0/testbuild/default/test_1.o']
yes

----------------------------------------
Checking for program gdb
  find program=['gdb'] paths=[] var=None
  -> '/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
==>
#include <sys/utsname.h>

int main(void) { return 0; }
<==
[1/1] Compiling test.c
['/opt/bin/gcc', '-MD', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
yes

----------------------------------------
Checking uname sysname type
==>
#define CONFIG_H_IS_FROM_SAMBA 1
#define _SAMBA_BUILD_ 4
#define HAVE_CONFIG_H 1
#define BUILD_SYSTEM "Linux router 4.4.67 #317 SMP Thu May 11 12:58:51 CEST 2017 armv7l GNU/Linux"
#define HAVE_SYS_UTSNAME_H 1
#include <sys/utsname.h>

 int main(void) {
                               int printf(const char *format, ...);
                               struct utsname n;
                               if (uname(&n) == -1) return -1;
                               printf("%s", n.sysname);
                               ; return 0; }

<==
[1/2] Compiling test.c
['/opt/bin/gcc', '-MD', '-Idefault', '-I..', '-Idefault', '-I..', '-D_SAMBA_BUILD_=4', '-DHAVE_CONFIG_H=1', '../test.c', '-c', '-o', 'default/test_1.o']
[2/2] Linking default/testprog
['/opt/bin/gcc', 'default/test_1.o', '-o', '/opt/test/samba-4.6.4/bin/.conf_check_0/testbuild/default/testprog']



Here are all the various OPKG packages I have install:

Code:
ar - 2.27-1
autoconf - 2.69-2a
bash - 4.3.42-1a
binutils - 2.27-1
coreutils - 8.23-2
coreutils-chroot - 8.23-2
coreutils-install - 8.23-2
coreutils-md5sum - 8.23-2
coreutils-mktemp - 8.23-2
coreutils-printf - 8.23-2
coreutils-uname - 8.23-2
dmesg - 2.29.2-1
entware-opt - 222108-5
findutils - 4.6.0-1
gcc - 6.3.0-1
gdb - 7.11-1
git - 2.11.1-1
grep - 2.26-1
ldconfig - 2.23-6
libacl - 20160519-1
libattr - 20160302-1
libbfd - 2.27-1
libbz2 - 1.0.6-2
libc - 2.23-6
libdb47 - 4.7.25.4.NC-5
libexpat - 2.2.0-1
libffi - 3.2.1-2
libgcc - 6.3.0-6
libgdbm - 1.11-1
libiconv-full - 1.11.1-3
libintl-full - 0.19.8.1-1
liblzma - 5.2.3-1
libncurses - 6.0-1c
libncursesw - 6.0-1c
libopcodes - 2.27-1
libopenssl - 1.0.2h-1
libpcre - 8.40-2
libpopt - 1.16-1
libpthread - 2.23-6
libreadline - 6.3-1
librt - 2.23-6
libsqlite3 - 3170000-1
libssp - 6.3.0-6
libstdcpp - 6.3.0-6
libusb-1.0 - 1.0.20-1
libxml2 - 2.9.4-1
locales - 2.23-6
m4 - 1.4.17-2
make - 4.2.1-2
objdump - 2.27-1
opkg - 2011-04-08-9c97d5ec-17a
perl - 5.22.1-4
perlbase-base - 5.22.1-4
perlbase-bytes - 5.22.1-4
perlbase-class - 5.22.1-4
perlbase-config - 5.22.1-4
perlbase-cwd - 5.22.1-4
perlbase-data - 5.22.1-4
perlbase-dynaloader - 5.22.1-4
perlbase-errno - 5.22.1-4
perlbase-essential - 5.22.1-4
perlbase-fcntl - 5.22.1-4
perlbase-file - 5.22.1-4
perlbase-filehandle - 5.22.1-4
perlbase-getopt - 5.22.1-4
perlbase-i18n - 5.22.1-4
perlbase-integer - 5.22.1-4
perlbase-io - 5.22.1-4
perlbase-list - 5.22.1-4
perlbase-locale - 5.22.1-4
perlbase-params - 5.22.1-4
perlbase-posix - 5.22.1-4
perlbase-re - 5.22.1-4
perlbase-scalar - 5.22.1-4
perlbase-selectsaver - 5.22.1-4
perlbase-selfloader - 5.22.1-4
perlbase-socket - 5.22.1-4
perlbase-symbol - 5.22.1-4
perlbase-text - 5.22.1-4
perlbase-tie - 5.22.1-4
perlbase-unicore - 5.22.1-4
perlbase-utf8 - 5.22.1-4
perlbase-xsloader - 5.22.1-4
python - 2.7.13-4
python-base - 2.7.13-4
python-codecs - 2.7.13-4
python-compiler - 2.7.13-4
python-ctypes - 2.7.13-4
python-db - 2.7.13-4
python-decimal - 2.7.13-4
python-distutils - 2.7.13-4
python-email - 2.7.13-4
python-gdbm - 2.7.13-4
python-light - 2.7.13-4
python-logging - 2.7.13-4
python-multiprocessing - 2.7.13-4
python-ncurses - 2.7.13-4
python-openssl - 2.7.13-4
python-pydoc - 2.7.13-4
python-sqlite3 - 2.7.13-4
python-unittest - 2.7.13-4
python-xml - 2.7.13-4
python3 - 3.5.1-4
python3-asyncio - 3.5.1-4
python3-base - 3.5.1-4
python3-codecs - 3.5.1-4
python3-ctypes - 3.5.1-4
python3-dbm - 3.5.1-4
python3-decimal - 3.5.1-4
python3-distutils - 3.5.1-4
python3-email - 3.5.1-4
python3-gdbm - 3.5.1-4
python3-light - 3.5.1-4
python3-logging - 3.5.1-4
python3-lzma - 3.5.1-4
python3-multiprocessing - 3.5.1-4
python3-ncurses - 3.5.1-4
python3-openssl - 3.5.1-4
python3-pydoc - 3.5.1-4
python3-sqlite3 - 3.5.1-4
python3-unittest - 3.5.1-4
python3-xml - 3.5.1-4
rsync - 3.1.2-2
samba36-server - 3.6.25-5
speedtest_cli - unk
terminfo - 6.0-1c
usbutils - 007-3
whereis - 2.29.2-1
zlib - 1.2.8-1


Last edited by ZacWolf on Fri Jun 02, 2017 21:21; edited 1 time in total
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Sun Jun 04, 2017 13:24    Post subject: Reply with quote
OK, I think my problem is that I'm using a combination of kong's optware packages, and openwrt based entware-ng packages.

I tried to compile a basic hello.c, and the resulting binary wouldn't execute.

So I downloaded the DDWRT toolchains, but there are six ARM toolchains and I'm not sure which to use.

Here is the output from my /proc/cpuinfo
Code:
model name      : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1987.37
Features        : half fastmult edsp tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

model name      : ARMv7 Processor rev 0 (v7l)
processor       : 1
BogoMIPS        : 1993.93
Features        : half fastmult edsp tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : Northstar Prototype
Revision        : 0000
Serial          : 0000000000000000


I tried: toolchain-arm_cortex-a9_gcc-6.1.0_musl-1.1.15_eabi

but when I tried to execute some of the apps from /bin I get:
segmentation fault

Am I misunderstanding something basic about the toolchains? Are they for use only for cross-compiling from a 32-bit SuSe Linux build running on an X86 processor, or can they be used on the router itself?

I'd like to setup a proper build environment ON the router itself, is that possible?
dragonC
DD-WRT User


Joined: 23 May 2015
Posts: 272

PostPosted: Tue Jun 06, 2017 20:39    Post subject: Reply with quote
Would there be any attention or response on this? Especially with someone (ZacWolf) taking the time to try compiling the binaries on this toolchain - could that (http://www.dd-wrt.com/phpBB2/viewtopic.php?t=309526&sid=19d13f9ef31c21ce2e2d81774f07b6da) get some help having it set up so we can at least have more up-to-date optware options?
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Tue Jun 06, 2017 22:54    Post subject: Reply with quote
OK, I've setup a suse 64bit vm.

I've unzipped the toolchain:
toolchain-arm_cortex-a9_gcc-6.1.0_musl-1.1.15_eabi

I'm assuming this is the correct toolchain for my R8000?

I cd into the toolchain directory

I created hello.c
Code:
#include <stdio.h>

int
main (void)
{
  printf ("Hello, world!\n");
  return 0;
}


I run: ./arm-linux-gcc -Wall hello.c -o hello

No output, I get a binary fill named: hello

I scp that to my router.

I execute: ./hello

I get nothing.

Are there parameters I should be passing into ./arm-linux-gcc?
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Wed Jun 07, 2017 15:45    Post subject: Reply with quote
OK, based on what I could grock out of Makefile.northstar

I've tried these options:

Code:
#include <stdio.h>
int main (void){
  printf ("Hello, world!\n");
  return 0;
}


I untar'ed the toolchain-arm_cortex-a9_gcc-6.1.0_musl-1.1.15_eabi toolchain to: /root/toolchain

I execute:
Code:

linux-ukob:~/hello # /root/toolchain/bin/arm-linux-uclibc-gcc -Os -pipe -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -msoft-float -mfloat-abi=soft -fno-caller-saves -fno-plt -I/root/toolchain/include -L/root/toolchain/lib hello.c -o hello -static-libgcc

linux-ukob:~/hello # file hello
hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped

linux-ukob:~/hello # readelf -a hello | grep interpreter
      [Requesting program interpreter: /lib/ld-musl-arm.so.1]

linux-ukob:~/hello # objdump -x hello | grep NEEDED
  NEEDED               libc.so


This produces binary file: hello
I copy that over to my R8000, and execute: ./hello

...and I still get no output. I get nothing actually, no error, no output, nothing.


I checked, and my R8000 has:
/lib/libc.so
/lib/ld-musl-arm.so.1

I checked my LD_LIBRARY_PATH:
echo $LD_LIBRARY_PATH
/lib:/usr/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib

What am I missing?
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Wed Jun 07, 2017 16:28    Post subject: Reply with quote
OK, more investigation, when I ran the commands against an existing installed optware package (bash) I see:

Code:
readelf -a bash | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libncursesw.so.5]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so]


I searched, and libncursesw.so.5 isn't included in the toolchain, so my guess is that Kong is using a different toolchain to build his optware packages?

Kong, can we get access to your optware toolchain?
sertsa
DD-WRT Novice


Joined: 01 May 2015
Posts: 6

PostPosted: Wed Jun 07, 2017 23:43    Post subject: Reply with quote
Ncurses would not be needed for a simple hello world. Look up what it is: https://en.wikipedia.org/wiki/Ncurses

The silence here from the devs on the topic of upgrading Samba is getting a bit loud. Is it possible? Too large? Too many dependencies would need updated? Just don't have the time to tackle it? Any feedback at all?
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Thu Jun 08, 2017 2:01    Post subject: Reply with quote
sertsa wrote:
Ncurses would not be needed for a simple hello world.


Yeah, if you'll read again, ncurses was being used as a library requirement for an existing Kong Optware package (bash).

The point being, that the bash optware package from the Kong repo wasn't built with the standard DDWRT toolchain, because that toolchain doesn't include ncurses.

Plus, there actually IS an ncurses helloworld:
Code:
#include <ncurses.h>

int main()
{
        initscr();                      /* Start curses mode              */
        printw("Hello World !!!");      /* Print Hello World              */
        refresh();                      /* Print it on to the real screen */
        getch();                        /* Wait for user input */
        endwin();                       /* End curses mode                */

        return 0;
}


..that uses printw vs. printf; printf is apparently not always available across embedded devices, which might explain why my original hello binary seemed to execute, but produced no output. This is how I discovered that ncurses wasn't a part of the DDWRT toolchain.

I tried to cross compile the latest ncurses from source (to add to the toolchain), but seems there's an issue doing so from openSUSE. I'll try an earlier version of ncurses tomorrow to see if I can get it added to the toolchain, so that I can test if the lack of output issue is related to printf.

Until I can get a valid toolchain that will build the most basic C code, there's no chance of getting Samba to build.
sertsa
DD-WRT Novice


Joined: 01 May 2015
Posts: 6

PostPosted: Thu Jun 08, 2017 4:44    Post subject: Reply with quote
I get your point on the lack of ncurses indicating kongs toolchain being different than yours. But before spending time on ncurses, is it a dependency of Samba?
ZacWolf
DD-WRT Novice


Joined: 15 Apr 2010
Posts: 35

PostPosted: Thu Jun 08, 2017 9:02    Post subject: Reply with quote
I installed Kong's samba36-server package via opkg, then ran the same commands:

Code:
readelf -a samba_multicall | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so]


...and since I know that samba uses printf for output, apparently it is not a dependency, which points back to some missing option passed into gcc that isn't used in the DDWRT build (i.e. Makefile.northstar)?

At this point, I'm just trying to figure out what will get my simple hello world(s) to generate output, as that will provide me with the best idea of what options will also be necessary to build samba from source.

Comparing the objdump output of my hello binary:
Code:
objdump -x /opt/hello

/opt/hello:     file format elf32-littlearm
/opt/hello
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00010318

Program Header:
    PHDR off    0x00000034 vaddr 0x00010034 paddr 0x00010034 align 2**2
         filesz 0x000000c0 memsz 0x000000c0 flags r-x
  INTERP off    0x000000f4 vaddr 0x000100f4 paddr 0x000100f4 align 2**0
         filesz 0x00000016 memsz 0x00000016 flags r--
    LOAD off    0x00000000 vaddr 0x00010000 paddr 0x00010000 align 2**16
         filesz 0x00000460 memsz 0x00000460 flags r-x
    LOAD off    0x00000460 vaddr 0x00020460 paddr 0x00020460 align 2**16
         filesz 0x000000dc memsz 0x000000f8 flags rw-
 DYNAMIC off    0x00000468 vaddr 0x00020468 paddr 0x00020468 align 2**2
         filesz 0x000000b8 memsz 0x000000b8 flags rw-
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-

Dynamic Section:
  NEEDED               libc.so
  INIT                 0x000102cc
  FINI                 0x00010450
  INIT_ARRAY           0x00020460
  INIT_ARRAYSZ         0x00000004
  FINI_ARRAY           0x00020464
  FINI_ARRAYSZ         0x00000004
  HASH                 0x0001010c
  STRTAB               0x00010224
  SYMTAB               0x00010154
  STRSZ                0x0000008f
  SYMENT               0x00000010
  DEBUG                0x00000000
  PLTGOT               0x00020520
  PLTRELSZ             0x00000018
  PLTREL               0x00000011
  JMPREL               0x000102b4
private flags = 5000200: [Version5 EABI] [soft-float ABI]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .interp       00000016  000100f4  000100f4  000000f4  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .hash         00000048  0001010c  0001010c  0000010c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .dynsym       000000d0  00010154  00010154  00000154  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .dynstr       0000008f  00010224  00010224  00000224  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .rel.plt      00000018  000102b4  000102b4  000002b4  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .init         0000000c  000102cc  000102cc  000002cc  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  6 .plt          00000038  000102d8  000102d8  000002d8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  7 .text         00000140  00010310  00010310  00000310  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  8 .fini         0000000c  00010450  00010450  00000450  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  9 .eh_frame     00000004  0001045c  0001045c  0000045c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 10 .init_array   00000004  00020460  00020460  00000460  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 11 .fini_array   00000004  00020464  00020464  00000464  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 12 .dynamic      000000b8  00020468  00020468  00000468  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 13 .got          00000018  00020520  00020520  00000520  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 14 .data         00000004  00020538  00020538  00000538  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 15 .bss          0000001c  0002053c  0002053c  0000053c  2**2
                  ALLOC
 16 .comment      00000022  00000000  00000000  0000053c  2**0
                  CONTENTS, READONLY
 17 .ARM.attributes 00000039  00000000  00000000  0000055e  2**0
                  CONTENTS, READONLY
 18 .debug_aranges 00000070  00000000  00000000  00000598  2**3
                  CONTENTS, READONLY, DEBUGGING
 19 .debug_info   000001f0  00000000  00000000  00000608  2**0
                  CONTENTS, READONLY, DEBUGGING
 20 .debug_abbrev 000000b7  00000000  00000000  000007f8  2**0
                  CONTENTS, READONLY, DEBUGGING
 21 .debug_line   000000d3  00000000  00000000  000008af  2**0
                  CONTENTS, READONLY, DEBUGGING
 22 .debug_frame  00000028  00000000  00000000  00000984  2**2
                  CONTENTS, READONLY, DEBUGGING
 23 .debug_str    000001cc  00000000  00000000  000009ac  2**0
                  CONTENTS, READONLY, DEBUGGING
 24 .debug_loc    00000072  00000000  00000000  00000b78  2**0
                  CONTENTS, READONLY, DEBUGGING
 25 .debug_ranges 00000050  00000000  00000000  00000bf0  2**3
                  CONTENTS, READONLY, DEBUGGING
SYMBOL TABLE:
000100f4 l    d  .interp        00000000 .interp
0001010c l    d  .hash  00000000 .hash
00010154 l    d  .dynsym        00000000 .dynsym
00010224 l    d  .dynstr        00000000 .dynstr
000102b4 l    d  .rel.plt       00000000 .rel.plt
000102cc l    d  .init  00000000 .init
000102d8 l    d  .plt   00000000 .plt
00010310 l    d  .text  00000000 .text
00010450 l    d  .fini  00000000 .fini
0001045c l    d  .eh_frame      00000000 .eh_frame
00020460 l    d  .init_array    00000000 .init_array
00020464 l    d  .fini_array    00000000 .fini_array
00020468 l    d  .dynamic       00000000 .dynamic
00020520 l    d  .got   00000000 .got
00020538 l    d  .data  00000000 .data
0002053c l    d  .bss   00000000 .bss
00000000 l    d  .comment       00000000 .comment
00000000 l    d  .ARM.attributes        00000000 .ARM.attributes
00000000 l    d  .debug_aranges 00000000 .debug_aranges
00000000 l    d  .debug_info    00000000 .debug_info
00000000 l    d  .debug_abbrev  00000000 .debug_abbrev
00000000 l    d  .debug_line    00000000 .debug_line
00000000 l    d  .debug_frame   00000000 .debug_frame
00000000 l    d  .debug_str     00000000 .debug_str
00000000 l    d  .debug_loc     00000000 .debug_loc
00000000 l    d  .debug_ranges  00000000 .debug_ranges
00000000 l    df *ABS*  00000000 crt1.c
00000000 l    df *ABS*  00000000 /root/toolchain/bin/../lib64/gcc/arm-openwrt-linux-muslgnueabi/6.1.0/../../../../arm-openwrt-linux-muslgnueabi/lib/crti.o
00000000 l    df *ABS*  00000000 /root/toolchain/bin/../lib64/gcc/arm-openwrt-linux-muslgnueabi/6.1.0/../../../../arm-openwrt-linux-muslgnueabi/lib/crtn.o
00000000 l    df *ABS*  00000000 hello.c
00000000 l    df *ABS*  00000000 crtstuff.c
0001045c l     O .eh_frame      00000000 __EH_FRAME_BEGIN__
00010370 l     F .text  00000000 deregister_tm_clones
000103a0 l     F .text  00000000 register_tm_clones
000103d8 l     F .text  00000000 __do_global_dtors_aux
0002053c l     O .bss   00000001 completed.7875
00020464 l     O .fini_array    00000000 __do_global_dtors_aux_fini_array_entry
00010420 l     F .text  00000000 frame_dummy
00020540 l     O .bss   00000018 object.7880
00020460 l     O .init_array    00000000 __frame_dummy_init_array_entry
00000000 l    df *ABS*  00000000 crtstuff.c
0001045c l     O .eh_frame      00000000 __FRAME_END__
00000000 l    df *ABS*  00000000
00020468 l     O .dynamic       00000000 _DYNAMIC
00020520 l     O .got   00000000 _GLOBAL_OFFSET_TABLE_
00020558 g       .bss   00000000 _bss_end__
0002053c g     O .data  00000000 .hidden __TMC_END__
0002053c g       .bss   00000000 __bss_start__
00020538 g     O .data  00000000 .hidden __dso_handle
000102cc g     F .init  00000004 _init
00000000  w      *UND*  00000000 __deregister_frame_info
00000000  w      *UND*  00000000 _ITM_registerTMCloneTable
00020558 g       .bss   00000000 __bss_end__
00010318 g     F .text  00000000 _start
0001033c g     F .text  00000034 _start_c
00000000  w      *UND*  00000000 _ITM_deregisterTMCloneTable
0002053c g       .bss   00000000 __bss_start
00010310 g     F .text  00000008 main
00020558 g       .bss   00000000 __end__
00010450 g     F .fini  00000004 _fini
0002053c g       .data  00000000 _edata
00020558 g       .bss   00000000 _end
00000000       F *UND*  00000000 __libc_start_main
00000000  w      *UND*  00000000 __register_frame_info


To that of the objdump of samba_multi:
Code:
objdump -x samba_multicall

samba_multicall:     file format elf32-littlearm
samba_multicall
architecture: arm, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x00014220

Program Header:
    PHDR off    0x00000034 vaddr 0x00010034 paddr 0x00010034 align 2**2
         filesz 0x000000e0 memsz 0x000000e0 flags r-x
  INTERP off    0x00000114 vaddr 0x00010114 paddr 0x00010114 align 2**0
         filesz 0x0000001a memsz 0x0000001a flags r--
    LOAD off    0x00000000 vaddr 0x00010000 paddr 0x00010000 align 2**16
         filesz 0x0015c074 memsz 0x0015c074 flags r-x
    LOAD off    0x0015ca78 vaddr 0x0017ca78 paddr 0x0017ca78 align 2**16
         filesz 0x0000486c memsz 0x000059a8 flags rw-
 DYNAMIC off    0x0015ca84 vaddr 0x0017ca84 paddr 0x0017ca84 align 2**2
         filesz 0x00000108 memsz 0x00000108 flags rw-
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
         filesz 0x00000000 memsz 0x00000000 flags rw-
   RELRO off    0x0015ca78 vaddr 0x0017ca78 paddr 0x0017ca78 align 2**0
         filesz 0x00000588 memsz 0x00000588 flags r--
private flags = 5000202: [Version5 EABI] [soft-float ABI] [has entry point]

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
SYMBOL TABLE:
no symbols


Might provide some clues, so I'll start to google the various symbols, etc. The "HAS_SYMS" of my hello compiled with the DDWRT toolchain might be a big clue.

But ultimately without Kong's toolchain, this is all academic because he's made it clear that he's done something "different" since entware-nt packages aren't interchangeable though they are built for the same architecture. That may be something mundane like different build option, or more likely modifying the kernel or basic libraries to minimize them for an embedded system. At this point I'm just trying anything and seeing what sticks.
ironmanlok
DD-WRT User


Joined: 16 Jul 2012
Posts: 59

PostPosted: Thu Jun 08, 2017 18:21    Post subject: Reply with quote
I've seen some makefiles on dd-wrt sources with options for removing printf. Also builtin smb binaries doesn't return any text at all, I discovered that when I was trying to get sambas version.

My bet is to use something else to test your hello world, maybe write a file to /tmp?
ironmanlok
DD-WRT User


Joined: 16 Jul 2012
Posts: 59

PostPosted: Mon Sep 04, 2017 15:36    Post subject: Reply with quote
Quote:
The change in question is simply changing the default cifs behavior:
instead of defaulting to SMB 1.0 (which you really should not use:
just google for "stop using SMB1" or similar), the default cifs mount
now defaults to a rather more modern SMB 3.0.

Now, because you shouldn't have been using SMB1 anyway, this shouldn't
affect anybody. But guess what? It almost certainly does affect some
people, because they blithely continued using SMB1 without really
thinking about it.

from http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1483976.html

So, will we ever have any alternative to SMB1 only samba on dd-wrt, or should we just move on to another firmware?
dragonC
DD-WRT User


Joined: 23 May 2015
Posts: 272

PostPosted: Mon Sep 04, 2017 18:23    Post subject: Reply with quote
ironmanlok wrote:
Quote:
The change in question is simply changing the default cifs behavior:
instead of defaulting to SMB 1.0 (which you really should not use:
just google for "stop using SMB1" or similar), the default cifs mount
now defaults to a rather more modern SMB 3.0.

Now, because you shouldn't have been using SMB1 anyway, this shouldn't
affect anybody. But guess what? It almost certainly does affect some
people, because they blithely continued using SMB1 without really
thinking about it.

from http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1483976.html

So, will we ever have any alternative to SMB1 only samba on dd-wrt, or should we just move on to another firmware?


I was wondering about this since this thread came about. Devs, both Brainslayer and <Kong> have been ignoring this completely. DD-WRT, with my little understanding, only supports SMB1.0. When can we have a more modern/secure solution? Or at least educate us why sticking with SMB1 or Samba3 is a preferred approach here?
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 2 of 4
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum