Tomatoware

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

  1. fonos

    fonos Serious Server Member

    Thanks Lance. I'll check out the patch tomorrow. Just one question: What exacly does it do? I ask because, as you can see from my post above, distcc is working with the make stage of the build and giving me an 80% reduction in the compile time. If it already works, (using the -j argument, rather than -j4), I'm curious what the patch adds to the process.

    I was actually building 1.0.2g but a quick tweak to the url shows that there is also a patch for 1.0.2g.

    I did a bit of reading up and saw that the router is still running the preprocessor step when using distcc, but even that step can be pushed to the server using the pump command. Unfortunately, it looks to be just a bit too bleeding edge and chucked out a whole bunch of error messages before reverting to "vanilla" distcc. The fact that pump was configured to look for python is /usr/bin, rather than /mmc/bin also gently hinted that it might not be quite ready for front-line use! :)
     
  2. lancethepants

    lancethepants Network Guru Member

    https://distcc.googlecode.com/svn/trunk/doc/web/man/distcc_1.html#TOC_9

    @fonos
    I did explore pump mode a bit, but found that it isn't really feasible for tomatoware. Both client and server need to have the exact same complete set of header files with the exact same absolute path. The cross-compilation toolchain on the PC is not aware of the library headers available in tomatoware, it is just a barebones compiler.
     
  3. leandroong

    leandroong LI Guru Member

    Suggestion, possible to add auto delete folders in toolchain.sh ? for easier to execute next time


    #!/bin/bash

    set -e
    set -x

    export BASE=`pwd`
    export SRC=$BASE/src
    export PATCHES=$BASE/patches

    #delete directory
    sudo rm -rf /opt/tomatoware/
    sudo rm -rf $BASE/toolchain/


    ....
     
  4. lancethepants

    lancethepants Network Guru Member

    I only delete the toolchain when there's something that's changed with it, ie new version of uclibc, new version of buildroot. Otherwise there's no reason to build it every time tomatoware is built.
    I might add a "make clean" and "make clean-toolchain" options in the future.
    For now I run
    Code:
    git clean -fdxq && git reset --hard
    
    to clean things up.
     
    Monk E. Boy, koitsu and AndreDVJ like this.
  5. leandroong

    leandroong LI Guru Member

    Wow, looks like new toolchain, hopefully this will fix compilation issue with unbound.
    One more improvement, in config.mk, kindly add "export PREFIX=/mnt".
     
  6. leandroong

    leandroong LI Guru Member

    For info, latest entware toolchain still has "segmentation" issue on binary compiled "unbound" repo.
     
  7. lancethepants

    lancethepants Network Guru Member

    @leandroong Does the same issue happen on ARM? What happens if you compile it dynamically instead of statically, does it still segfault?
     
  8. leandroong

    leandroong LI Guru Member

    Sor
    Sorry, I only have mipsel2. Have not try dynamically yet. My old entware toolchain can compile and run w/out issue.

    edit2: I think, maybe it has issue on python module, that is where "jedist1" fixed his segmentation issue.

    edit3. Check his remedy, https://github.com/jedisct1/unbound/commit/6b79c98be7552e93bfbb080bb7c694f8a67da35c
     
  9. leandroong

    leandroong LI Guru Member

    Since his remedy has been incorporated in source code, then tomatoware should run w/out issue also. I can only put blame on new toolchain.
     
  10. lancethepants

    lancethepants Network Guru Member

    Does it compile and work with entware-ng or optware-ng toolchains?
     
  11. leandroong

    leandroong LI Guru Member

    Yes they compile but not running, "segfault" issue, on optware-ng toolchains.
    To be clear, I don't run or maintain new entware-ng toolchain. What I use to run is my very old entware toolchain located on another virtualbox-ubuntu-12.10.

    edit2:
    my old entware toolchain info:
    uclibc - 0.9.33.2
    gcc - 4.4.7
    binutils - 2.24.2013.12

    note: this old entware toolchain binary works on optware-ng-toolchains
     
  12. lancethepants

    lancethepants Network Guru Member

    I'd bet money that static unbound built with modern entware-ng toolchain would segfault too, or probably any other uclibc(-ng) toolchain based on >= gcc-5.2.0. So maybe it could be a bug in modern gcc. If so, it's way out of my scope, and over my head. I, however, would put my money on it being unbound. I thought I read somewhere you found a commit beforewhich it did not segfault.

    This is where I would get very scientific. If you did find a last commit where it will run using modern gcc, then I would take that to the unbound mailing lists or whatever they use, and say "after such and such commit, unbound segfaults when compiled statically". Tell the versions of gcc it fails on (5.2.0, 5.3.0), tell them that you're using uclibc, and that you're compiling statically as well. Try compiling dynamically first as well, and tell them if that work's or not (I bet it will). Tell them their latest commits still work on gcc-4.6.4, if that is the case. There's a lot of signficant release between 4.6.4 and 5.2/5.3, so if you wanted to get really scientific, you could build and test several toolchains using crosstools-ng or buildroot or something with various versions of gcc.
     
  13. leandroong

    leandroong LI Guru Member

    too complicated for me, treat it as info. Like, i said, if i use my old entware toolchain, binary produce runs perfect statically, with your source code. This is clearly an issue in new entware toolchain and not tomatoware anymore. Anyway, easier for me, to maintain 2 VBox, one dedicated for unbound compilation and another for the rest of the repository that im using.
     
  14. szpunk

    szpunk LI Guru Member

    unbound 1.5.7 has "segfault" issue with static compile, but 1.5.8 is fine:

    git version maybe work too: (short time tested)
     
    Last edited: Mar 18, 2016
  15. leandroong

    leandroong LI Guru Member

    For info, here is my router tomatoware result, dynamically
    1. compile procedure
    LDFLAGS="-L/mnt/lib -Wl,--gc-sections" \
    CPPFLAGS="-I/mnt/include" \
    CFLAGS="-O3 -mtune=mips32 -mips32 -ffunction-sections -fdata-sections" \
    CXXFLAGS=$CXXFLAGS \
    ./configure --prefix=/mnt --host=mipsel-linux \
    --with-ssl=/mnt \
    --with-libexpat=/mnt \
    --enable-static-exe \
    --enable-static \
    --disable-shared \
    --disable-flto

    2. unbound -v
    /opt/home/admin # unbound -v
    [1458402837] unbound[17286:0] notice: Start of unbound 1.5.9.
    [1458402837] unbound[17286:0] error: can't bind socket: Cannot assign requested address for ::1
    [1458402837] unbound[17286:0] fatal error: could not open ports

    3. system log messages
    Mar 19 23:53:41 root: Started unbound from .
    Mar 19 23:53:41 unbound: [17276:0] error: Error for server-cert-file: /mnt/etc/unbound/opt/etc/unbound/unbound_server.pem
    Mar 19 23:53:41 unbound: [17276:0] error: Error in SSL_CTX use_certificate_chain_file crypto error:02001002:system library:fopen:No such file or directory
    Mar 19 23:53:41 unbound: [17276:0] error: and additionally crypto error:20074002:BIO routines:FILE_CTRL:system lib
    Mar 19 23:53:41 unbound: [17276:0] error: and additionally crypto error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib
    Mar 19 23:53:41 unbound: [17276:0] fatal error: could not set up remote-control

    edit2:
    after copying and transfer unbound folder files from /opt/etc/unbound to /mnt/etc/unbound and editing /opt/etc/init.d/S61unbound, i was able to get it running dynamically.
    Static compile version has issue for me, will check again.

    edit3:
    After correcting unbound script, the resulting binary now working fine as well.
    Sorry, for the trouble, never thought script got corrupted.
     
    Last edited: Mar 19, 2016
  16. szpunk

    szpunk LI Guru Member

    Here is my static compile with tomatoware arm info: (dont use inter 'enable-static' support)
    LDFLAGS="-Wl,-static -static -static-libgcc -s" \
    ./configure --prefix=/opt --with-ssl=/mmc -with-libexpat=/mmc --disable-flto --with-libevent=/mmc

    With tomatoware mipsel, it's a little bit complicated:
    ./configure --prefix=/opt --with-ssl=/mmc -with-libexpat=/mmc --disable-flto --with-libevent=/mmc

    then edit Makefile:
    add '-all-static' to LDFLAGS, add '-ldl' to LIBS at the end, just like:
    Code:
    LDFLAGS= -all-static -L/mmc/lib -L/mmc/lib
    LIBS=  -lcrypto -ldl
     
  17. lancethepants

    lancethepants Network Guru Member

    szpunk, fonos and AndreDVJ like this.
  18. szpunk

    szpunk LI Guru Member

    @lancethepants

    Could you tell me how to static compile `ccze`? (https://github.com/cornet/ccze)

    I saw you compiled a mipsel version on your site.

    The hard i feel is how to include all plugin into the static file?

    Thanks!
     
  19. lancethepants

    lancethepants Network Guru Member

    @szpunk
    Code:
    LDFLAGS="-static" \
    ./configure \
    --with-builtins="\
    apm fetchmail oops proftpd syslog
    distcc ftpstats php squid ulogd
    dpkg httpd postfix sulog vsftpd
    exim icecast procmail super xferlog"
    
     
    szpunk likes this.
  20. szpunk

    szpunk LI Guru Member

    A very nice "Real-time performance monitoring, in the greatest possible detail" call `netdata` work fine on tomatoware:

    [​IMG]

    More info:

    http://netdata.firehol.org/
     
  21. fonos

    fonos Serious Server Member

    Looks pretty damn sexy. I just tried building it on TW v1.3 (both ARM and MIPS) and it failed at the same place on both. There's no INSTALL file, so I'm ad-libbing a bit, but I noticed that the netdata-installer.sh script uses bash so changed it to point to /mmc/bin/bash and then simply ran
    Code:
    ./net-installer.sh --install /tmp/mnt/sda1
    It seems to have configured things ok but fails during the compile at:
    Code:
    gcc -DHAVE_CONFIG_H -I. -I..  -DCACHE_DIR="\"/tmp/mnt/sda1/netdata/var/cache/netdata\"" -DCONFIG_DIR="\"/tmp/mnt/sda1/netdata/etc/netdata\"" -DLOG_DIR="\"/tmp/mnt/sda1/netdata/var/log/netdata\"" -DPLUGINS_DIR="\"/tmp/mnt/sda1/netdata/usr/libexec/netdata/plugins.d\"" -DWEB_DIR="\"/tmp/mnt/sda1/netdata/usr/share/netdata/web\""       -O3 -pthread -MT plugin_proc.o -MD -MP -MF .deps/plugin_proc.Tpo -c -o plugin_proc.o plugin_proc.c
    plugin_proc.c: In function 'proc_main':
    plugin_proc.c:224:14: error: 'RUSAGE_THREAD' undeclared (first use in this function)
        getrusage(RUSAGE_THREAD, &thread);
                  ^
    plugin_proc.c:224:14: note: each undeclared identifier is reported only once for each function it appears in
    Makefile:595: recipe for target 'plugin_proc.o' failed
    make[2]: *** [plugin_proc.o] Error 1
    I also tried ./autogen.sh then ./configure then make and got the same error, so at least it's consistent!

    How did you manage to get it to build?
     
  22. lancethepants

    lancethepants Network Guru Member

    @fonos
    I'm seeing the same issue. I added the following after the #includes in the two offending files.

    Code:
    #ifndef RUSAGE_THREAD
    #define RUSAGE_THREAD 1
    #endif
    
     
  23. fonos

    fonos Serious Server Member

    You didn't mention the second file but I figured it would find me. And it did. :) Yep, that now compiles. Many thanks. Getting it to run might prove more of a challenge...
     
  24. lancethepants

    lancethepants Network Guru Member

    Tomatoware Nightly Builds

    http://files.lancethepants.com/Tomatoware/Nightly/

    A nightly build is only generated when a change in git has been detected. Just look/sort for the latest date, and you will have the latest version. It will contain up to 10 of the most recent images.
     
    AndreDVJ likes this.
  25. reaper

    reaper New Member Member

    Hello, folks.
    Already googled a bit about this issue but couldn't find anything usable.

    Trying to install cffi python package on a shibby 132 mipsel with TW 1.3 and entware-ng.
    Apparently an option has not been embedded yet in gcc (GCC) 5.3.0
    Anyone can compass me? Thanks.

    /opt/bin# pip install cffi
    Collecting cffi
    Using cached cffi-1.6.0.tar.gz
    Complete output from command python setup.py egg_info:
    gcc: error: unrecognized command line option '-fhonour-copts'
    gcc: error: unrecognized command line option '-fhonour-copts'
    gcc: error: unrecognized command line option '-fhonour-copts'
    gcc: error: unrecognized command line option '-fhonour-copts'

    No working compiler found, or bogus compiler options
    passed to the compiler from Python's distutils module.
    See the error messages above.
    (If they are about -mno-fused-madd and you are on OS/X 10.8,
    see http://stackoverflow.com/questions/22313407/ .)

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /mmc/tmp/pip-build-YbJKdB/cffi/

    /opt/bin# env
    SSH_CLIENT=xxxxxxxxxxxxxxxx
    USER=root
    CGO_ENABLED=0
    SHLVL=1
    TERMINFO=/mmc/share/terminfo
    OLDPWD=/opt
    HOME=/root
    SSH_TTY=/dev/pts/0
    PS1=\u@\h:\w\$
    TMPDIR=/mmc/tmp
    LOGNAME=root
    TEMP=/mmc/tmp
    PKG_CONFIG_PATH=/mmc/lib/pkgconfig
    TERM=xterm
    PATH=/mmc/sbin:/mmc/bin:/mmc/bin/go/bin:/mmc/go/bin:/opt/usr/sbin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin
    TMP=/mmc/tmp
    GOPATH=/mmc/go
    SHELL=/bin/sh
    CONFIG_SHELL=/mmc/bin/bash
    PWD=/opt/bin
    SSH_CONNECTION=xxxxxxxxxxxxxxxx
    M4=/mmc/bin/m4
    CC=gcc
    PKG_CONFIG_LIBDIR=/mmc/lib/pkgconfig
    /opt/bin#​
     
  26. lancethepants

    lancethepants Network Guru Member

    @reaper

    The problem here is that you're trying to compile a python module for entware's python using the Tomatoware compiler. When python is cross-compiled, it remembers the compile time options and that's what it uses on native compilations as well. You may have noticed the compiler was looking for "mipsel-openwrt-linux-uclibc-gcc", but it looks like you have overridden that with the "CC" environment variable. You should use the entware compiler, but unfortunately they do not provide one for mipsel. You can maybe request cffi from entware guys.

    or

    You can compile cffi using Tomatoware for Tomatware's python (instead of entware's). Tomatoware's python and entware's python are completely separate, so if whatever you're doing requires additional python modules, you have to do it all in Tomatoware. Tomatoware, however, should be fully capable of doing about anything you want.

    To get pip for Tomatoware you have to compile it yourself, but it is easy as pie.
    Download the source files for setuptools and pip, and extract them. Then for for setuptools, then pip, run
    Code:
    python setup.py install
    
    You will then have pip for Tomatoware, and can run 'pip install cffi' successfully.

    Entware and Tomatoware's python can both co-exist, but for this excerise it might be easiest to remove entware, if only temporarily, so there's not confusion about which python or pip command is being run.
     
    Monk E. Boy likes this.
  27. reaper

    reaper New Member Member

    This indeed looks precious... thanks!!!
    I'll give it a try as soon as my Frankenstein workaround has finished assembling everything (let's crossfinger):
    renamed /mmc/bin/gcc to gcc_
    compiled as xxx the following (basically a wrapper around gcc to strip stuff and add other stuff):
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    char command[10000]="gcc_ ";
      void main( int argc, char *argv[] )
      {
      int ctr, ret;
      for( ctr=1; ctr < argc; ctr++ )
      {
         ret = strcmp(argv[ctr], "-fhonour-copts");
         if (ret!=0) {
           puts( argv[ctr] );
           strcat(command,argv[ctr]);
           strcat(command," ");
         }
      }
        strcat(command,"-I/mmc/include/python2.7 ");
        puts("======================COMMAND======================");
        puts(command);
        ret=system(command);
        printf("Exit code:%d\n",ret);
        puts("===================================================");
        exit(ret);
      }
    
    simlinked /mmc/bin/gcc to xxx
    simlinked /mmc/bin/mipsel-openwrt-linux-uclibc-gcc to xxx

    compilation issues seem gone... but I'm not quite confident about the end results, too many things might mess up and crossover between the two TW & EW-NG
    mitmproxy is the target, so many other modules are involved... your way is for sure the cleanest!
    Will keep you posted...
     
  28. lancethepants

    lancethepants Network Guru Member

    @reaper

    Will be interesting so see how it reacts. It still feels a little dirty to me. GCC in tomatoware is patched so that it will use it's own dynamic linker /mmc/lib/ld-uClibc.so.1. So while python in entware is using it's own set of libraries with it's dynamic linker, some of those modules will be using the Tomatoware c library and dynamic linker and possibly other libraries.

    If you're feeling really intrepid (and patient because of mipsel) and want the latest version of python, I like to compile pyrun.
    http://www.egenix.com/products/python/PyRun/

    It compiles all of python into a single binary you can run, and also works fine with installing site-packages. There are a few things that are left as dynamically loadable modules. It's completely relocatable becaues it uses relatvie path rpath.

    These are a few notes for compiling, half for my future self.
    Code:
    make \
    LDFLAGS="-L/mmc/lib -lintl" \
    -j2
    
    make \
    LDFLAGS="-L/mmc/lib -lintl" \
    install \
    PREFIX=/mmc/python
    
     
  29. reaper

    reaper New Member Member

    I'll surely try and be "intrepid" as I have just switched to EW-NG from old OW and lost python3 (and consequently new rss2email, flexget and some other 3.x-only stuff as well)

    Frankenstein ended up bad, unfortunately, even if I thought I was pretty close to a successful assembly:
    Code:
    /tmp/home/root/.cache# pip --cache-dir /opt/tmp/cache/pip install Pillow
    Collecting Pillow
      Using cached Pillow-3.2.0.zip
    Installing collected packages: Pillow
      Running setup.py install for Pillow ... error
      Complete output from command /opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/opt/tmp/pip-build-c3UKA1/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /opt/tmp/pip-zVqs8e-record/install-record.txt --single-version-externally-managed --compile:
      Single threaded build, not installing mp_compile:1 processes
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-mips-2.7
      creating build/lib.linux-mips-2.7/PIL
      copying PIL/ImageGrab.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/TiffImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/MicImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/FitsStubImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ExifTags.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageChops.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/CurImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageEnhance.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/WebPImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PngImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/DcxImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/TgaImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PsdImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/JpegPresets.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/GimpPaletteFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/GbrImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/OleFileIO.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PSDraw.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/_binary.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageSequence.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/DdsImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/McIdasImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/IptcImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageTransform.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PdfImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/JpegImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/FontFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/Hdf5StubImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PcxImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/WalImageFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageQt.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/IcnsImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/BufrStubImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/EpsImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/TiffTags.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/BmpImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/MpoImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/Image.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/GimpGradientFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/SgiImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageCms.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageDraw2.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageStat.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/SpiderImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageWin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/Jpeg2KImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/__init__.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImagePalette.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/FtexImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/SunImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageFont.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageTk.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/TarIO.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageShow.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PpmImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/XpmImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageColor.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PyAccess.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/GifImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImagePath.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageFilter.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageMode.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/features.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/GdImageFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ContainerIO.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/MspImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PalmImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageMath.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/FliImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/MpegImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PcfFontFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/XbmImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageOps.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageDraw.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PixarImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/BdfFontFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/FpxImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/IcoImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImtImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PcdImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/PaletteFile.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/_util.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/ImageMorph.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/XVThumbImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/WmfImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      copying PIL/GribStubImagePlugin.py -> build/lib.linux-mips-2.7/PIL
      running egg_info
      writing Pillow.egg-info/PKG-INFO
      writing top-level names to Pillow.egg-info/top_level.txt
      writing dependency_links to Pillow.egg-info/dependency_links.txt
      warning: manifest_maker: standard file '-c' not found
    
      reading manifest file 'Pillow.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*.sh'
      no previously-included directories found matching 'docs/_static'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.landscape.yaml'
      warning: no previously-included files found matching 'appveyor.yml'
      warning: no previously-included files found matching 'build_children.sh'
      warning: no previously-included files found matching 'tox.ini'
      warning: no previously-included files matching '.git*' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      writing manifest file 'Pillow.egg-info/SOURCES.txt'
      copying PIL/OleFileIO-README.md -> build/lib.linux-mips-2.7/PIL
      warning: build_py: byte-compiling is disabled, skipping.
    
      running build_ext
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/opt/tmp/pip-build-c3UKA1/Pillow/setup.py", line 767, in <module>
      zip_safe=not debug_build(), )
      File "/opt/lib/python2.7/distutils/core.py", line 151, in setup
      dist.run_commands()
      File "/opt/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
      File "/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
      File "/opt/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
      return orig.install.run(self)
      File "/opt/lib/python2.7/distutils/command/install.py", line 563, in run
      self.run_command('build')
      File "/opt/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
      File "/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
      File "/opt/lib/python2.7/distutils/command/build.py", line 127, in run
      self.run_command(cmd_name)
      File "/opt/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
      File "/opt/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
      File "/opt/lib/python2.7/distutils/command/build_ext.py", line 342, in run
      self.build_extensions()
      File "/opt/tmp/pip-build-c3UKA1/Pillow/setup.py", line 512, in build_extensions
      ' using --disable-%s, aborting' % (f, f))
      ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
    
      ----------------------------------------
    Command "/opt/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/opt/tmp/pip-build-c3UKA1/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /opt/tmp/pip-zVqs8e-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /opt/tmp/pip-build-c3UKA1/Pillow/
    
    I followed your suggestion of a standalone assembly by TW itself and commented out all /opt... dirs from PATH after preparing env with:
    Code:
    . /mmc/etc/profile
    Now the Dark Night is covered with sizzling eggs and bacon while busy with:
    Code:
    Building wheels for collected packages: tornado, cryptography, html2text, pyperclip, click, watchdog, lxml, blinker, Flask, urwid, backports.ssl-match-hostname, Pillow, configargparse, cffi, PyYAML, argh, pathtools, itsdangerous, pycparser, MarkupSafe
      Running setup.py bdist_wheel for tornado ... done
      Stored in directory: /root/.cache/pip/wheels/df/20/c7/38911d3d7ac9ae3c6c1b73f01bc61d8fdb46c7fad1a720d394
      Running setup.py bdist_wheel for cryptography ... done
      Stored in directory: /root/.cache/pip/wheels/f7/ff/8e/0452559598fa46ed95a14149f020e413fb8c9843a8ce057c4e
      Running setup.py bdist_wheel for html2text ... done
      Stored in directory: /root/.cache/pip/wheels/5e/2f/81/75019ec9525d2e638acfc591f7bb9c46f06b0dcfe61f4ea8b6
      Running setup.py bdist_wheel for pyperclip ... done
      Stored in directory: /root/.cache/pip/wheels/0b/fe/d7/1ab1ec7a91dc707d04b872214f6ce617f1b04a027de12fd4fe
      Running setup.py bdist_wheel for click ... done
      Stored in directory: /root/.cache/pip/wheels/b0/6d/8c/cf5ca1146e48bc7914748bfb1dbf3a40a440b8b4f4f0d952dd
      Running setup.py bdist_wheel for watchdog ... done
      Stored in directory: /root/.cache/pip/wheels/3c/9c/be/e82ae5a37c19baf8abe88623d1f47d2d502bed7b54d4f34740
      Running setup.py bdist_wheel for lxml ... |
    
    will keep you posted about the outcome...
     
  30. lancethepants

    lancethepants Network Guru Member

    @reaper

    You can also compile python3 with pyrun. I think I did it once, but I don't remember if it needed some extra help.
    If you've got a linux box on your network, you can try to offload compiling to that with distcc.

    https://github.com/lancethepants/tomatoware/wiki/Using-distcc

    This wiki page explains how to do this. I use it especially on mipsel cause it's so slow. If you compile pyrun this way, when you do python modules, they will also be looking for distcc. You should be able to override that if wanted as it seems you did that before. Arm was worth the purchase for me when it comes to native compiling stuff. I hate cross-compiling, which ironically I had to do a ton of to make Tomatoware.

    I think pyrun on arm with -j2 was < 20 minutes.
     
    Monk E. Boy likes this.
  31. lancethepants

    lancethepants Network Guru Member

    You could also just compile regular python as well, maybe just --prefix it with some some subdir so not to get it all mixed up with the pre-existing version.
     
  32. reaper

    reaper New Member Member

    OK here a positive update...
    Even with segregated TW python2 assembly, Pillow ended up complaining because of the missing jpeg modules:
    Code:
      running build_ext
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/mmc/tmp/pip-build-3x7Bi6/Pillow/setup.py", line 767, in <module>
      zip_safe=not debug_build(), )
      File "/mmc/lib/python2.7/distutils/core.py", line 152, in setup
      dist.run_commands()
      File "/mmc/lib/python2.7/distutils/dist.py", line 953, in run_commands
      self.run_command(cmd)
      File "/mmc/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
      File "build/bdist.linux-mips/egg/setuptools/command/install.py", line 61, in run
      File "/mmc/lib/python2.7/distutils/command/install.py", line 563, in run
      self.run_command('build')
      File "/mmc/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
      File "/mmc/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
      File "/mmc/lib/python2.7/distutils/command/build.py", line 127, in run
      self.run_command(cmd_name)
      File "/mmc/lib/python2.7/distutils/cmd.py", line 326, in run_command
      self.distribution.run_command(command)
      File "/mmc/lib/python2.7/distutils/dist.py", line 972, in run_command
      cmd_obj.run()
      File "/mmc/lib/python2.7/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
      File "/mmc/tmp/pip-build-3x7Bi6/Pillow/setup.py", line 512, in build_extensions
      ' using --disable-%s, aborting' % (f, f))
      ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
    
      ----------------------------------------
    Command "/mmc/bin/python -u -c "import setuptools, tokenize;__file__='/mmc/tmp/pip-build-3x7Bi6/Pillow/setup.py';exec(compile(getatt  r(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /mmc/tmp/pip-pU2cZf-record/in  stall-record.txt --single-version-externally-managed --compile" failed with error code 1 in /mmc/tmp/pip-build-3x7Bi6/Pillow/
    
    However, after compiling jpeg-8c.tar.gz per suggestion at following link
    https://askubuntu.com/questions/211627/how-to-add-support-for-the-jpeg-image-format

    Assembly went smoothly and mitmproxy built up.
    @lancethepants you the man!!! Credits and Respect!
     
  33. reaper

    reaper New Member Member

    An update on this... eGenix PyRun compiled successfully in about 45' with no major issues on the rtn66u
    Several test files ran OK
     
  34. reaper

    reaper New Member Member

    Hello... an update on this as well...
    I managed to have mitmproxy up and running with a further final hack due to an error at startup.
    VERY SLOW, THOUGH!!!
    The problem: libc.so.1 was being searched in /lib/libc.so.1 instead of /mmc/lib... due to how output from dummy gcc compilation was being produced in _findLib_gcc(name) of /mmc/lib/python2.7/ctypes/util.py module. There might be other ways to work around this but environment variables changes didn't help.
    Code:
    root@alfredosauce:/mmc/lib/python2.7/ctypes# mitmproxy --host
    Traceback (most recent call last):
      File "/mmc/bin/mitmproxy", line 11, in <module>
      sys.exit(mitmproxy())
      File "/mmc/lib/python2.7/site-packages/mitmproxy/main.py", line 45, in mitmproxy
      from . import console
      File "/mmc/lib/python2.7/site-packages/mitmproxy/console/__init__.py", line 19, in <module>
      from .. import controller, flow, script, contentviews
      File "/mmc/lib/python2.7/site-packages/mitmproxy/flow.py", line 20, in <module>
      from . import controller, tnetstring, filt, script, version, flow_format_compat
      File "/mmc/lib/python2.7/site-packages/mitmproxy/script/__init__.py", line 5, in <module>
      from . import reloader
      File "/mmc/lib/python2.7/site-packages/mitmproxy/script/reloader.py", line 7, in <module>
      from watchdog.observers import Observer
      File "/mmc/lib/python2.7/site-packages/watchdog/observers/__init__.py", line 63, in <module>
      from .inotify import InotifyObserver as Observer
      File "/mmc/lib/python2.7/site-packages/watchdog/observers/inotify.py", line 74, in <module>
      from .inotify_buffer import InotifyBuffer
      File "/mmc/lib/python2.7/site-packages/watchdog/observers/inotify_buffer.py", line 20, in <module>
      from watchdog.observers.inotify_c import Inotify
      File "/mmc/lib/python2.7/site-packages/watchdog/observers/inotify_c.py", line 50, in <module>
      libc = _load_libc()
      File "/mmc/lib/python2.7/site-packages/watchdog/observers/inotify_c.py", line 48, in _load_libc
      return ctypes.CDLL('libc.so.6')
      File "/mmc/lib/python2.7/ctypes/__init__.py", line 365, in __init__
      self._handle = _dlopen(self._name, mode)
    OSError: File not found
    root@alfredosauce:/mmc/lib/python2.7/ctypes#
    
    here the change to /mmc/lib/python2.7/ctypes/util.py in def _findLib_gcc(name) function
    Code:
      if l[:4] == "/lib":
          return "/mmc" + l
      else:
          return l
    
    replaced the original statement:
    Code:
      return res.group(0)
    
    Thanks again @lancethepants
     
    Last edited: May 5, 2016
  35. ilium007

    ilium007 Serious Server Member

  36. lancethepants

    lancethepants Network Guru Member

    @ilium007
    I get the same thing as well when using the built-in openvpn binary. I compiled OpenVPN, and ran "/bin/mount --bind /mmc/sbin/openvpn /usr/sbin/openvpn" to have it mount over the built in binary, and then OpenVPN at least will start for me.
     
  37. ilium007

    ilium007 Serious Server Member

    ok cool, i will give that a go. thanks
     
  38. ilium007

    ilium007 Serious Server Member

    If I am not using lib_pam do I need to compile with any options other than default ? Just using --prefix=/mmc
     
  39. lancethepants

    lancethepants Network Guru Member

    That sounds be fine I think

    Sent from my XT1049 using Tapatalk
     
  40. ilium007

    ilium007 Serious Server Member

    yeah, I got it to compile and openvpn runs fine. Duo security isn't working however. I see a 'status=2' in the logs.

    Tue Jun 14 13:37:03 2016 us=90077 180.xxx.xxx.178:64434 PLUGIN_CALL: POST /mmc/duo/duo_openvpn.so/PLUGIN_AUTH_USER_PASS_VERIFY status=2
    Tue Jun 14 13:37:03 2016 us=90337 180.xxx.xxx.178:64434 TLS: Username/Password authentication deferred for username 'xxxxxxxxx'

    I'll have to take a look at it tonight.
     
  41. ilium007

    ilium007 Serious Server Member

    No luck - I just constantly get the following in the logs:

    Tue Jun 14 19:51:10 2016 us=940616 1.132.96.193:61817 PLUGIN_CALL: POST /mmc/duo/duo_openvpn.so/PLUGIN_AUTH_USER_PASS_VERIFY status=2
    Tue Jun 14 19:51:10 2016 us=940876 1.132.96.193:61817 TLS: Username/Password authentication deferred for username 'ilium007'


    Duo login name matches the CN in the cert.
     
  42. lancethepants

    lancethepants Network Guru Member

    I can maybe follow up on this next week. I'm super busy this week with things, including dealing with being rear-ended by a driver with no insurance.
     
  43. joksi

    joksi Serious Server Member

    I have downloaded the ARM MMC version and mounted /mmc to /mnt/sda1/tomatoware (folder on USB-stick), but looks like I have problems with extracting the archive fully. The tar command ends with several hundred lines of errors about not able to sym-link files? Anyone who knows what this could be?
     
  44. lancethepants

    lancethepants Network Guru Member

    Ah, just thought of this. Are you using a linux file system: ext2, ext3, ext4. It can't be fat or ntfs.
     
  45. joksi

    joksi Serious Server Member

    FAT32, now ext2!
    Thank you very much, that was it, compilation worked :)
     
    lancethepants likes this.
  46. ilium007

    ilium007 Serious Server Member

    That would be great - hope you get your car sorted :eek:
     
  47. lancethepants

    lancethepants Network Guru Member

    v1.4 with GCC-6.1 and current latest uclibc-ng 1.0.15 released
     
    fonos and AndreDVJ like this.
  48. ilium007

    ilium007 Serious Server Member

    Do you think this will fix my Duo Security issue ;)
     
  49. HunterZ

    HunterZ Network Guru Member

    I get an error building in the same Debian VM that I've been using for a long time:
    Code:
    mipsel-buildroot-linux-uclibc-g++  -g -O2 -DIN_GCC  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings  -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -L/home/ben/projects/tomatoware/mmc/tomatoware/lib -s -Wl,--dynamic-linker=/mmc/tomatoware/lib/ld-uClibc.so.1 -Wl,-rpath,/mmc/tomatoware/lib -Wl,-rpath-link,/home/ben/projects/tomatoware/mmc/tomatoware/lib gcov.o \
       hash-table.o ggc-none.o libcommon.a ../libcpp/libcpp.a  /home/ben/projects/tomatoware/mmc/tomatoware/lib/libiconv.so -Wl,-rpath -Wl,/home/ben/projects/tomatoware/mmc/tomatoware/lib ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a  -o gcov
    libcommon.a(pretty-print.o): In function `_ZN13output_bufferD4Ev':
    /home/ben/projects/tomatoware/src/gcc/gcc-build/gcc/../../gcc-6.1.0/gcc/pretty-print.c:73: undefined reference to `_obstack_free'
    /home/ben/projects/tomatoware/src/gcc/gcc-build/gcc/../../gcc-6.1.0/gcc/pretty-print.c:73: undefined reference to `_obstack_free'
    /home/ben/projects/tomatoware/src/gcc/gcc-build/gcc/../../gcc-6.1.0/gcc/pretty-print.c:74: undefined reference to `_obstack_free'
    /home/ben/projects/tomatoware/src/gcc/gcc-build/gcc/../../gcc-6.1.0/gcc/pretty-print.c:74: undefined reference to `_obstack_free'
    libcommon.a(pretty-print.o): In function `output_buffer::~output_buffer()':
    /home/ben/projects/tomatoware/src/gcc/gcc-build/gcc/../../gcc-6.1.0/gcc/pretty-print.c:73: undefined reference to `_obstack_free'
    libcommon.a(pretty-print.o):/home/ben/projects/tomatoware/src/gcc/gcc-build/gcc/../../gcc-6.1.0/gcc/pretty-print.c:73: more undefined references to `_obstack_free' follow
    collect2: error: ld returned 1 exit status
    Makefile:2751: recipe for target 'gcov' failed
    make[3]: *** [gcov] Error 1
    make[3]: *** Waiting for unfinished jobs....
    rm gcc.pod
    make[3]: Leaving directory '/home/ben/projects/tomatoware/src/gcc/gcc-build/gcc'
    Makefile:4129: recipe for target 'all-gcc' failed
    make[2]: *** [all-gcc] Error 2
    make[2]: Leaving directory '/home/ben/projects/tomatoware/src/gcc/gcc-build'
    Makefile:875: recipe for target 'all' failed
    make[1]: *** [all] Error 2
    make[1]: Leaving directory '/home/ben/projects/tomatoware/src/gcc/gcc-build'
    Makefile:4: recipe for target 'tomatoware' failed
    make: *** [tomatoware] Error 2
    
     
  50. leandroong

    leandroong LI Guru Member

    @HunterZ, i'm also running debian on virtualbox (latest), no compilation error on toolchain made on June 11,2016, after, GCC and uclibC-ng update.
     
    Last edited: Jun 19, 2016
  51. lancethepants

    lancethepants Network Guru Member

    Did you delete the previous cross-toolchain in /opt?
     
    Last edited: Jun 20, 2016
  52. HunterZ

    HunterZ Network Guru Member

    That seems to have sorted it, thanks.
     
  53. leandroong

    leandroong LI Guru Member

    FW: latest mipsel-soft-mnt.tgz (nightly)

    @lancethepants, I encounter cross-compilation problem of openssl using tomatoware in my router. No issue with cross-compilation on debian tomatoware.

    Code:
    + ./Configure linux-mips32 -mtune=mips32 -mips32 -ffunction-sections -fdata-sections -Wl,--gc-sections --prefix=/opt shared zlib --with-zlib-lib=/media/myssd/build/ipkg/unbound/opt/lib --with-zlib-include=/media/myssd/build/ipkg/unbound/opt/include
    perl: can't load library 'ld-uClibc.so.1'
    
     
  54. lancethepants

    lancethepants Network Guru Member

    @leandroong
    Looks like perl is broken in the latest nightly. I've created an issue on the perl-cross project, seems something broke in their latest release.
     
  55. leandroong

    leandroong LI Guru Member

    i encounter cross-compilation of transmission with latest toolchain added.
     
  56. lancethepants

    lancethepants Network Guru Member

  57. leandroong

    leandroong LI Guru Member

    Thanks, but I still get errors:
    Code:
    platform-quota.c: In function ‘getquota’:
    platform-quota.c:288:28: warning: "amp" is not defined [-Wundef]
     #elif defined(__UCLIBC__) &amp;&amp; (__UCLIBC_MAJOR__ == 0 || (__UCLIBC_MAJOR__ == 1 &amp;&amp; __UCLIBC_SUBLEVEL__ &lt;= 17))
                                ^~~
    platform-quota.c:288:31: error: token ";" is not valid in preprocessor expressions
     #elif defined(__UCLIBC__) &amp;&amp; (__UCLIBC_MAJOR__ == 0 || (__UCLIBC_MAJOR__ == 1 &amp;&amp; __UCLIBC_SUBLEVEL__ &lt;= 17))
                                   ^
    Makefile:1249: recipe for target 'platform-quota.o' failed
    make[1]: *** [platform-quota.o] Error 1
    make[1]: Leaving directory '/home/leandroong/my_script/ipkg/transmission/src/transmission/transmission-2.92/libtransmission'
    Makefile:507: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    leandroong@Debian:~/my_script/build_script$
    
    note2: my error due to manual patching, after replacement of the ff, it compiles successfully:
    1. change &amp; => &
    2.change &lt; => <

    Thanks
     
    Last edited: Oct 8, 2016
  58. leandroong

    leandroong LI Guru Member

  59. leandroong

    leandroong LI Guru Member

  60. lancethepants

    lancethepants Network Guru Member

    @leandroong I'm not sure what you mean by "causes dnscrypt static compilation".
     
  61. leandroong

    leandroong LI Guru Member

    Before yesterday, cross-compilation of your static dnscrypt-mipsel was successful. Upon update of tomatoware toolchain, due to added patch on uclibc-ng, I got cross-compilation error. Will show errors later

    here is partial result were errors occurs, dnscrypt module:
     

    Attached Files:

    Last edited: Oct 11, 2016
  62. leandroong

    leandroong LI Guru Member

    Fixed. Thanks again
     
  63. leandroong

    leandroong LI Guru Member

    only issue i'm encountering is segmentation when I run unbound (mipsel-linux). Anyway, my old entware toolchain still manage to compile and run it w/out issue.
    note: talking nightly build, not yet release.
    I notice that there seems to be a bug in usng "git pull", static patch seems not correctly applied. What I did, I just downloaded the .zip source code and compile that.
     
  64. leandroong

    leandroong LI Guru Member

    My mistake, i'm talking about aria2. Here is cross compilation bug for nightly dnscrypt:
    Code:
    /home/leandroong/tomatoware-master/toolchain/buildroot-2016.05/output/build/host-gcc-final-6.1.0/build/mipsel-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde-dip.c:465: undefined reference to `dl_iterate_phdr'
    /home/leandroong/tomatoware-master/toolchain/buildroot-2016.05/output/build/host-gcc-final-6.1.0/build/mipsel-buildroot-linux-uclibc/libgcc/../../../libgcc/unwind-dw2-fde-dip.c:465: undefined reference to `dl_iterate_phdr'
    collect2: error: ld returned 1 exit status
    
     
  65. lancethepants

    lancethepants Network Guru Member

  66. RichtigFalsch

    RichtigFalsch Networkin' Nut Member

    Thank you for your great Tomatoware, Lance! :)

    I could actually build the tool "arpwake.mips" (by Taras Glek) for ARM on my R7000 using Tomatoware. The build made by entware's gcc was non functional trash. And setting up a cross compiling machine would have been way too annoying to me.

    The arpwake tool is very important to me, I couldn't use a router without it anymore. (It enables you to wake up devices on arbitrary IP access. So it's very useful for example, if you want to wake up a virtualization host, when there's a request for any virtual machine's IP) I even think, this should be included in Tomato, with it's own gui section.

    Edit:
    I have attached the statically compiled binary.
     

    Attached Files:

    Last edited: Aug 2, 2017
    lancethepants likes this.
  67. leandroong

    leandroong LI Guru Member

    @lancethepants, aria2 cross-compilation change their approach. I hope, you will adjust your script in your time for mipsel-static. Here is what aria2 developer advise me
    Code:
    We rewrote configure script to use pkg-config to detect some libraries. They may wrongly find native libraries, and pull those linker paths.
    The affected libraries are:
    
        cppunit
        libxml2
        libexpat
        libnettle
    
    You configuration rules out libexpat and libnettle.
    Setting PKG_CONFIG_PATH to the cross compiled library path might solve the issue.
    Note2: Fixed, added the ff:
    ...
    export PKG_CONFIG_PATH=$DEST/lib/pkgconfig:$PKG_CONFIG_PATH
    ...

    ###
    #ARIA2
    ###
    ...
    LIBXML2_CFLAGS="-I$DEST/include/libxml2" \
    LIBXML2_LIBS="-L$DEST/lib" \
    ...
     
    Last edited: Dec 16, 2016
    lancethepants likes this.
  68. 'Zell86'

    'Zell86' Serious Server Member

    I got this error executing autoreconf for compiling google-authenticator-libpam
    (with tomatoware v1.4 mipsel-soft-mmc.tgz)

    autom4te: need GNU m4 1.4 or later: /opt/tomatoware/mipsel-soft-mmc/usr/bin//m4

    editing /mmc/bin/autom4te at line 90
    from:
    my $m4 = $ENV{"M4"} || '/opt/tomatoware/mipsel-soft-mmc/usr/bin//m4';
    to
    my $m4 = $ENV{"M4"} || '/mmc/bin/m4';

    fixed the problem
     
    Last edited: Feb 13, 2017
  69. lancethepants

    lancethepants Network Guru Member

    @Zell86
    Make sure you have a symlink /opt/etc/profile pointing to /mmc/etc/profile. It sets the M4 environment variable amongst other things. Tomato doesn't look for a profile file in /mmc (although maybe I should send in a pull request to do this).

    "export M4=/mmc/bin/m4"

    In the sample code you posted, it will use the M4 environment variable first if it exists.
    I'll add a line to tomatoware packaging to fix all references to M4 so it will work without the environment variable set.
     
    Last edited: Feb 14, 2017
  70. RichtigFalsch

    RichtigFalsch Networkin' Nut Member

    Hi, lance,
    I wonder if I could use tomatoware (or at least binaries I have built using tomatoware) within Asus-WRT-Merlin.
    Do you think this would work?
     
  71. lancethepants

    lancethepants Network Guru Member

    @RichtigFalsch
    Absolutely, just so long as it has the tomatoware environment as well for dynamic linked binaries OR you use static linked binaries.
     
    RichtigFalsch likes this.
  72. rs232

    rs232 Network Guru Member

    AndreDVJ likes this.
  73. RichtigFalsch

    RichtigFalsch Networkin' Nut Member

    Did you try building it yourself? As Tomatoware is supposed to be used for compiling, it's working really nice :)

    Edit:
    I just built it and it seems to be working fine, here's the binary:
     

    Attached Files:

    • mtr.zip
      File size:
      98.2 KB
      Views:
      4
    Last edited: May 21, 2017
  74. RichtigFalsch

    RichtigFalsch Networkin' Nut Member

    Btw: Lance, do you think compiling and running xvfb + (tinywm/fluxbox) +dependencies on Tomatoware+NetgearR7000 could be done, or would even trying this be too crazy?
     
    Last edited: May 21, 2017
  75. lancethepants

    lancethepants Network Guru Member

    @rs232
    Yes, tomatoware compiles mtr well (and fast as it is small). It seems to be a ping/traceroute tool, so I'm not sure how it would fit the toolkit of a development environment to be included in tomatoware.

    @RichtigFalsch
    I've always been one try crazy things just for kicks and giggles. In fact, this weekend I compiled all the kernel modules and userland utilities to run zfs on arm routers. You can always try it out, but even a 10 year old pc will run circles around a router.
     
    RichtigFalsch likes this.
  76. RichtigFalsch

    RichtigFalsch Networkin' Nut Member

    The use would for example be running some JavaApplications, that have WebInterfaces but also need to open their GUI for starting.
    So I wouldn't need much performance from the Desktop, it just shouldn't hog the CPU so much, that the router's main tasks are slowed down.

    If there's nothing making this completely impossible, I'll try this :)
     
    Last edited: May 22, 2017
  77. joksi

    joksi Serious Server Member

    Hi

    I would need som eassistance with compiling ndprbrd - NDP Routing Bridge Daemon ( https://github.com/google/ndprbrd )

    I have Tomatoware installed, so how do I proceed? :)
     
  78. joksi

    joksi Serious Server Member

    Never mind, I found a way.

    g++ -std=c++11 ndprbrd.cpp -o ndprbrd
     
    lancethepants likes this.
  79. lancethepants

    lancethepants Network Guru Member

    @joksi
    Sorry for the slow response, was camping last weekend and away from technology. If you throw a "-static" in there as well, your binary can run on routers without requiring tomatoware to be installed.
     
    joksi likes this.
  80. joksi

    joksi Serious Server Member

    Yep, I did notice that at first when I unmounted usb-stick with Tomatoware! Fortunately I found our one year old e-mail conversation about Netsed, and find the "-static" switch :) _Thank you.
     
  81. lancethepants

    lancethepants Network Guru Member

    I've tagged and released v1.6 of tomatoware. Most everything has been updated to its latest version. I updated to the asterisk 13 LTS since asterisk 11 is no longer receiving any updates.
     
    szpunk and RichtigFalsch like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice