1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomatoware

Discussion in 'Tomato Firmware' started by lancethepants, Mar 7, 2014.

  1. leandroong

    leandroong Addicted to LI Member

    @lancetheparts, successfully build of transmission-mipsel-static without using "-static".
    note: I use nightly revision build.
     
  2. lancethepants

    lancethepants Network Guru Member

    @noyp Have you considered or looked at confbridge? It's supposed to have meetme's functionality, and is already included in asterisk.
     
  3. noyp

    noyp Network Guru Member

    ya, confbridge is the updated version of meetme, anyhow im just testing an asterisk based project that needs meetme functionality.
     
  4. leandroong

    leandroong Addicted to LI Member

    @lancethepants, is it possible for future release of tomatoware folder located on same level as /opt? I want to exclude tomatoware folder from backup of /opt folder. This is just an idea ...

    Edit: Is changing path from profile enough?
     
    Last edited: May 13, 2014
  5. lancethepants

    lancethepants Network Guru Member

    @leandroong I'm not sure if I understand exactly what you're asking. There is an /opt version of Tomatoware available for use. However, you should not let both tomatoware and entware both reside in /opt root dir, because they will clash. If you are using entware, tomatoware then has to go somewhere else, like /opt/tomatoware /mmc, etc.
     
  6. leandroong

    leandroong Addicted to LI Member

    1. entware static compilation , I only use that in ubuntu pc

    2. Purpose of wishing to relocate /media/optware/opt/tomatoware to /media/optware/tomatoware is for better maintenance, easier and faster to backup of /media/optware/opt since I dont have to worry how to exclude /media/optware/opt/tomatoware.

    3. I remember you told me before that this is not possible due to hardcoded path. If this is still the case, then I just have to adjust.

    4. I like both concept that you are introducing, namely, tomatoware and mipsel-static compilation on ubuntu pc. But for 3 programs that I'm using, namely, transmission, aria2 and dnscrypt-proxy, I prefer compiling that on ubuntu. Only missing, MPD-mipsel-static.
     
  7. leandroong

    leandroong Addicted to LI Member

    Idea that I have in my mind is having ability to define "prefix" in profile. Example, instead of using "./configure --prefix=/opt/tomatoware", you will make this into variable define in profile, like, PREFIX="/opt" that is editable by user. During compilation, user just use "./configure", no more "--prefix=/opt". With this relocation is now possible. Ignore this if not feasible.
     
  8. ryzhov_al

    ryzhov_al Networkin' Nut Member

    I strongly recommend to recompile our toolchain for any path different from /opt. Here is a patches for uClibc dynamic loader.
     
  9. lancethepants

    lancethepants Network Guru Member

    Interesting idea actually, I had not considered this. Have you already tried throwing a value for prefix in profile? I disconnected my hard-drive last night and forgot to reconnect it, so I'll try this later.


    yes, I learned this by trial and error. Seems all those toolchain libraries; librt, libc, libpthread etc, look specifically for eachother in /opt/lib. and won't work otherwise.
    I have scripted tomatoware to adjusts the patches depending on the prefix Tomatoware is being compiled for.
    Code:
    sed -i 's,\/opt,'"$PREFIX"',g' \
        patches-uclibc/001-uclibc-ldso-search-path.patch \
        patches-uclibc/002-uclibc-ldconfig-opt.patch \
        patches-uclibc/003-uclibc-dl-defs.patch \
        patches-uclibc/004-uclibc-ldd-opt.patch
    
    I have a handful of toolchains for different prefixes; /mmc, /jffs, /opt, /opt/tomatoware, and any new prefix requires it's own toolchain.

    I kind of like the concept of musl libc for this reason. Everything is contained in one library libc.so. Even the dynamic linker and ldd command are just symbolic links to libc.so
     
  10. leandroong

    leandroong Addicted to LI Member

    Initial test. This is what I did
    1. mkdir /media/optware/tomatoware && extract new copy of mipsel-opt-tomatoware.tgz
    2. open terminal, change path to
    3. test compile
    - cd /media/optware/build/transmission/xml_parser
    - tar xvzf XML-Parser-2.41.tar.gz
    - cd XML_Parser-2.41
    Still hard coded when issuing make install, portion of result as follow:
     
    Last edited: May 14, 2014
  11. leandroong

    leandroong Addicted to LI Member

    @lancethepants, I notice that one of your commit, for next release, "Add support mipsel soft-float, and make it default." Today, In entware/optware compilation of MPD-0.18.11, the generated ipk will not work on my router, is this an arm router perhaps?
    Switching mode to entware/optware hardware mode is compatible with my router.
    Maybe we should have an option to choose also, otherwise, it may not work
     
  12. lancethepants

    lancethepants Network Guru Member

    Soft-float as I understand should work everywhere where hard-float works. I've been using Tomatoware compiled with soft-float for several weeks. It theoretically should perform better. I couldn't say why MPD isn't working. There hasn't been anything released for arm by entware afaik.
     
  13. leandroong

    leandroong Addicted to LI Member

    1st attempt installation of mipselfs.ipk, it says wrong architecture.
    2nd attempt, it ignores the mipselfs.ipk repo and install the mipsel repo.
    using the entware compiled repo, it went smooth.
    Seems mipselfs is not installable yet.
     
  14. lancethepants

    lancethepants Network Guru Member

    Are you wiping out the previous entware installation to install the soft-float? You can't mix soft-float ipks with hard-float entware installation? What router do you have?
     
  15. leandroong

    leandroong Addicted to LI Member

    Just remove the mpd-full using "opkg remove mpd-full". Maybe whole repo installed need to be replaced.
     
  16. lancethepants

    lancethepants Network Guru Member

    Yes. There is different repo entirely.
     
  17. leandroong

    leandroong Addicted to LI Member

    ModelZTE ZXV10 H618B
    ChipsetBroadcom BCM5354
    CPU Freq240MHz
    Flash Size16MB

    Does it mean new entware-install, maybe "mipselfs-install" ?
     
  18. lancethepants

    lancethepants Network Guru Member

    Yes, there is another installer.
     
  19. leandroong

    leandroong Addicted to LI Member

    ok... thanks
     
  20. lancethepants

    lancethepants Network Guru Member

    The Master and koitsu like this.
  21. david3

    david3 Addicted to LI Member

    Just wanted to say thanks for this. I ended up getting rid of optware, since I was using it mainly for asterisk, and tomatoware includes that already, and it's a newer version. Sometimes it takes a long time to see asterisk updated on optware.

    It's working well so far, and I was able to compile several utilities as well:

    nano
    dig, host, nslookup (bind-utils)
    jwhois
    zip (infozip)
    iftop
    tcpdump

    It took me a long time to get jwhois to compile and work properly. It needed several patches applied, but it works now. I also tried for a long time to get mtr to compile, but gave up on that one.
     
  22. leandroong

    leandroong Addicted to LI Member

  23. lancethepants

    lancethepants Network Guru Member

    I'm a little unconventional, but then neither is creating purely static libraries. Sometimes autoconf based stuff just won't allow it if you play by the rules. And transmission can be a pain with that.

    Try replacing
    Code:
    LIBS="-all-static -ldl"
    
    with
    Code:
    LIBS="-all-static -ldl -lm"
    
     
    Last edited: Jul 29, 2014
  24. leandroong

    leandroong Addicted to LI Member

    Re-compilation is now successful. Thanks again.
    Is there a problem, of me not recompiling the unaltered libraries ?
     

    Attached Files:

  25. lancethepants

    lancethepants Network Guru Member

    Something changed in their code post 2.84, nothing to do with the other libraries.
     
  26. leandroong

    leandroong Addicted to LI Member

    Thanks, they have fixed that issue, no need for "-lm".
    Unrelated question, I'm curious why entware optware empty for the ff directories:
    1. /opt/etc/ssl
    2. /opt/etc/private

    During binary compilation of transmission, for instance, it compile library for openssl and generates certificates for ssl. Should I be copying that to above empty folders?
     
  27. lancethepants

    lancethepants Network Guru Member

    I'm not sure what the certs would be for.
     
  28. HunterZ

    HunterZ LI Guru Member

    So I decided to compile on my Xubuntu box because the latest releases are a few months behind the source (and because I stupidly didn't realize until too far in that mipsel-soft-opt-tomatoware.tgz probably means /opt/tomatoware prefix).

    The repo is over 1.2GB (!) and the the compile bombed out after a couple of hours (!!):
    Code:
    creating Makefile
    + make -j2
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
    ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl
    gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include  -DPy_BUILD_CORE -o Parser/tokenizer_pgen.o Parser/tokenizer_pgen.c
    Error visiting Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])], [])
    not all arguments converted during string formatting
    Traceback (most recent call last):
      File "/home/ben/projects/tomatoware/src/python/Python-2.7.3-native/Parser/asdl.py", line 306, in visit
      meth(object, *args)
      File "./Parser/asdl_c.py", line 1012, in visitSum
      self.simpleSum(sum, name)
      File "./Parser/asdl_c.py", line 1036, in simpleSum
      self.emit("default:" % name, 2)
    TypeError: not all arguments converted during string formatting
    make[1]: *** [Python/Python-ast.c] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    make: *** [tomatoware] Error 2
    
    I guess I'll get the latest mipsel-soft-opt-tomatoware.tgz instead.

    P.S. What is the stuff it's putting in /opt/tomatoware on the Xubuntu box? Is it useful for anything after the compile is done?
     
  29. lancethepants

    lancethepants Network Guru Member

    Yeah, it has become a behemoth. It's because I package all the source instead of having tomatoware download it. Having it dl all the source takes a long time, it's much faster for me to clone the repo. The downside is, whenever I update a package, the old source still remains. I'm going to rebase it at some point, and that will bring the size down to ~300-400 MB.
    Hmm, not exactly sure why it's bombing out. I've been compiling on debian, but I know of at least one other person that compiled successfully on ubuntu. Not sure what version of Ubuntu your Xubuntu is based from though. You could try deleting the '.extracted' file in the python src folder, and try running make again to check it wasn't a fluke. Python compiles natively for the machine first, and then is used to help with the cross-compilation. You could try commenting out the section that does the native compilation first, and just maybe it will use python that comes pre-packaged just fine.
    The stuff that goes in /opt/tomatoware is the toolchain. Each different prefix needs its own.

    edit: I'll make another release soon, once I check everything is up-to-date.
     
  30. HunterZ

    HunterZ LI Guru Member

    I got the precompiled mipsel-soft-opt-tomatoware.tgz working instead, which required making a symbolic link in my entware directory, as it's mounted as /opt.

    It would have been nicer to have Tomatoware on something like /cifs1/tomatoware since I currently use a CIFS (Samba) mount to my Linux box as my persistent storage for the router, but I don't think I'll go through the headache of trying to compile again unless the post-release updates are worth it.
     
  31. HunterZ

    HunterZ LI Guru Member

    I also get the following warnings when statically linking pixelserv, but not when dynamically linking:
    Code:
    /cifs1/tomatoware/bin/../../tomatoware/lib/libc.so.0: warning: gethostbyname_r is obsolescent, use getnameinfo() instead.
    /cifs1/tomatoware/bin/../../tomatoware/lib/libc.so.0: warning: gethostbyaddr_r is obsolescent, use getaddrinfo() instead.
    pixelserv itself uses getaddrinfo() and not any of the other functions mentioned, so it must be the library itself that is using the calls?
     
  32. lancethepants

    lancethepants Network Guru Member

    Looks like libc. Shouldn't cause any issues I imagine though, just a warning.
    Did you manage to compile with cifs1 prefix?
    I've been doing some updates. Currently uploading the smaller rebased git repo, which will require a re-clone.
     
  33. HunterZ

    HunterZ LI Guru Member

    Haven't tried. Won't have time until at least Friday.
     
  34. leandroong

    leandroong Addicted to LI Member

    Thanks again for the new release.
     
  35. lancethepants

    lancethepants Network Guru Member

  36. HunterZ

    HunterZ LI Guru Member

    Thanks, I'm giving compiling another shot, with a prefix of /cifs1/tomatoware. The clone says repo size is 459.86 MiB.

    If you're curious, here is my host system info (yes, it's a very old machine from around 2006, but it's been a great Linux workhorse):
    OS: Ubuntu 14.04.1 LTS, Linux 3.13.0-35-generic x86_64
    CPU: AMD Athlon 64 X2 Dual Core 4200+ (2.2GHz)
    RAM: 2GB (2x1GB dual channel I think, or maybe 4x512MB).
     
  37. leandroong

    leandroong Addicted to LI Member

    How can I compile static lighttpd? This is what I did:
    1. cd <lighttpd>
    2. ./autogen.sh
    3. ./configure LDFLAGS="-static" --prefix=/opt/tomatoware

    Code:
    Dynamic section at offset 0x190 contains 29 entries:
      Tag        Type                         Name/Value
    0x00000001 (NEEDED)                     Shared library: [libpcre.so.1]
    0x00000001 (NEEDED)                     Shared library: [libdl.so.0]
    0x00000001 (NEEDED)                     Shared library: [libc.so.0]
    0x0000000f (RPATH)                      Library rpath: [/opt/tomatoware/lib]
    0x0000000c (INIT)                       0x404000
    
     
  38. HunterZ

    HunterZ LI Guru Member

    Tomatoware Git compile failed while compiling gettext:
    Code:
    libtool: compile:  mipsel-linux-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I./libcroco -I/home/ben/projects/tomatoware/cifs1/tomatoware/include -O2 -pipe -mips32 -mtune=mips32 -c term-styled-ostream.c  -fPIC -DPIC -o .libs/term-styled-ostream.o
    In file included from ./libxml/parser.h:797,
      from ./libxml/globals.h:19,
      from ./libxml/threads.h:36,
      from ./libxml/xmlmemory.h:217,
      from ./libxml/tree.h:1205,
      from ./libcroco/cr-sel-eng.h:34,
      from term-styled-ostream.oo.c:26:
    ./libxml/encoding.h:29:19: error: iconv.h: No such file or directory
    In file included from ./libxml/parser.h:797,
      from ./libxml/globals.h:19,
      from ./libxml/threads.h:36,
      from ./libxml/xmlmemory.h:217,
      from ./libxml/tree.h:1205,
      from ./libcroco/cr-sel-eng.h:34,
      from term-styled-ostream.oo.c:26:
    ./libxml/encoding.h:137: error: expected specifier-qualifier-list before 'iconv_t'
    make[6]: *** [term-styled-ostream.lo] Error 1
    make[6]: *** Waiting for unfinished jobs....
    libtool: compile:  mipsel-linux-gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -DLIBXML_STATIC -I./libcroco -I/home/ben/projects/tomatoware/cifs1/tomatoware/include -O2 -pipe -mips32 -mtune=mips32 -c term-ostream.c -o term-ostream.o >/dev/null 2>&1
    make[6]: Leaving directory `/home/ben/projects/tomatoware/src/gettext/gettext-0.19.2/gettext-tools/gnulib-lib'
    make[5]: *** [all] Error 2
    make[5]: Leaving directory `/home/ben/projects/tomatoware/src/gettext/gettext-0.19.2/gettext-tools/gnulib-lib'
    make[4]: *** [all-recursive] Error 1
    make[4]: Leaving directory `/home/ben/projects/tomatoware/src/gettext/gettext-0.19.2/gettext-tools'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/ben/projects/tomatoware/src/gettext/gettext-0.19.2/gettext-tools'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/ben/projects/tomatoware/src/gettext/gettext-0.19.2'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/gettext/gettext-0.19.2'
    make: *** [tomatoware] Error 2
    Edit: The iconv.h file is present on the host system in /usr/include, so Tomatoware must be missing an internal one that it needs.
     
  39. lancethepants

    lancethepants Network Guru Member

    @leandroong
    lighttpd is interesting because it goes back and forth between using libtool and not using it, it's kinda rediculous.
    In situation where libtool is exclusively used, you would put "LDFALGS="-all-static". In this case, using "-all-static" results in ./configure failing, because they selectively use libtool. When not using libtool (as in ./configure), "-all-static" is not a valid gcc argument and it barfs.
    You could try adding the LDFLAGS command with make instead. Probably will fail in some cases though. Probably will have to do the following.

    Let it completely compile without putting anything for LDFLAGS. When if finishes, delete the lighttpd binary, then run "make LDFLAGS="-all-static".
    Repeat for other binaries it produces if wanted. I haven't looked, but some may need "-static" instead if they decided not to use libtool for some.

    @HunterZ
    I've seen that issue arise in other cases, but not in Tomatoware personally for some reason. Try cutting the iconv section and placing it before gettext. Also, delete the .extracted file in gettext, and it will start over gettext compilation after iconv compiles, so you don't have to start completely over, just run make again. Maybe will resolve this issue. Make sure to have installed the software in the README if you haven't already (I'm guessing you have though.)
     
  40. HunterZ

    HunterZ LI Guru Member

    I now get a different error that looks related:
    Code:
    config.status: executing tests/atconfig commands
    + touch .configured
    + '[' '!' -f .built ']'
    + make -j2
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11'
    make  all-recursive
    make[2]: Entering directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11'
    Making all in po
    make[3]: Entering directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11/po'
    make[3]: Leaving directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11/po'
    Making all in src
    make[3]: Entering directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11/src'
      CC  err.o
      CC  mem.o
      CC  parseopt.o
      CC  progname.o
      CC  gdbmclose.lo
      CC  gdbmcount.lo
      CC  gdbmdelete.lo
      CC  gdbmdump.lo
      CC  gdbmerrno.lo
      CC  gdbmexists.lo
      CC  gdbmexp.lo
      CC  gdbmfdesc.lo
      CC  gdbmfetch.lo
      CC  gdbmload.lo
      CC  gdbmopen.lo
      CC  gdbmimp.lo
      CC  gdbmreorg.lo
      CC  gdbmseq.lo
      CC  gdbmsetopt.lo
      CC  gdbmstore.lo
      CC  gdbmsync.lo
      CC  base64.lo
      CC  bucket.lo
      CC  falloc.lo
      CC  findkey.lo
      CC  fullio.lo
      CC  hash.lo
      CC  lock.lo
      CC  mmap.lo
      CC  update.lo
      CC  version.lo
      CC  datconv.o
      CC  gram.o
      CC  lex.o
      CC  gdbmtool.o
      CC  var.o
      CC  util.o
      CC  gdbm_load.o
      CC  gdbm_dump.o
      CCLD  libgdbm.la
      AR  libgdbmapp.a
    /bin/grep: /cifs1/tomatoware/lib/libiconv.la: No such file or directory
    /bin/sed: can't read /cifs1/tomatoware/lib/libiconv.la: No such file or directory
    libtool: link: `/cifs1/tomatoware/lib/libiconv.la' is not a valid libtool archive
    make[3]: *** [libgdbm.la] Error 1
    make[3]: Leaving directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/libgdbm/gdbm-1.11'
    make: *** [tomatoware] Error 2
    Yes, I was very careful to check the README's required package list against what I have installed and then install the missing ones.

    Edit: Why is it complaining about a /cifs1 path on the host machine? That path is one that I hope to use on the router, not on the host machine!

    Edit 2: The lib is present at ./cifs1/tomatoware/lib/libiconv.la, so maybe the script is screwed up and is trying to look there?
     
    Last edited: Sep 26, 2014
  41. leandroong

    leandroong Addicted to LI Member

    I was able to compile static. Using "make LDFLAGS="-all-static". Problem, I think something is wrong. I was able to run this on previous tomatoware even though it is not static.
    Error as follows:

    Code:
    /opt/etc/init.d # /opt/sbin/lighttpd -f /opt/etc/lighttpd/lighttpd.conf
    cat: /opt/etc/lighttpd/conf.d/*.conf: No such file or directory
    2014-09-27 04:42:07: (plugin.c.169) dlopen() failed for: /opt/tomatoware/lib/mod_indexfile.so File not found
    2014-09-27 04:42:07: (server.c.679) loading plugins finally failed
    
    edit: will try to reinstall 0.9.0 and test compile again. Will report result
     
    Last edited: Sep 26, 2014
  42. lancethepants

    lancethepants Network Guru Member

  43. HunterZ

    HunterZ LI Guru Member

    Any ideas on my library issue?
     
  44. lancethepants

    lancethepants Network Guru Member

    Just really quick, there's a sed command later in the code that does some modifying with iconv. It needs to be moved up with the the iconv area and run There's a couple places I need to adjust these sed commands, but this one should fix this issue. I'll push something tomorrow, I'll have more time.
     
  45. HunterZ

    HunterZ LI Guru Member

    Thanks, I'll just hang tight until you've had a chance to look at it.
     
  46. leandroong

    leandroong Addicted to LI Member

    @lancethepants, found build static written by japanese programer I hope, when you have free time, you might want to take a look at this and convert to your standard build static format and add it to your repositories.
    URL: http://sound79.tistory.com/161
     
  47. leandroong

    leandroong Addicted to LI Member

    @lancetheparts, I'm glad you have alternative static ready, "NGINX". I think, I will use that.
     
  48. lancethepants

    lancethepants Network Guru Member

    @HunterZ
    I pushed a commit. See how far this takes you.
     
  49. HunterZ

    HunterZ LI Guru Member

    Thanks. A few minutes after you posted, I cleaned my git clone and removed /opt/tomatoware and then pulled the latest revision. I then re-edited config.mk to set PREFIX=/cifs1/tomatoware and ran make. It's still going a bit over an hour and a half later.

    One odd thing: It didn't seem to ask me for my password to re-create /opt/tomatoware. I wonder if the rm -rf somehow didn't clean it out completely? Hopefully whatever made it behave differently won't hurt anything.
     
  50. HunterZ

    HunterZ LI Guru Member

    Whoops, spoke too soon:
    Code:
    + export PKG_CONFIG_LIBDIR=/home/ben/projects/tomatoware/cifs1/tomatoware/lib/pkgconfig
    + PKG_CONFIG_LIBDIR=/home/ben/projects/tomatoware/cifs1/tomatoware/lib/pkgconfig
    + cd /home/ben/projects/tomatoware/src/libpar2
    + '[' '!' -f .extracted ']'
    + cd libpar2-0.4
    + '[' '!' -f .configured ']'
    + '[' '!' -f .built ']'
    + make -j2
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make  all-am
    make[2]: Entering directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make[2]: Leaving directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    + touch .built
    + '[' '!' -f .installed ']'
    + make install DESTDIR=/home/ben/projects/tomatoware
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make[2]: Entering directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    test -z "/cifs1/tomatoware/lib" || /bin/mkdir -p "/home/ben/projects/tomatoware/cifs1/tomatoware/lib"
    /bin/bash ./libtool  --mode=install /usr/bin/install -c  libpar2.la '/home/ben/projects/tomatoware/cifs1/tomatoware/lib'
    libtool: install: /usr/bin/install -c .libs/libpar2.so.1.0.0 /home/ben/projects/tomatoware/cifs1/tomatoware/lib/libpar2.so.1.0.0
    libtool: install: (cd /home/ben/projects/tomatoware/cifs1/tomatoware/lib && { ln -s -f libpar2.so.1.0.0 libpar2.so.1 || { rm -f libpar2.so.1 && ln -s libpar2.so.1.0.0 libpar2.so.1; }; })
    libtool: install: (cd /home/ben/projects/tomatoware/cifs1/tomatoware/lib && { ln -s -f libpar2.so.1.0.0 libpar2.so || { rm -f libpar2.so && ln -s libpar2.so.1.0.0 libpar2.so; }; })
    libtool: install: /usr/bin/install -c .libs/libpar2.lai /home/ben/projects/tomatoware/cifs1/tomatoware/lib/libpar2.la
    /usr/bin/install: cannot stat '.libs/libpar2.lai': No such file or directory
    make[2]: *** [install-libLTLIBRARIES] Error 1
    make[2]: Leaving directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make[1]: *** [install-am] Error 2
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make: *** [tomatoware] Error 2
    Tried removing .extracted from src/libpar2 and re-running make, and got a different error:
    Code:
    /bin/bash ./libtool --tag=CXX  --mode=link mipsel-linux-g++ -Wall -O2 -pipe -mips32 -mtune=mips32 -version-info 1:0:0 -L/home/ben/projects/tomatoware/cifs1/tomatoware/lib -s -Wl,--dynamic-linker=/cifs1/tomatoware/lib/ld-uClibc.so.0 -Wl,-rpath,/cifs1/tomatoware/lib -Wl,-rpath-link,/home/ben/projects/tomatoware/cifs1/tomatoware/lib -o libpar2.la -rpath /cifs1/tomatoware/lib libpar2.lo parheaders.lo par2cmdline.lo commandline.lo crc.lo creatorpacket.lo criticalpacket.lo datablock.lo descriptionpacket.lo diskfile.lo filechecksummer.lo galois.lo mainpacket.lo md5.lo par1fileformat.lo par1repairer.lo par1repairersourcefile.lo par2creator.lo par2creatorsourcefile.lo par2fileformat.lo par2repairer.lo par2repairersourcefile.lo recoverypacket.lo reedsolomon.lo verificationhashtable.lo verificationpacket.lo  -lsigc-2.0 -lstdc++
    libtool: link: warning: library `/home/ben/projects/tomatoware/cifs1/tomatoware/lib/libsigc-2.0.la' was moved.
    libtool: link: warning: library `/home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/libstdc++.la' was moved.
    libtool: link: mipsel-linux-g++  -fPIC -DPIC -shared -nostdlib /home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/crti.o /home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/crtbeginS.o  .libs/libpar2.o .libs/parheaders.o .libs/par2cmdline.o .libs/commandline.o .libs/crc.o .libs/creatorpacket.o .libs/criticalpacket.o .libs/datablock.o .libs/descriptionpacket.o .libs/diskfile.o .libs/filechecksummer.o .libs/galois.o .libs/mainpacket.o .libs/md5.o .libs/par1fileformat.o .libs/par1repairer.o .libs/par1repairersourcefile.o .libs/par2creator.o .libs/par2creatorsourcefile.o .libs/par2fileformat.o .libs/par2repairer.o .libs/par2repairersourcefile.o .libs/recoverypacket.o .libs/reedsolomon.o .libs/verificationhashtable.o .libs/verificationpacket.o  -Wl,-rpath -Wl,/home/ben/projects/tomatoware/cifs1/tomatoware/lib -Wl,-rpath -Wl,/home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib -Wl,-rpath -Wl,/home/ben/projects/tomatoware/cifs1/tomatoware/lib -Wl,-rpath -Wl,/home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib -L/home/ben/projects/tomatoware/cifs1/tomatoware/lib /home/ben/projects/tomatoware/cifs1/tomatoware/lib/libsigc-2.0.so -L/home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4 -L/home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc -L/home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib /home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/libstdc++.so -lm -lc -lgcc_s /home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/crtendS.o /home/ben/projects/tomato/tools/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/../lib/gcc/mipsel-linux-uclibc/4.2.4/../../../../mipsel-linux-uclibc/lib/crtn.o  -O2 -mips32 -mtune=mips32 -Wl,--dynamic-linker=/cifs1/tomatoware/lib/ld-uClibc.so.0 -Wl,-rpath -Wl,/cifs1/tomatoware/lib -Wl,-rpath-link -Wl,/home/ben/projects/tomatoware/cifs1/tomatoware/lib  -Wl,-soname -Wl,libpar2.so.1 -o .libs/libpar2.so.1.0.0
    libtool: link: (cd ".libs" && rm -f "libpar2.so.1" && ln -s "libpar2.so.1.0.0" "libpar2.so.1")
    libtool: link: (cd ".libs" && rm -f "libpar2.so" && ln -s "libpar2.so.1.0.0" "libpar2.so")
    libtool: link: mipsel-linux-ar cru .libs/libpar2.a  libpar2.o parheaders.o par2cmdline.o commandline.o crc.o creatorpacket.o criticalpacket.o datablock.o descriptionpacket.o diskfile.o filechecksummer.o galois.o mainpacket.o md5.o par1fileformat.o par1repairer.o par1repairersourcefile.o par2creator.o par2creatorsourcefile.o par2fileformat.o par2repairer.o par2repairersourcefile.o recoverypacket.o reedsolomon.o verificationhashtable.o verificationpacket.o
    libtool: link: mipsel-linux-ranlib .libs/libpar2.a
    /bin/sed: can't read /opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib/libstdc++.la: No such file or directory
    libtool: link: `/opt/brcm/hndtools-mipsel-uclibc-4.2.4/mipsel-linux-uclibc/lib/libstdc++.la' is not a valid libtool archive
    make[2]: *** [libpar2.la] Error 1
    make[2]: Leaving directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/libpar2/libpar2-0.4'
    make: *** [tomatoware] Error 2
    Seems totally hosed :(

    Edit: Crap, /opt/brcm is a symlink to my Shibby (or was it Toastman?) Tomato cross-compiler toolchain. I just realized I was running from an environment that was pointing my path at that, so maybe Tomatoware got confused. Maybe I'll start over from scratch one more time...
     
    Last edited: Sep 27, 2014
  51. lancethepants

    lancethepants Network Guru Member

    On debian and I suspect ubuntu, once you've used sudo with your password, it doesn't ask again for x amount of minutes or if you start a new terminal. Maybe you used sudo to remove the directory and then began building immediately.

    Interesting, I know before you had made it past this part, to the python area I thought previously. Looks like you ran make again, which is fine. It built fine, just an issue with installing, weird. Try removing the .extracted file in the libpar source and run make again, cause I'm not sure currently why it fails to install.
     
  52. HunterZ

    HunterZ LI Guru Member

    Added some more info to my post.

    Edit: And you're probably right about sudo. I hadn't thought of that.
     
  53. lancethepants

    lancethepants Network Guru Member

    Just make sure that /opt/brcm isn't in your path. If it is, it probably comes before tomatoware. Tomatoware sets the path during compilation, but it puts the toolchain path at the end.
    edit: yes, best start anew.
     
  54. lancethepants

    lancethepants Network Guru Member

    Thinking about it, I'm guessing the iconv issue was because of the tomato toolchain, that's where I've seen it before I think. It was something I was meaning to change anyway though, in the back of my mind.
    Between compilations you can keep the toolchain it builds. There have been some changes in the past, like moving to soft-float with entware, but I doubt many more will come. That will take a lot of time off of compilation. It will just begin with actual tomatoware if it detects the toolchain is already in place.
     
  55. HunterZ

    HunterZ LI Guru Member

    Thanks. I figured better safe than sorry.
     
  56. HunterZ

    HunterZ LI Guru Member

    New error:
    Code:
     + make -j2
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
    ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl
    Error visiting Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])], [])
    not all arguments converted during string formatting
    Traceback (most recent call last):
      File "/home/ben/projects/tomatoware/src/python/Python-2.7.3-native/Parser/asdl.py", line 306, in visit
        meth(object, *args)
      File "./Parser/asdl_c.py", line 1012, in visitSum
        self.simpleSum(sum, name)
      File "./Parser/asdl_c.py", line 1036, in simpleSum
        self.emit("default:" % name, 2)
    TypeError: not all arguments converted during string formatting
    make[1]: *** [Python/Python-ast.c] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    make: *** [tomatoware] Error 2
    
    Edit: This looks a lot like my original error lol :(
     
    Last edited: Sep 28, 2014
  57. AndreDVJ

    AndreDVJ Addicted to LI Member

    Not sure if I should ask the question here, I was trying to figure out the reason uptime call from adblock script wasn't working, until I found out we have uptime on tomatoware as well.
    Code:
    root@WNR3500L:/opt/tomatoware/bin# whereis uptime
    uptime: /usr/bin/uptime /opt/tomatoware/bin/uptime /opt/tomatoware/bin/uptime
    And renaming the file made it work just fine. I was thinking on the order uptime was called, I believe it should try first from /usr/bin then /opt/tomatoware/bin but since the binary from /usr/bin actually runs from busybox, I am totally scrambled on what was really happening with the uptime call.

    Well, trying to test uptime from tomatoware, it does not work for some reason.
    Code:
    root@WNR3500L:/opt/tomatoware/bin# ./uptime
    ./uptime: couldn't get boot time: No such file or directory
    
    I even made a copy, changed owner to root, changed permissions (chmod 777) and the binary does not work.
    Code:
    root@WNR3500L:/opt/tomatoware/bin# ls -l | grep uptime
    -rwxr-xr-x  1 1000 1000  44588 Sep 25 21:54 uptime
    -rwxrwxrwx  1 root root  44588 Sep 25 21:54 uptime007
    root@WNR3500L:/opt/tomatoware/bin# ./uptime007
    ./uptime007: couldn't get boot time: No such file or directory
    
    In short words, can someone test and see if your tomatoware's uptime binary works?
     
  58. leandroong

    leandroong Addicted to LI Member

    Not working indeed...
     
  59. leandroong

    leandroong Addicted to LI Member

    @lancetheparts, possible for you to provide or build lighttpd-mipsel-static script in the future.
    Edit:
    Script provided by japanese site has error.
     
  60. lancethepants

    lancethepants Network Guru Member

    @HunterZ
    Yes, it looks like the same error as before. I can't say at the moment why it's failing, it's just a simple "configure" and "make" to build python for the native system. Something I'm guessing that's different with Ubuntu that what I'm using. Maybe you can make sure python2.7 in Ubuntu is being used by default, and that all the python2.7 dev packages are installed.

    @AndreDVJ
    Without looking anything up, I suspect that it's the way embedded systems (and busybox) handle calculating uptime compared to full linux distros, which uptime by tomatoware has. I'll have whatever package provides uptime exclude it from future releases. For reasons like this I mostly use the full path to binaries when scripting or programming.

    @leandroong
    Taking a look at it.
     
  61. HunterZ

    HunterZ LI Guru Member

    python 2.7.6 is the default python that I have installed.

    I had python-all installed, but not python-all-dev. I think installing the latter made it go farther, but it still errors out:
    Code:
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include  -DPy_BUILD_CORE -o Python/Python-ast.o Python/Python-ast.c
    gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include  -DPy_BUILD_CORE -o Python/asdl.o Python/asdl.c
    Python/Python-ast.c: In function \u2018ast2obj_expr_context\u2019:
    Python/Python-ast.c:2952:25: error: expected declaration or statement at end of input
      return Param_singleton;
      ^
    Python/Python-ast.c:2952:25: error: expected declaration or statement at end of input
    Python/Python-ast.c: At top level:
    Python/Python-ast.c:284:18: warning: \u2018ast2obj_slice\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_slice(void*);
      ^
    Python/Python-ast.c:302:18: warning: \u2018ast2obj_boolop\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_boolop(boolop_ty);
      ^
    Python/Python-ast.c:310:18: warning: \u2018ast2obj_operator\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_operator(operator_ty);
      ^
    Python/Python-ast.c:326:18: warning: \u2018ast2obj_unaryop\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_unaryop(unaryop_ty);
      ^
    Python/Python-ast.c:335:18: warning: \u2018ast2obj_cmpop\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_cmpop(cmpop_ty);
      ^
    Python/Python-ast.c:347:18: warning: \u2018ast2obj_comprehension\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_comprehension(void*);
      ^
    Python/Python-ast.c:358:18: warning: \u2018ast2obj_excepthandler\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_excepthandler(void*);
      ^
    Python/Python-ast.c:366:18: warning: \u2018ast2obj_arguments\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_arguments(void*);
      ^
    Python/Python-ast.c:374:18: warning: \u2018ast2obj_keyword\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_keyword(void*);
      ^
    Python/Python-ast.c:380:18: warning: \u2018ast2obj_alias\u2019 used but never defined [enabled by default]
     static PyObject* ast2obj_alias(void*);
      ^
    Python/Python-ast.c:2134:1: warning: \u2018ast2obj_mod\u2019 defined but not used [-Wunused-function]
     ast2obj_mod(void* _o)
     ^
    Python/Python-ast.c:597:12: warning: \u2018obj2ast_identifier\u2019 defined but not used [-Wunused-function]
     static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
      ^
    Python/Python-ast.c:607:12: warning: \u2018obj2ast_string\u2019 defined but not used [-Wunused-function]
     static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena)
      ^
    Python/Python-ast.c:617:12: warning: \u2018obj2ast_int\u2019 defined but not used [-Wunused-function]
     static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
      ^
    Python/Python-ast.c:636:12: warning: \u2018obj2ast_bool\u2019 defined but not used [-Wunused-function]
     static int obj2ast_bool(PyObject* obj, bool* out, PyArena* arena)
      ^
    Python/Python-ast.c:669:12: warning: \u2018init_types\u2019 defined but not used [-Wunused-function]
     static int init_types(void)
      ^
    Python/Python-ast.c:969:12: warning: \u2018obj2ast_mod\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:970:12: warning: \u2018obj2ast_stmt\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:971:12: warning: \u2018obj2ast_expr\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:972:12: warning: \u2018obj2ast_expr_context\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_expr_context(PyObject* obj, expr_context_ty* out, PyArena*
      ^
    Python/Python-ast.c:974:12: warning: \u2018obj2ast_slice\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:975:12: warning: \u2018obj2ast_boolop\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_boolop(PyObject* obj, boolop_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:976:12: warning: \u2018obj2ast_operator\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_operator(PyObject* obj, operator_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:977:12: warning: \u2018obj2ast_unaryop\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_unaryop(PyObject* obj, unaryop_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:978:12: warning: \u2018obj2ast_cmpop\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_cmpop(PyObject* obj, cmpop_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:979:12: warning: \u2018obj2ast_comprehension\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena*
      ^
    Python/Python-ast.c:981:12: warning: \u2018obj2ast_excepthandler\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena*
      ^
    Python/Python-ast.c:983:12: warning: \u2018obj2ast_arguments\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:984:12: warning: \u2018obj2ast_keyword\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena);
      ^
    Python/Python-ast.c:985:12: warning: \u2018obj2ast_alias\u2019 declared \u2018static\u2019 but never defined [-Wunused-function]
     static int obj2ast_alias(PyObject* obj, alias_ty* out, PyArena* arena);
      ^
    make[1]: *** [Python/Python-ast.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    make: *** [tomatoware] Error 2
    
     
  62. HunterZ

    HunterZ LI Guru Member

    Update:

    The problem here appears to be that my copy of the file tomatoware/src/python/Python-2.7.3-native/Python/Python-ast.c has been truncated. Here is the end:

    Code:
    PyObject* ast2obj_expr_context(expr_context_ty o)
    {
      switch(o) {
      case Load:
      Py_INCREF(Load_singleton);
      return Load_singleton;
      case Store:
      Py_INCREF(Store_singleton);
      return Store_singleton;
      case Del:
      Py_INCREF(Del_singleton);
      return Del_singleton;
      case AugLoad:
      Py_INCREF(AugLoad_singleton);
      return AugLoad_singleton;
      case AugStore:
      Py_INCREF(AugStore_singleton);
      return AugStore_singleton;
      case Param:
      Py_INCREF(Param_singleton);
      return Param_singleton;
    
     
  63. HunterZ

    HunterZ LI Guru Member

    Update 2: I removed everything from src/python except for the .tgz archive and then ran make again and got the old error.

    Ran make another time and got the error above.

    Very strange.
     
  64. lancethepants

    lancethepants Network Guru Member

    @HunterZ
    Sometime I'll try and install Ubuntu in a vm and see if I can take a stab at it.
    In the mean time, I've uploaded a version with /cifs1/tomatoware.
     
    HunterZ likes this.
  65. HunterZ

    HunterZ LI Guru Member

    Thanks, I'll give that a try.
     
  66. HunterZ

    HunterZ LI Guru Member

    Update: When I try to build with gcc, I get the following error:
    Code:
    /cifs1/tomatoware/libexec/gcc/mipsel-linux/4.6.4/cc1: can't load library 'libc.so.0'
    /cifs1/tomatoware/libexec/gcc/mipsel-linux/4.6.4/cc1: can't load library 'libc.so.0'
    /cifs1/tomatoware/libexec/gcc/mipsel-linux/4.6.4/cc1: can't load library 'libc.so.0'
    
    This also happens when I run commands like 'find':
    Code:
    root@intertron:/cifs1/pixelserv# find /cifs1/tomatoware -name libc.so.0
    find: can't load library 'libc.so.0'
    
    Here is proof of proper installation:
    Code:
    root@intertron:/cifs1/pixelserv# ls /cifs1/tomatoware
    bin  docs  etc  include  lib  libexec  man  python_modules  sbin  share  ssl  tmp  var
    root@intertron:/cifs1/pixelserv# cat /cifs1/tomatoware/etc/profile
    #!/bin/sh
    
    # Please note it's not a system-wide settings, it's only for a current
    # terminal session. Point your f\w (if necessery) to execute /cifs1/tomatoware/etc/profile
    # at console logon.
    
    export PATH='/cifs1/tomatoware/sbin:/cifs1/tomatoware/bin:/opt/usr/sbin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin'
    export TERM=xterm
    export TERMINFO=/cifs1/tomatoware/share/terminfo
    export TMP=/cifs1/tomatoware/tmp
    export TEMP=/cifs1/tomatoware/tmp
    export PKG_CONFIG_LIBDIR=/cifs1/tomatoware/lib/pkgconfig
    export M4=/cifs1/tomatoware/bin/m4
    
    # You may define localization
    #export LANG='ru_RU.UTF-8'
    #export LC_ALL='ru_RU.UTF-8'
    
    alias ls='ls --color'
    alias uptime='/usr/bin/uptime'
    root@intertron:/cifs1/pixelserv# echo $PATH
    /cifs1/tomatoware/sbin:/cifs1/tomatoware/bin:/opt/usr/sbin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
    
    The lib is there, so I'm a bit confused:
    Code:
    root@intertron:/cifs1/tomatoware/lib# ls -l libc.so*
    -rwxr-xr-x 1 1000 1000 284 Oct  2 14:06 libc.so
    lrwxrwxrwx 1 1000 1000  19 Oct  2 14:06 libc.so.0 -> libuClibc-0.9.32.so
    root@intertron:/cifs1/tomatoware/lib# ls -l libuC*.so
    -rwxr-xr-x 1 1000 1000 689500 Oct  2 14:06 libuClibc-0.9.32.so
    
     
  67. koitsu

    koitsu Network Guru Member

    objdump -x /whatever/the/path/to/the/find/command/you/used/is (you'll need Entware for this, presumably; objdump is provided there)
     
  68. HunterZ

    HunterZ LI Guru Member

    Code:
    root@intertron:/tmp/home/root# objdump -x /cifs1/tomatoware/bin/find
    
    /cifs1/tomatoware/bin/find:  file format elf32-tradlittlemips
    /cifs1/tomatoware/bin/find
    architecture: mips:isa32, flags 0x00000112:
    EXEC_P, HAS_SYMS, D_PAGED
    start address 0x00403c90
    
    Program Header:
      PHDR off  0x00000034 vaddr 0x00400034 paddr 0x00400034 align 2**2
      filesz 0x00000120 memsz 0x00000120 flags r-x
      INTERP off  0x00000154 vaddr 0x00400154 paddr 0x00400154 align 2**0
      filesz 0x00000025 memsz 0x00000025 flags r--
    0x70000000 off  0x0000017c vaddr 0x0040017c paddr 0x0040017c align 2**2
      filesz 0x00000018 memsz 0x00000018 flags r--
      LOAD off  0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**16
      filesz 0x0003c7b0 memsz 0x0003c7b0 flags r-x
      LOAD off  0x0003c7b0 vaddr 0x0044c7b0 paddr 0x0044c7b0 align 2**16
      filesz 0x0000069c memsz 0x00001558 flags rw-
     DYNAMIC off  0x00000194 vaddr 0x00400194 paddr 0x00400194 align 2**2
      filesz 0x00000118 memsz 0x00000118 flags rwx
    EH_FRAME off  0x0003bcbc vaddr 0x0043bcbc paddr 0x0043bcbc align 2**2
      filesz 0x0000001c memsz 0x0000001c flags r--
      STACK off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
      filesz 0x00000000 memsz 0x00000000 flags rwx
      NULL off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
      filesz 0x00000000 memsz 0x00000000 flags ---
    
    Dynamic Section:
      NEEDED  libintl.so.8
      NEEDED  libiconv.so.2
      NEEDED  libc.so.0
      NEEDED  libm.so.0
      RPATH  /cifs1/tomatoware/lib:/home/lance/tomatoware/cifs1/tomatoware/lib
      INIT  0x004022a8
      FINI  0x00434c00
      HASH  0x004002ac
      STRTAB  0x004015a4
      SYMTAB  0x004008f4
      STRSZ  0x0000077a
      SYMENT  0x00000010
      MIPS_RLD_MAP  0x0044cde0
      DEBUG  0x00000000
      PLTGOT  0x0044cdf0
      REL  0x00401d20
      RELSZ  0x00000050
      RELENT  0x00000008
      MIPS_RLD_VERSION  0x00000001
      MIPS_FLAGS  0x00000002
      MIPS_BASE_ADDRESS  0x00400000
      MIPS_LOCAL_GOTNO  0x0000000b
      MIPS_SYMTABNO  0x000000cb
      MIPS_UNREFEXTNO  0x0000001f
      MIPS_GOTSYM  0x000000c0
      PLTREL  0x00000011
      JMPREL  0x00401d70
      PLTRELSZ  0x00000538
      DT_MIPS_PLTGOT  0x0044c7c4
    private flags = 50001005: [abi=O32] [mips32] [not 32bitmode] [noreorder] [CPIC]
    
    Sections:
    Idx Name  Size  VMA  LMA  File off  Algn
      0 .interp  00000025  00400154  00400154  00000154  2**0
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      1 .reginfo  00000018  0040017c  0040017c  0000017c  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE
      2 .dynamic  00000118  00400194  00400194  00000194  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      3 .hash  00000648  004002ac  004002ac  000002ac  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      4 .dynsym  00000cb0  004008f4  004008f4  000008f4  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      5 .dynstr  0000077a  004015a4  004015a4  000015a4  2**0
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      6 .rel.dyn  00000050  00401d20  00401d20  00001d20  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      7 .rel.plt  00000538  00401d70  00401d70  00001d70  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      8 .init  00000048  004022a8  004022a8  000022a8  2**2
      CONTENTS, ALLOC, LOAD, READONLY, CODE
      9 .text  000328b0  004022f0  004022f0  000022f0  2**4
      CONTENTS, ALLOC, LOAD, READONLY, CODE
     10 .MIPS.stubs  00000060  00434ba0  00434ba0  00034ba0  2**2
      CONTENTS, ALLOC, LOAD, READONLY, CODE
     11 .fini  00000038  00434c00  00434c00  00034c00  2**2
      CONTENTS, ALLOC, LOAD, READONLY, CODE
     12 .rodata  0000707c  00434c40  00434c40  00034c40  2**4
      CONTENTS, ALLOC, LOAD, READONLY, DATA
     13 .eh_frame_hdr 0000001c  0043bcbc  0043bcbc  0003bcbc  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
     14 .eh_frame  00000040  0043bcd8  0043bcd8  0003bcd8  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
     15 .plt  00000a90  0043bd20  0043bd20  0003bd20  2**5
      CONTENTS, ALLOC, LOAD, READONLY, CODE
     16 .ctors  00000008  0044c7b0  0044c7b0  0003c7b0  2**2
      CONTENTS, ALLOC, LOAD, DATA
     17 .dtors  00000008  0044c7b8  0044c7b8  0003c7b8  2**2
      CONTENTS, ALLOC, LOAD, DATA
     18 .jcr  00000004  0044c7c0  0044c7c0  0003c7c0  2**2
      CONTENTS, ALLOC, LOAD, DATA
     19 .got.plt  000002a4  0044c7c4  0044c7c4  0003c7c4  2**2
      CONTENTS, ALLOC, LOAD, DATA
     20 .data  00000370  0044ca70  0044ca70  0003ca70  2**4
      CONTENTS, ALLOC, LOAD, DATA
     21 .rld_map  00000004  0044cde0  0044cde0  0003cde0  2**2
      CONTENTS, ALLOC, LOAD, DATA
     22 .got  00000058  0044cdf0  0044cdf0  0003cdf0  2**4
      CONTENTS, ALLOC, LOAD, DATA
     23 .sdata  00000004  0044ce48  0044ce48  0003ce48  2**2
      CONTENTS, ALLOC, LOAD, DATA
     24 .sbss  00000004  0044ce4c  0044ce4c  0003ce4c  2**2
      ALLOC
     25 .bss  00000eb8  0044ce50  0044ce50  0003ce4c  2**4
      ALLOC
     26 .comment  00000022  00000000  00000000  0003ce4c  2**0
      CONTENTS, READONLY
     27 .pdr  00004f20  00000000  00000000  0003ce70  2**2
      CONTENTS, READONLY
     28 .gnu.attributes 00000010  00000000  00000000  00041d90  2**0
      CONTENTS, READONLY
     29 .mdebug.abi32 00000000  00000000  00000000  00041da0  2**0
      CONTENTS, READONLY
    SYMBOL TABLE:
    no symbols
    
    
    root@intertron:/tmp/home/root# objdump -x /cifs1/tomatoware/lib/libc.so.0
    
    /cifs1/tomatoware/lib/libc.so.0:  file format elf32-tradlittlemips
    /cifs1/tomatoware/lib/libc.so.0
    architecture: mips:isa32, flags 0x00000150:
    HAS_SYMS, DYNAMIC, D_PAGED
    start address 0x0000b290
    
    Program Header:
      PHDR off  0x00000034 vaddr 0x00000034 paddr 0x00000034 align 2**2
      filesz 0x00000160 memsz 0x00000160 flags r-x
      INTERP off  0x0009a5e0 vaddr 0x0009a5e0 paddr 0x0009a5e0 align 2**2
      filesz 0x00000010 memsz 0x00000010 flags r--
    0x70000000 off  0x00000194 vaddr 0x00000194 paddr 0x00000194 align 2**2
      filesz 0x00000018 memsz 0x00000018 flags r--
      LOAD off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**16
      filesz 0x0009ab5c memsz 0x0009ab5c flags r-x
      LOAD off  0x0009ad94 vaddr 0x000aad94 paddr 0x000aad94 align 2**16
      filesz 0x000011d4 memsz 0x00006418 flags rw-
     DYNAMIC off  0x000001ac vaddr 0x000001ac paddr 0x000001ac align 2**2
      filesz 0x000000d8 memsz 0x000000d8 flags rwx
      TLS off  0x0009ad94 vaddr 0x000aad94 paddr 0x000aad94 align 2**2
      filesz 0x00000004 memsz 0x00000014 flags r--
    EH_FRAME off  0x0009a5f0 vaddr 0x0009a5f0 paddr 0x0009a5f0 align 2**2
      filesz 0x00000174 memsz 0x00000174 flags r--
      STACK off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
      filesz 0x00000000 memsz 0x00000000 flags rwx
      RELRO off  0x0009ad94 vaddr 0x000aad94 paddr 0x000aad94 align 2**0
      filesz 0x0000026c memsz 0x0000026c flags r--
      NULL off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
      filesz 0x00000000 memsz 0x00000000 flags ---
    
    Dynamic Section:
      NEEDED  ld-uClibc.so.0
      SONAME  libc.so.0
      INIT  0x0006028c
      HASH  0x00000284
      STRTAB  0x00007950
      SYMTAB  0x00002730
      STRSZ  0x0000317b
      SYMENT  0x00000010
      PLTGOT  0x000ab480
      REL  0x0000aacc
      RELSZ  0x00000650
      RELENT  0x00000008
      MIPS_RLD_VERSION  0x00000001
      MIPS_FLAGS  0x00000002
      MIPS_BASE_ADDRESS  0x00000000
      MIPS_LOCAL_GOTNO  0x0000025c
      MIPS_SYMTABNO  0x00000522
      MIPS_UNREFEXTNO  0x00000024
      MIPS_GOTSYM  0x000004cb
      FLAGS  0x00000010
    private flags = 50001007: [abi=O32] [mips32] [not 32bitmode] [noreorder] [PIC] [CPIC]
    
    Sections:
    Idx Name  Size  VMA  LMA  File off  Algn
      0 .reginfo  00000018  00000194  00000194  00000194  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE
      1 .dynamic  000000d8  000001ac  000001ac  000001ac  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      2 .hash  000024ac  00000284  00000284  00000284  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      3 .dynsym  00005220  00002730  00002730  00002730  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      4 .dynstr  0000317b  00007950  00007950  00007950  2**0
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      5 .rel.dyn  00000650  0000aacc  0000aacc  0000aacc  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      6 .text  000581e0  0000b290  0000b290  0000b290  2**4
      CONTENTS, ALLOC, LOAD, READONLY, CODE
      7 .MIPS.stubs  00000040  00063470  00063470  00063470  2**2
      CONTENTS, ALLOC, LOAD, READONLY, CODE
      8 .rodata  00037130  000634b0  000634b0  000634b0  2**4
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      9 .interp  00000010  0009a5e0  0009a5e0  0009a5e0  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
     10 .eh_frame_hdr 00000174  0009a5f0  0009a5f0  0009a5f0  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
     11 .eh_frame  000003f8  0009a764  0009a764  0009a764  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
     12 .tdata  00000004  000aad94  000aad94  0009ad94  2**2
      CONTENTS, ALLOC, LOAD, DATA, THREAD_LOCAL
     13 .tbss  00000010  000aad98  000aad98  0009ad98  2**2
      ALLOC, THREAD_LOCAL
     14 .data.rel.ro  00000268  000aad98  000aad98  0009ad98  2**2
      CONTENTS, ALLOC, LOAD, DATA
     15 .data  00000480  000ab000  000ab000  0009b000  2**4
      CONTENTS, ALLOC, LOAD, DATA
     16 .got  00000ae8  000ab480  000ab480  0009b480  2**4
      CONTENTS, ALLOC, LOAD, DATA
     17 .sbss  00000040  000abf68  000abf68  0009bf68  2**2
      ALLOC
     18 .bss  000051fc  000abfb0  000abfb0  0009bf68  2**4
      ALLOC
     19 .comment  00000011  00000000  00000000  0009bf68  2**0
      CONTENTS, READONLY
     20 .pdr  0000bae0  00000000  00000000  0009bf7c  2**2
      CONTENTS, READONLY
     21 .gnu.warning.utime 0000003c  00000000  00000000  000a7a5c  2**2
      CONTENTS, READONLY
     22 .gnu.warning.gets 0000003c  00000000  00000000  000a7a98  2**2
      CONTENTS, READONLY
     23 .gnu.warning.tmpnam 00000038  00000000  00000000  000a7ad4  2**2
      CONTENTS, READONLY
     24 .gnu.warning.tmpnam_r 00000040  00000000  00000000  000a7b0c  2**2
      CONTENTS, READONLY
     25 .gnu.warning.tempnam 00000040  00000000  00000000  000a7b4c  2**2
      CONTENTS, READONLY
     26 .gnu.warning.__fpending 000000a8  00000000  00000000  000a7b8c  2**2
      CONTENTS, READONLY
     27 .gnu.warning.gethostbyaddr_r 0000003c  00000000  00000000  000a7c34  2**2
      CONTENTS, READONLY
     28 .gnu.warning.gethostbyname_r 0000003c  00000000  00000000  000a7c70  2**2
      CONTENTS, READONLY
     29 .gnu.warning.gethostbyaddr 0000003c  00000000  00000000  000a7cac  2**2
      CONTENTS, READONLY
     30 .gnu.warning.gethostbyname 0000003c  00000000  00000000  000a7ce8  2**2
      CONTENTS, READONLY
     31 .gnu.warning.siggetmask 0000003c  00000000  00000000  000a7d24  2**2
      CONTENTS, READONLY
     32 .gnu.warning.mktemp 00000038  00000000  00000000  000a7d60  2**2
      CONTENTS, READONLY
     33 .gnu.attributes 00000010  00000000  00000000  000a7d98  2**0
      CONTENTS, READONLY
     34 .mdebug.abi32 00000000  00000000  00000000  000a7da8  2**0
      CONTENTS, READONLY
    SYMBOL TABLE:
    no symbols
    
    
    root@intertron:/tmp/home/root# objdump -x /cifs1/tomatoware/lib/ld-uClibc.so.0
    
    /cifs1/tomatoware/lib/ld-uClibc.so.0:  file format elf32-tradlittlemips
    /cifs1/tomatoware/lib/ld-uClibc.so.0
    architecture: mips:isa32, flags 0x00000150:
    HAS_SYMS, DYNAMIC, D_PAGED
    start address 0x00000f30
    
    Program Header:
    0x70000000 off  0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2
      filesz 0x00000018 memsz 0x00000018 flags r--
      LOAD off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**16
      filesz 0x00006a80 memsz 0x00006a80 flags r-x
      LOAD off  0x00006ffc vaddr 0x00016ffc paddr 0x00016ffc align 2**16
      filesz 0x00000148 memsz 0x000001f4 flags rw-
     DYNAMIC off  0x0000012c vaddr 0x0000012c paddr 0x0000012c align 2**2
      filesz 0x000000d0 memsz 0x000000d0 flags rwx
      STACK off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**4
      filesz 0x00000000 memsz 0x00000000 flags rwx
      RELRO off  0x00006ffc vaddr 0x00016ffc paddr 0x00016ffc align 2**0
      filesz 0x00000004 memsz 0x00000004 flags r--
      NULL off  0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
      filesz 0x00000000 memsz 0x00000000 flags ---
    
    Dynamic Section:
      SONAME  ld-uClibc.so.0
      SYMBOLIC  0x00000000
      HASH  0x000001fc
      STRTAB  0x00000928
      SYMTAB  0x00000448
      STRSZ  0x00000519
      SYMENT  0x00000010
      PLTGOT  0x00017020
      REL  0x00000e44
      RELSZ  0x00000018
      RELENT  0x00000008
      MIPS_RLD_VERSION  0x00000001
      MIPS_FLAGS  0x00000002
      MIPS_BASE_ADDRESS  0x00000000
      MIPS_LOCAL_GOTNO  0x00000049
      MIPS_SYMTABNO  0x0000004e
      MIPS_UNREFEXTNO  0x00000011
      MIPS_GOTSYM  0x0000004e
      BIND_NOW  0x00000000
      FLAGS_1  0x00000001
    private flags = 50001007: [abi=O32] [mips32] [not 32bitmode] [noreorder] [PIC] [CPIC]
    
    Sections:
    Idx Name  Size  VMA  LMA  File off  Algn
      0 .reginfo  00000018  00000114  00000114  00000114  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE
      1 .dynamic  000000d0  0000012c  0000012c  0000012c  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      2 .hash  0000024c  000001fc  000001fc  000001fc  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      3 .dynsym  000004e0  00000448  00000448  00000448  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      4 .dynstr  00000519  00000928  00000928  00000928  2**0
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      5 .rel.dyn  00000018  00000e44  00000e44  00000e44  2**2
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      6 .text  000057c0  00000e60  00000e60  00000e60  2**4
      CONTENTS, ALLOC, LOAD, READONLY, CODE
      7 .rodata  00000460  00006620  00006620  00006620  2**4
      CONTENTS, ALLOC, LOAD, READONLY, DATA
      8 .dtors  00000004  00016ffc  00016ffc  00006ffc  2**2
      CONTENTS, ALLOC, LOAD, DATA
      9 .data  00000020  00017000  00017000  00007000  2**4
      CONTENTS, ALLOC, LOAD, DATA
     10 .got  00000124  00017020  00017020  00007020  2**4
      CONTENTS, ALLOC, LOAD, DATA
     11 .sbss  00000031  00017144  00017144  00007144  2**2
      ALLOC
     12 .bss  00000070  00017180  00017180  00007144  2**4
      ALLOC
     13 .pdr  00000720  00000000  00000000  00007144  2**2
      CONTENTS, READONLY
     14 .gnu.attributes 00000010  00000000  00000000  00007864  2**0
      CONTENTS, READONLY
     15 .mdebug.abi32 00000000  00000000  00000000  00007874  2**0
      CONTENTS, READONLY
    SYMBOL TABLE:
    no symbols
    
     
  69. leandroong

    leandroong Addicted to LI Member

    @HunterZ, did you copy /cifs1/profile to router "/opt/etc/profile ?
    What about path from router? Mine is like this
    Code:
    /opt/home/admin # echo $PATH
    /opt/tomatoware/sbin:/opt/tomatoware/bin:/opt/usr/sbin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
    /opt/home/admin #
    
     
  70. HunterZ

    HunterZ LI Guru Member

    No, because I don't want to overwrite entware's version. I ran 'source /cifs1/tomatoware/etc/profile' after login, which accomplishes the same thing, as evidenced by the PATH echo that I posted.
     
  71. koitsu

    koitsu Network Guru Member

    Code:
      RPATH  /cifs1/tomatoware/lib:/home/lance/tomatoware/cifs1/tomatoware/lib
    
    I can already see one thing @lancethepants might want to clean up (2nd part of the RPATH path). :) But that's not the problem here.

    It looks to me like your /cifs1/tomatoware/lib/libc.so.0 (which is a symlink to libuClibc-0.9.32.so and that should be fine) might not actually be built correctly (possibly an architecture problem?). I'd probably need output from strace /cifs1/tomatoware/bin/find although that might not tell me what's going on. file /cifs1/tomatoware/lib/libuClibc-0.9.32.so might also be useful (as long as it's file from Entware).

    Your environment doesn't have any LD_LIBRARY_PATH environment variables set, does it? Can check with env.

    Maybe another thing to get output from would be objdump -x /cifs1/tomatoware/lib/libuClibc-0.9.32.so, which at least on Entware references reliance on ld-uClibc.so.0 (which is usually a symlink to something like ld-uClibc-0.9.32.so -- pay very close attention to the filenames. ld-uClibc-0.9.32.so != libuClibc-0.9.32.so. Two different things)
     
    Last edited: Oct 4, 2014
  72. lancethepants

    lancethepants Network Guru Member

    @HunterZ
    Typically I run tomatoware under the /mmc prefix. I wiped my partition, and remounted it as /cifs1. I then extracted the provided cifs1 version to /cifs1/tomatoware.
    For me it is working as expected, currently compiling nginx.

    I wonder if running it as network attached storage, as cifs1 usually denotes, has issues that I'm not experiencing as USB mounted storage. What file system type is cifs1 formatted as?

    @koitsu
    Yes, a lot of source packages like to tack on a second path to end of the supplied rpath. Shouldn't ever be an issue though as the first path will always be used first, and the 2nd path (depending on the build system) will probably never be existent on the router. Not sure how I would go about not having it automatically put in (and would have to be a package by package basis), but I don't think it's too worrisome a side effect.
     
  73. HunterZ

    HunterZ LI Guru Member

    It's a CIFS/SMB/Samba mount, as implied by the name. The connection is to a Samba server on my Xubuntu Linux box.

    Entware is running fine over the same connection, via a bind mount:
    Code:
    mount -o bind /cifs1/entware/opt /opt
     
  74. leandroong

    leandroong Addicted to LI Member

    why not setup as NFS_server your Linux box? My main router is like that and access by WET tomato router as NFS_client, acting as local drive, exist as, /mnt/<desired label name>.
    My point is this, I will use /opt/tomatoware and perform all compilation to NFS client folder. I can test this type of connection if feasible, if your interested to know

    edit: Will experiment if I make sense
     
    Last edited: Oct 4, 2014
  75. lancethepants

    lancethepants Network Guru Member

    I just created /home/lance/cifs1 on my dev pc (debian). Using the Tomato gui I mounted it (\\192.168.10.35\cifs1 in my case) to /cifs1 on the router. I extracted the cifs1 tarball of tomatoware to /cifs1/tomatoware using my debian pc, because it was much faster than doing it on the router over the network.
    It is working for me, currently compiling a library.
     
  76. leandroong

    leandroong Addicted to LI Member

    My experiment works also. I use /opt/tomatoware.
    copy /opt/tomatoware/etc/profile to /etc/profile
    cd /mnt/downloads <=== my NFS_server
    mkdir test-build
    download and compile dnscrypt-proxy. No problem at all
     
  77. lancethepants

    lancethepants Network Guru Member

    uugg, as if things didn't already take forever to compile on the router, doing it over a mounted file system seems to make it take even longer.
     
  78. leandroong

    leandroong Addicted to LI Member

    my tomato router is only 240Mhz, I think my compilation on NFS_server is faster and less CPU usage on both routers.
     
  79. HunterZ

    HunterZ LI Guru Member

    I don't use NFS because it is not supported by the Tomato web GUI as far as I know, and it may be the case that Tomato doesn't support it at all. Tomato supports cifs/smb out of the box and maintains the mount for me.

    As for working over the LAN, I have a gigabit Ethernet network, so it's actually faster than the hard drives in my Linux box.

    An old /opt/tomatoware build worked for me too, but it's suboptimal because opt is my entware install, so it's awkward having to put tomatoware (or a router-centric symlink to it) inside of my entware install hierarchy.

    I rebooted the router to see if that helps, and will be testing in a moment.
     
  80. HunterZ

    HunterZ LI Guru Member

    Update: The reboot fixed it. I think the problem was that I deleted the old symlink and then installed the new version without rebooting the router. This somehow confused it (something was probably cached somewhere).
     
  81. leandroong

    leandroong Addicted to LI Member

    AIO buils has NFS server and client. I connect from my tomato router to padavan NFS server using this on statup:
    Code:
    ...
    mkdir /mnt/downloads
    mount -t nfs -o nolock,intr,hard,timeo=14,sync,rsize=32768,wsize=32768 10.0.1.1:/media/optware/NFS_storage /mnt/downloads
    
     
  82. lancethepants

    lancethepants Network Guru Member

    @HunterZ
    I had some time this weekend, here are the steps I did.
    I installed Ubuntu 14.04.1 x64 Server Edition in virtualbox on my computer.
    Ran "sudo apt-get update && sudo apt-get dist-upgrade". Reboot cause it looked like it updated the kernel.
    I then copied, pasted, and ran the "sudo apt-get install ....." command from the Tomatoware README verbatim, exactly as I do for Debian, and nothing else.
    Cloned the Tomatoware repo, adjusted config.mk, ran "make", and let it do its thing over night cause it was really slow, and late.
    When I woke up this morning, it had compiled completely through and had created the tarball.
    I just tested the result and it is working as expected on my router.
    From my experience, there is nothing special or extra that needs to be done to compile Tomatoware on the latest Ubuntu.
     
  83. HunterZ

    HunterZ LI Guru Member

    Hmm... Possibilities:
    • I'm using Xubuntu rather than Ubuntu Server Edition.
    • I'm probably building in a different path than you (/home/ben/projects/tomatoware).
    • I have only 2GB of RAM in my Linux box (I've ordered 4x1GB from a Chinese seller on eBay, which won't get here for another week or so).
    • Are you using all of the default config.mk options (other than PREFIX)?

    I have VirtualBox on my laptop, so I should probably try using it to narrow down the issue.
     
  84. lancethepants

    lancethepants Network Guru Member

    The only differences AFAICT between the Ubuntu (and its variants) and Ubuntu server are GUI related.
    https://help.ubuntu.com/community/ServerFaq#What.27s_the_difference_between_desktop_and_server.3F

    Tomatoware takes into account the build path. I've built in /home/lance (as you've seen), but also other directories (such as /storage).

    My VM was allocated 2GB ram, although 1GB looked like it would have been more than enough. It never used more than a few hundred MB ram while I was looking at it.

    I only modified config.mk to change the prefix to /cifs1/tomatoware.

    Did you run the exactly the apt-get command from the README?
     
  85. HunterZ

    HunterZ LI Guru Member

    No, because that has the annoying effect of marking any already-installed packages as manually installed.

    It looks like I am missing some of the packages, though. Turns out that I was making the job of figuring out what is and isn't installed much harder and more error-prone than it needed to be; dpkg --list followed by the list of desired packages will accomplish what I wanted.

    For some reason dpkg gives a status of 'un' for lib32z-dev and libncurses-dev. When I try to install them, I get the following message that suggests everything is OK:
    Code:
    Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
    Note, selecting 'libncurses5-dev' instead of 'libncurses-dev'
    lib32z1-dev is already the newest version.
    libncurses5-dev is already the newest version.
    libncurses5-dev set to manually installed.
    Time to try building again!

    Edit: I'm going to do it from scratch again because I don't trust the state of things.
     
  86. lancethepants

    lancethepants Network Guru Member

    Many of these are dev packages, and most likely would never be installed as a dependency (and thus automatically) of another package. I don't understand your concern as these being "manually installed". They are the minimum requirements and required for compiling tomatoware. I can't imagine ever wanting to remove them anyway, in my case at least. I want to continue to compile tomatoware, and they hold no ill effect being always installed.

    http://askubuntu.com/questions/831/what-does-it-mean-that-a-package-is-set-to-manually-installed
    I found this thread informational.
     
  87. HunterZ

    HunterZ LI Guru Member

    I know what it means that it's manually installed. It's an OCD thing. I want to make sure that anything I have installed that is a dependency of something else that is installed is marked as automatically installed, as it's likely that I won't need the dependency any more if I do decide to uninstall the dependent package for some reason.

    One of the reasons I refuse to use Mint (for example) is that they don't use metapackages that depend on stuff that is installed by default, so the manually-installed package list contains hundreds of base packages whose removal would damage the OS (as opposed to only a half-dozen or so on Ubuntu/Kubuntu/Xubuntu). In addition, it makes it really hard to tell what I installed versus what was installed by Mint itself.

    I actually make a script that marks dependencies as automatically installed. It's not 100% foolproof, so I have to look things over in synaptic afterwards, but it does a pretty good job.
     
  88. lancethepants

    lancethepants Network Guru Member

    So what does ncurses5-dev become a dependent of?
     
  89. HunterZ

    HunterZ LI Guru Member

    Nothing, it's manually installed (as are a fair number of the -dev packages).

    Build failed again in the Python neighborhood:
    Code:
    configure: creating ./config.status
    config.status: creating Makefile.pre
    config.status: creating Modules/Setup.config
    config.status: creating Misc/python.pc
    config.status: creating Modules/ld_so_aix
    config.status: creating pyconfig.h
    creating Modules/Setup
    creating Modules/Setup.local
    creating Makefile
    + make -j2
    make[1]: Entering directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    ./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
    ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl
    Error visiting Sum([Constructor(Load, []), Constructor(Store, []), Constructor(Del, []), Constructor(AugLoad, []), Constructor(AugStore, []), Constructor(Param, [])], [])
    not all arguments converted during string formatting
    Traceback (most recent call last):
      File "/home/ben/projects/tomatoware/src/python/Python-2.7.3-native/Parser/asdl.py", line 306, in visit
      meth(object, *args)
      File "./Parser/asdl_c.py", line 1012, in visitSum
      self.simpleSum(sum, name)
      File "./Parser/asdl_c.py", line 1036, in simpleSum
      self.emit("default:" % name, 2)
    TypeError: not all arguments converted during string formatting
    make[1]: *** [Python/Python-ast.c] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/python/Python-2.7.3-native'
    make: *** [tomatoware] Error 2
    
    Package status:
    Code:
    $ dpkg --list autoconf automake automake1.9 bash binutils bison build-essential bzip2 cvs diffutils doxygen dpkg-dev file flex g++ g++-4.4 gawk gcc gcc-multilib gettext git-core gperf groff-base intltool libbz2-dev libc6-dev libcurl4-openssl-dev libgc-dev libglib2.0-dev libslang2 libtool make patch perl pkg-config python python-all python-dev python2.7-dev lib32z1 lib32z-dev libc6 libexpat1-dev libffi-dev libgdbm-dev libncurses-dev libreadline6-dev libssl-dev libsqlite3-dev libstdc++6-4.4-dev libxml-parser-perl m4 sed shtool sqlite subversion tar texinfo tk-dev zlib1g zlib1g-dev unzip libxml2-dev
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name  Version  Architecture  Description
    +++-============================================-===========================-===========================-==============================================================================================
    ii  autoconf  2.69-6  all  automatic configure script builder
    ii  automake  1:1.14.1-2ubuntu1  all  Tool for generating GNU Standards-compliant Makefiles
    ii  automake1.9  1.9.6+nogfdl-4ubuntu1  all  A tool for generating GNU Standards-compliant Makefiles
    ii  bash  4.3-7ubuntu1.4  amd64  GNU Bourne Again SHell
    ii  binutils  2.24-5ubuntu3  amd64  GNU assembler, linker and binary utilities
    ii  bison  2:3.0.2.dfsg-2  amd64  YACC-compatible parser generator
    ii  build-essential  11.6ubuntu6  amd64  Informational list of build-essential packages
    ii  bzip2  1.0.6-5  amd64  high-quality block-sorting file compressor - utilities
    ii  cvs  2:1.12.13+real-12  amd64  Concurrent Versions System
    ii  diffutils  1:3.3-1  amd64  File comparison utilities
    ii  doxygen  1.8.6-2  amd64  Documentation system for C, C++, Java, Python and other languages
    ii  dpkg-dev  1.17.5ubuntu5.3  all  Debian package development tools
    ii  file  1:5.14-2ubuntu3.2  amd64  Determines file type using "magic" numbers
    ii  flex  2.5.35-10.1ubuntu2  amd64  A fast lexical analyzer generator.
    ii  g++  4:4.8.2-1ubuntu6  amd64  GNU C++ compiler
    ii  g++-4.4  4.4.7-8ubuntu1  amd64  GNU C++ compiler
    ii  gawk  1:4.0.1+dfsg-2.1ubuntu2  amd64  GNU awk, a pattern scanning and processing language
    ii  gcc  4:4.8.2-1ubuntu6  amd64  GNU C compiler
    ii  gcc-multilib  4:4.8.2-1ubuntu6  amd64  GNU C compiler (multilib files)
    ii  gettext  0.18.3.1-1ubuntu3  amd64  GNU Internationalization utilities
    ii  git-core  1:1.9.1-1  all  fast, scalable, distributed revision control system (obsolete)
    ii  gperf  3.0.4-1  amd64  Perfect hash function generator
    ii  groff-base  1.22.2-5  amd64  GNU troff text-formatting system (base system components)
    ii  intltool  0.50.2-2  all  Utility scripts for internationalizing XML
    un  lib32z-dev  <none>  <none>  (no description available)
    ii  lib32z1  1:1.2.8.dfsg-1ubuntu1  amd64  compression library - 32 bit runtime
    ii  libbz2-dev:amd64  1.0.6-5  amd64  high-quality block-sorting file compressor library - development
    ii  libc6:amd64  2.19-0ubuntu6.3  amd64  Embedded GNU C Library: Shared libraries
    ii  libc6:i386  2.19-0ubuntu6.3  i386  Embedded GNU C Library: Shared libraries
    ii  libc6-dev:amd64  2.19-0ubuntu6.3  amd64  Embedded GNU C Library: Development Libraries and Header Files
    ii  libcurl4-openssl-dev:amd64  7.35.0-1ubuntu2.1  amd64  development files and documentation for libcurl (OpenSSL flavour)
    ii  libexpat1-dev:amd64  2.1.0-4ubuntu1  amd64  XML parsing C library - development kit
    ii  libffi-dev:amd64  3.1~rc1+r3.0.13-12  amd64  Foreign Function Interface library (development files)
    ii  libgc-dev:amd64  1:7.2d-5ubuntu2  amd64  conservative garbage collector for C (development)
    ii  libgdbm-dev  1.8.3-12build1  amd64  GNU dbm database routines (development files)
    ii  libglib2.0-dev  2.40.0-2  amd64  Development files for the GLib library
    un  libncurses-dev  <none>  <none>  (no description available)
    ii  libreadline6-dev:amd64  6.3-4ubuntu2  amd64  GNU readline and history libraries, development files
    ii  libslang2:amd64  2.2.4-15ubuntu1  amd64  S-Lang programming library - runtime version
    ii  libsqlite3-dev:amd64  3.8.2-1ubuntu2  amd64  SQLite 3 development files
    ii  libssl-dev:amd64  1.0.1f-1ubuntu2.5  amd64  Secure Sockets Layer toolkit - development files
    ii  libstdc++6-4.4-dev  4.4.7-8ubuntu1  amd64  GNU Standard C++ Library v3 (development files)
    ii  libtool  2.4.2-1.7ubuntu1  amd64  Generic library support script
    ii  libxml-parser-perl  2.41-1build3  amd64  Perl module for parsing XML files
    ii  libxml2-dev:amd64  2.9.1+dfsg1-3ubuntu4.3  amd64  Development files for the GNOME XML library
    ii  m4  1.4.17-2ubuntu1  amd64  a macro processing language
    ii  make  3.81-8.2ubuntu3  amd64  An utility for Directing compilation.
    ii  patch  2.7.1-4ubuntu1  amd64  Apply a diff file to an original
    ii  perl  5.18.2-2ubuntu1  amd64  Larry Wall's Practical Extraction and Report Language
    ii  pkg-config  0.26-1ubuntu4  amd64  manage compile and link flags for libraries
    ii  python  2.7.5-5ubuntu3  amd64  interactive high-level object-oriented language (default version)
    ii  python-all  2.7.5-5ubuntu3  amd64  package depending on all supported Python runtime versions
    ii  python-dev  2.7.5-5ubuntu3  amd64  header files and a static library for Python (default)
    ii  python2.7-dev  2.7.6-8  amd64  Header files and a static library for Python (v2.7)
    ii  sed  4.2.2-4ubuntu1  amd64  The GNU sed stream editor
    ii  shtool  2.0.8-6  all  portable shell tool from the GNU project
    ii  sqlite  2.8.17-10ubuntu2  amd64  command line interface for SQLite
    ii  subversion  1.8.8-1ubuntu3.1  amd64  Advanced version control system
    ii  tar  1.27.1-1  amd64  GNU version of the tar archiving utility
    ii  texinfo  5.2.0.dfsg.1-2  amd64  Documentation system for on-line information and printed output
    ii  tk-dev:amd64  8.6.0+6ubuntu3  amd64  Toolkit for Tcl and X11 (default version) - development files
    ii  unzip  6.0-9ubuntu1  amd64  De-archiver for .zip files
    ii  zlib1g:amd64  1:1.2.8.dfsg-1ubuntu1  amd64  compression library - runtime
    ii  zlib1g:i386  1:1.2.8.dfsg-1ubuntu1  i386  compression library - runtime
    ii  zlib1g-dev:amd64  1:1.2.8.dfsg-1ubuntu1  amd64  compression library - development
    
    And just to be 100% sure, I sucked it up and pasted your apt-get command:
    Code:
    $ sudo apt-get -y install autoconf automake automake1.9 bash binutils bison build-essential bzip2 cvs diffutils doxygen dpkg-dev file flex g++ g++-4.4 gawk gcc gcc-multilib gettext git-core gperf groff-base intltool libbz2-dev libc6-dev libcurl4-openssl-dev libgc-dev libglib2.0-dev libslang2 libtool make patch perl pkg-config python python-all python-dev python2.7-dev lib32z1 lib32z-dev libc6 libexpat1-dev libffi-dev libgdbm-dev libncurses-dev libreadline6-dev libssl-dev libsqlite3-dev libstdc++6-4.4-dev libxml-parser-perl m4 sed shtool sqlite subversion tar texinfo tk-dev zlib1g zlib1g-dev unzip libxml2-dev
    Reading package lists... Done
    Building dependency tree  
    Reading state information... Done
    Note, selecting 'lib32z1-dev' instead of 'lib32z-dev'
    Note, selecting 'libncurses5-dev' instead of 'libncurses-dev'
    autoconf is already the newest version.
    autoconf set to manually installed.
    automake is already the newest version.
    automake set to manually installed.
    automake1.9 is already the newest version.
    binutils is already the newest version.
    binutils set to manually installed.
    bison is already the newest version.
    bison set to manually installed.
    build-essential is already the newest version.
    build-essential set to manually installed.
    bzip2 is already the newest version.
    bzip2 set to manually installed.
    cvs is already the newest version.
    diffutils is already the newest version.
    doxygen is already the newest version.
    flex is already the newest version.
    flex set to manually installed.
    g++ is already the newest version.
    g++ set to manually installed.
    gawk is already the newest version.
    gawk set to manually installed.
    gcc is already the newest version.
    gcc set to manually installed.
    gcc-multilib is already the newest version.
    gcc-multilib set to manually installed.
    git-core is already the newest version.
    git-core set to manually installed.
    gperf is already the newest version.
    groff-base is already the newest version.
    groff-base set to manually installed.
    intltool is already the newest version.
    lib32z1 is already the newest version.
    lib32z1 set to manually installed.
    lib32z1-dev is already the newest version.
    libbz2-dev is already the newest version.
    libexpat1-dev is already the newest version.
    libexpat1-dev set to manually installed.
    libffi-dev is already the newest version.
    libgc-dev is already the newest version.
    libgdbm-dev is already the newest version.
    libglib2.0-dev is already the newest version.
    libglib2.0-dev set to manually installed.
    libncurses5-dev is already the newest version.
    libncurses5-dev set to manually installed.
    libreadline6-dev is already the newest version.
    libslang2 is already the newest version.
    libslang2 set to manually installed.
    libsqlite3-dev is already the newest version.
    libsqlite3-dev set to manually installed.
    libtool is already the newest version.
    libtool set to manually installed.
    libxml-parser-perl is already the newest version.
    libxml-parser-perl set to manually installed.
    m4 is already the newest version.
    m4 set to manually installed.
    make is already the newest version.
    make set to manually installed.
    perl is already the newest version.
    perl set to manually installed.
    pkg-config is already the newest version.
    pkg-config set to manually installed.
    python is already the newest version.
    python set to manually installed.
    python-all is already the newest version.
    python-all set to manually installed.
    python-dev is already the newest version.
    python-dev set to manually installed.
    python2.7-dev is already the newest version.
    python2.7-dev set to manually installed.
    sed is already the newest version.
    sed set to manually installed.
    shtool is already the newest version.
    tar is already the newest version.
    tar set to manually installed.
    texinfo is already the newest version.
    tk-dev is already the newest version.
    unzip is already the newest version.
    unzip set to manually installed.
    zlib1g is already the newest version.
    zlib1g set to manually installed.
    zlib1g-dev is already the newest version.
    zlib1g-dev set to manually installed.
    g++-4.4 is already the newest version.
    libstdc++6-4.4-dev is already the newest version.
    sqlite is already the newest version.
    bash is already the newest version.
    bash set to manually installed.
    dpkg-dev is already the newest version.
    dpkg-dev set to manually installed.
    file is already the newest version.
    file set to manually installed.
    gettext is already the newest version.
    gettext set to manually installed.
    libc6 is already the newest version.
    libc6 set to manually installed.
    libc6-dev is already the newest version.
    libc6-dev set to manually installed.
    libcurl4-openssl-dev is already the newest version.
    libssl-dev is already the newest version.
    libssl-dev set to manually installed.
    libxml2-dev is already the newest version.
    libxml2-dev set to manually installed.
    patch is already the newest version.
    patch set to manually installed.
    subversion is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    
    Edit: Not sure how new the Python stuff is that you're working with, but this could potentially be related: http://bugs.python.org/issue15923
     
  90. lancethepants

    lancethepants Network Guru Member

    I just compiled successfully using xubuntu 14.04.1 x64 following the same procedure I previously mentioned. Seems like something is botched with your setup.
    You might be able to get past it if you comment those lines out (./configure and $MAKE), in the 'built_native' area and instruct it to use the python already installed. There are two lines that start with the cp command that you can modify to refer to the system's python.
    That is the only instance where it it is not cross-compiling, and I suspect you wouldn't happen upon any issues after that.
     
  91. HunterZ

    HunterZ LI Guru Member

    Thanks. I'm not that desperate though, and it will always bother me that I have to hack around that problem. I really wish I knew the cause.
     
  92. HunterZ

    HunterZ LI Guru Member

    If you read the bug report that I linked, it looks like it's just that I'm running a newer patchlevel of Python 2.7.6 that will no longer build the obsolete version of asdl_c.py that you're trying to use for Tomatoware.

    The bug report indicates that asdl_c.py was subsequently fixed to address the issue. Is there a reason why Tomatoware is still using the old version?

    Edit: Just fired up and updated my Debian VM in VirtualBox. Turns out it's running Python 2.7.3 instead of 2.7.6, which explains why you don't see this issue. Tomatoware is going to break for you too if/once Debian updates Python.

    Edit 2: VirtualBox Debian build finished successfully. And then I went and did a git pull and am having problems with the new git source. I opened a ticket on Github for this issue.
     
    Last edited: Oct 13, 2014
  93. leandroong

    leandroong Addicted to LI Member

    1. Any chance for tomatoware to have packaging build like entware repo in the future?
    2. I prefer tomatoware to be installed on virtualbox and do compilation there with NFS server, located on main router, as storage data. ATM, I'm experimenting on that concept by building entware program in NFS server.
     
  94. leandroong

    leandroong Addicted to LI Member

    Latest libgnutls version is 3.3.9 and not 3.2.19, typo error perhaps?
    edit: ftp://ftp.gnutls.org/gcrypt/gnutls/v3.3/
     
  95. lancethepants

    lancethepants Network Guru Member

    @leandroong
    1. No plans on building a package manager for Tomatoware.
    2. That should probably work fine. I've tested over a Samba share, NFS would work too I imagine.
    Looks like on this release they promoted 3.3 to the new stable branch. Can't remember my reasoning for staying with 3.2. Seems like maybe iksemel (which hasn't been updated in a long while) wouldn't work with the new branch. I'll give it a test some time. If it doesn't work I'll stick with 3.2 cause I need google voice to work in asterisk, unless someone maintains an updated iksemel that will work.

    @HunterZ
    I didn't have any issues compiling python on my xubuntu x64 14.04 vm, which I checked and is running python 2.7.6. Maybe you could try applying the patch mentioned in that bug report, and let me know if it works since I can't replicate the issue. I'll take a look at the git issue later when I can access the vm.
     
  96. HunterZ

    HunterZ LI Guru Member

    I can't test the patch because as I mentioned before, something corrupts the file after the build fails, such that it is truncated. I would have to extract the archive, patch it, and then package it back up, which is a huge pain. I guess I'll try that.

    Update: Unpacked, applied fix, repacked, re-ran make, and it made it past the python stuff.
     
    Last edited: Oct 13, 2014
  97. HunterZ

    HunterZ LI Guru Member

    Update 2: I now blow up while building asterisk. I guess I'll just stick to the VM for now lol.
    Code:
      [CC] console_board.c -> console_board.o
    console_board.c:50:21: fatal error: SDL/SDL.h: No such file or directory
    compilation terminated.
    make[2]: *** [console_board.o] Error 1
    make[1]: *** [channels] Error 2
    make[1]: *** Waiting for unfinished jobs....
    
    Code:
    make[1]: Leaving directory `/home/ben/projects/tomatoware/src/asterisk/asterisk-11.13.0'
    make: *** [tomatoware] Error 2
    
    find reports that there is no SDL.h under tomatoware's source directory. I do have it in /usr/include/SDL/SDL.h.
     
  98. HunterZ

    HunterZ LI Guru Member

    Is there a trick do doing an partial rebuild after pulling down updates from github? I delete the .extracted files and old version subdirectories of updated source modules and then run 'make', but it often ends up in failure.

    I'm in the process of moving my Debian VM image to my desktop, which is a faster and underutilized machine, so it should be less painful to rebuild from scratch every time.
     
  99. lancethepants

    lancethepants Network Guru Member

    I just build from scratch each time. You might get away with some libraries, but a lot of stuff is dependent on other stuff, and I don't want to keep track of what's binary compatible.
     
  100. HunterZ

    HunterZ LI Guru Member

    I've got a serious problem. It appears that dynamically linked binaries built by Tomatoware's GCC are hard-coded with paths to Tomatoware's versions of libc.so.0 and ld-uClibc.so.

    This is problem because it means that the binaries will not run without Tomatoware or even with a Tomatoware that uses a different prefix.

    Evidence #1 - ldd shows that a binary wants to use Tomatoware libraries even though Tomatoware is not in the current environment (but is mounted on the filesystem):
    Code:
    # ldd ../../pixelserv/dist/pixelserv
      libc.so.0 => /cifs1/tomatoware/lib/libc.so.0 (0x2aac0000)
      ld-uClibc.so.0 => /cifs1/tomatoware/lib/ld-uClibc.so.0 (0x2aaa8000)
    root@intertron:/cifs1/adblock/dist# locate libc.so.0
    -sh: locate: not found
    root@intertron:/cifs1/adblock/dist# find /lib -name libc.so.0
    /lib/libc.so.0
    # set
    HISTFILE='/root/.ash_history'
    HOME='/root'
    IFS='
    '
    LOGNAME='root'
    OLDPWD='/tmp/home/root'
    PATH='/opt/usr/sbin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin'
    PPID='1948'
    PS1='\u@\h:\w\$ '
    PS2='> '
    PS4='+ '
    PWD='/cifs1/adblock/dist'
    SHELL='/bin/sh'
    SSH_CONNECTION='192.168.1.122 55311 192.168.1.1 22'
    SSH_TTY='/dev/pts/1'
    TEMP='/opt/tmp'
    TERM='xterm'
    TERMINFO='/opt/share/terminfo'
    TMP='/opt/tmp'
    USER='root'
    _='libc.so.0'
    Evidence #2 - vbindiff on another Linux box shows Tomatoware paths hard-coded in the binaries of the same source compiled under two different Tomatoware prefixes:
    Code:
    ./pixelserv 
    0000 0000: 7F 45 4C 46 01 01 01 00  00 00 00 00 00 00 00 00  .ELF.... ........
    0000 0010: 02 00 08 00 01 00 00 00  D0 19 40 00 34 00 00 00  ........ ..@.4...
    0000 0020: 00 4B 00 00 05 10 00 50  34 00 20 00 07 00 28 00  .K.....P 4. ...(.
    0000 0030: 1A 00 19 00 06 00 00 00  34 00 00 00 34 00 40 00  ........ 4...4.@.
    0000 0040: 34 00 40 00 E0 00 00 00  E0 00 00 00 05 00 00 00  4.@..... ........
    0000 0050: 04 00 00 00 03 00 00 00  14 01 00 00 14 01 40 00  ........ ......@.
    0000 0060: 14 01 40 00 23 00 00 00  23 00 00 00 04 00 00 00  ..@.#... #.......
    0000 0070: 01 00 00 00 01 00 00 00  00 00 00 00 00 00 40 00  ........ ......@.
    0000 0080: 00 00 40 00 10 49 00 00  10 49 00 00 05 00 00 00  ..@..I.. .I......
    0000 0090: 00 00 01 00 01 00 00 00  10 49 00 00 10 49 41 00  ........ .I...IA.
    0000 00A0: 10 49 41 00 18 01 00 00  D0 01 00 00 06 00 00 00  .IA..... ........
    0000 00B0: 00 00 01 00 02 00 00 00  38 01 00 00 38 01 40 00  ........ 8...8.@.
    0000 00C0: 38 01 40 00 F8 00 00 00  F8 00 00 00 07 00 00 00  8.@..... ........
    0000 00D0: 04 00 00 00 51 E5 74 64  00 00 00 00 00 00 00 00  ....Q.td ........
    0000 00E0: 00 00 00 00 00 00 00 00  00 00 00 00 07 00 00 00  ........ ........
    0000 00F0: 10 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
    0000 0100: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
    0000 0110: 04 00 00 00 2F 6F 70 74  2F 74 6F 6D 61 74 6F 77  ..../opt /tomatow
    0000 0120: 61 72 65 2F 6C 69 62 2F  6C 64 2D 75 43 6C 69 62  are/lib/ ld-uClib
    0000 0130: 63 2E 73 6F 2E 30 00 00  01 00 00 00 4F 00 00 00  c.so.0.. ....O...
    0000 0140: 0C 00 00 00 5C 0C 40 00  0D 00 00 00 B0 36 40 00  ....\.@. .....6@.
    0000 0150: 04 00 00 00 30 02 40 00  05 00 00 00 94 08 40 00  ....0.@. ......@.
    0000 0160: 06 00 00 00 54 04 40 00  0A 00 00 00 36 02 00 00  ....T.@. ....6...
    
    ../../pixelserv/dist/pixelserv 
    0000 0000: 7F 45 4C 46 01 01 01 00  00 00 00 00 00 00 00 00  .ELF.... ........
    0000 0010: 02 00 08 00 01 00 00 00  D0 19 40 00 34 00 00 00  ........ ..@.4...
    0000 0020: 00 4B 00 00 05 10 00 50  34 00 20 00 07 00 28 00  .K.....P 4. ...(.
    0000 0030: 1A 00 19 00 06 00 00 00  34 00 00 00 34 00 40 00  ........ 4...4.@.
    0000 0040: 34 00 40 00 E0 00 00 00  E0 00 00 00 05 00 00 00  4.@..... ........
    0000 0050: 04 00 00 00 03 00 00 00  14 01 00 00 14 01 40 00  ........ ......@.
    0000 0060: 14 01 40 00 25 00 00 00  25 00 00 00 04 00 00 00  ..@.%... %.......
    0000 0070: 01 00 00 00 01 00 00 00  00 00 00 00 00 00 40 00  ........ ......@.
    0000 0080: 00 00 40 00 10 49 00 00  10 49 00 00 05 00 00 00  ..@..I.. .I......
    0000 0090: 00 00 01 00 01 00 00 00  10 49 00 00 10 49 41 00  ........ .I...IA.
    0000 00A0: 10 49 41 00 18 01 00 00  D0 01 00 00 06 00 00 00  .IA..... ........
    0000 00B0: 00 00 01 00 02 00 00 00  3C 01 00 00 3C 01 40 00  ........ <...<.@.
    0000 00C0: 3C 01 40 00 F8 00 00 00  F8 00 00 00 07 00 00 00  <.@..... ........
    0000 00D0: 04 00 00 00 51 E5 74 64  00 00 00 00 00 00 00 00  ....Q.td ........
    0000 00E0: 00 00 00 00 00 00 00 00  00 00 00 00 07 00 00 00  ........ ........
    0000 00F0: 10 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
    0000 0100: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ........ ........
    0000 0110: 04 00 00 00 2F 63 69 66  73 31 2F 74 6F 6D 61 74  ..../cif s1/tomat
    0000 0120: 6F 77 61 72 65 2F 6C 69  62 2F 6C 64 2D 75 43 6C  oware/li b/ld-uCl
    0000 0130: 69 62 63 2E 73 6F 2E 30  00 00 00 00 01 00 00 00  ibc.so.0 ........
    0000 0140: 4F 00 00 00 0C 00 00 00  60 0C 40 00 0D 00 00 00  O....... `.@.....
    0000 0150: B0 36 40 00 04 00 00 00  34 02 40 00 05 00 00 00  .6@..... 4.@.....
    0000 0160: 98 08 40 00 06 00 00 00  58 04 40 00 0A 00 00 00  ..@..... X.@.....
    
    If I can't dynamically link against the router's libraries instead of Tomatoware's, then Tomatoware is not going to be usable for building binaries that I want to share with other people.

    EDIT: To clarify, dynamically linked binaries should be able to use the router firmware's version of these standard libraries, instead of looking in a hard-coded place for the Tomatoware versions.
     

Share This Page