Discussion in 'Tomato Firmware' started by ulyan, Jun 30, 2012.

  1. ulyan

    ulyan Networkin' Nut Member

    Hi there,

    I have a simple question. What is this (note the red letter, later on ...) ?! I have an optware installation of mysql 5.1.53-7 (not important I think) and It asks me for missing library. Thing is I think that once I solved this issue by renaming the or making a hard link (copy) of the library that I already found installed in /opt/lib.
    root@NAS:/opt# ls /opt/lib | grep libncurses*
    But is this appropiate ? I think they are two different things, aren't they ?

    Thanks. :oops:

    solved, found there is an instalable package on the entware repository.
  2. koitsu

    koitsu Network Guru Member

    DO NOT rename* to* or make hardlinks or copies. DO NOT. This is not how you solve library problems, not to mention it will break horribly for you. NEVER do this. There is zero guarantee an API will retain the same semantics as what is expected. The same goes for doing things like renaming to Never do that.

    libncursesw -- which is part of ncurses -- provides what is known as "wide character" support. That includes things like CJK (Chinese/Japanese/Korean) character sets, and more importantly, UTF-8 (Unicode). libncursesw does not have the same API semantics as libncurses; do not intermix the two.

    Remember what I told you in the other thread about PHP dependency hell? The same problem applies to MySQL and many other programs.

    What this indicates is that the MySQL build you have was built against a system that had wide character support enabled in libncurses. And that's actually Correct / Proper -- MySQL supports multiple character sets in its CLI utilities (mysql, mysqladmin, etc.) so libncursesw is recommended.

    Whoever built your version of ncurses which you have installed in /opt/lib did not built it with --enable-widec flag during the configure phase. While on the other hand, whoever built your MySQL package did so on a system that did have libncursesw available.

    Here's a reference model for you, just as documentation:

    However that document says that --enable-widec "builds libncursesw instead of the normal one". That is completely incorrect -- it will build both.

    All of these problems you're running into with all this software you're trying to install on TomatoUSB, by the way, are caused by the same root issue: the people who maintain the packages are not building things correctly or providing proper dependency lists. Even if the packaging system they use doesn't provide it, they still need to document what libraries are relied upon. To me, this indicates the person who's building them very likely does not have familiarity with building software on *IX (it's more than just configure && make && make install), and that's very disappointing.

    If you're developing software that's intended to run on TomatoUSB (more specifically: running mysqld on a TomatoUSB router), I would strongly recommend you consider something other than MySQL for your database storage back-end. Instead consider something like SQLite, which has a significantly smaller footprint (on disk as well as in memory -- especially the latter) and will perform better on an embedded system.

    If all you're needing are MySQL client-side tools via TomatoUSB, then that's fine.
  3. ulyan

    ulyan Networkin' Nut Member

    Thank you for your answers koitsu. I think I start to understandwhat you are trying to explain me every time I do such uninspired posts :).
  4. koitsu

    koitsu Network Guru Member

    Heh. I'm a UNIX SA and have done software development on many platforms (*IX, old video game consoles, and some Windows but that's a platform I tend to avoid), so this is pretty much basic knowledge for me. I'm glad what I've said helps, as that's my intention!
    Dark_Shadow likes 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