Results 1 to 15 of 28

Thread: making toolchain fails

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    making toolchain fails

    Hi, because I need the swftools http://www.swftools.org I want to build it via the wl500g-repo openwrt buildroot. (thx ryzhov_al)

    http://code.google.com/p/wl500g-repo.../trunk/INSTALL
    http://code.google.com/p/wl500g-repo...trunk/Makefile

    but instead of just make - at first I need to make .toolchain_installed
    (I'll do the Makefile steps manually, because of integrating the swftools via this guide: http://wiki.openwrt.org/doc/devel/packages)

    the build-system is an ubuntu-virtual machine

    ok, a title says the make of toolchain fails:

    Code:
    Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)
    Build dependency: Please install zlib. (Missing libz.so or zlib.h)
    uhmm, I don't know, whats wrong, because I allready have the ncurses and zlib developer-libs:
    Code:
    gm@ubuntu:~/openwrt/rtn$ sudo apt-get install libncurses-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'libncurses5-dev' instead of 'libncurses-dev'
    libncurses5-dev is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    and

    Code:
    gm@ubuntu:~/openwrt/rtn$ sudo apt-get install libz-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'zlib1g-dev' instead of 'libz-dev'
    zlib1g-dev is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
    anyone an Idea?
    RT-N66U TomatoUSB 1.28.0000 MIPSR2-135 K26AC USB AIO-64K running Entware-NG
    pyload 0.4.9
    minidlna 1.1.2
    samba 3.6.5
    openvpn 2.3.10
    ̶W̶L̶5̶0̶0̶g̶P̶ ̶1̶.̶9̶.̶2̶.̶7̶-̶r̶t̶n̶-̶r̶4̶7̶5̶0 retired

  2. #2
    Quote Originally Posted by !gm View Post
    anyone an Idea?
    Ubuntu, yes? The same bug on my Ubuntu 11.10 x64.

    Find ./toolchain-1.9.2.7-rtn-r3988/src/include/prereq-build.mk file and fix these lines:
    Code:
    ...
    define Require/ncurses
            echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
                    echo -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses -
    endef
    
    $(eval $(call Require,ncurses, \
            Please install ncurses. (Missing libncurses.so or ncurses.h) \
    ))
    
    
    define Require/zlib
            echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \
                    echo -include zlib.h -x c -o $(TMP_DIR)/a.out -lz -
    endef
    Yes, i know its dirty hack, but works. I have no time to fix toolchain buildroot script.

    BTW, toolchain buildroot is taken from OpenWRT too^)

  3. #3
    Join Date
    Nov 2006
    Location
    Russia, Moscow
    Posts
    3,640
    Quote Originally Posted by ryzhov_al View Post
    Ubuntu, yes? The same bug on my Ubuntu 11.10 x64.
    ...

    Yes, i know its dirty hack, but works. I have no time to fix toolchain buildroot script.
    To fix it we must know exact error message, can you post it?

    Just execute following command in default shell (bash??):
    Code:
    echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
    gcc -include ncurses.h -x c -o /tmp/a.out -lncurses -

  4. #4
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    the error
    Code:
    /tmp/ccbNsdgJ.o: In function `main':
    :(.text+0x10): undefined reference to `initscr'
    collect2: ld returned 1 exit status
    I ended up with "echo 1", since I knew I had everything correctly installed on my mint box

  5. #5
    Join Date
    Nov 2006
    Location
    Russia, Moscow
    Posts
    3,640
    Quote Originally Posted by wpte View Post
    the error
    Code:
    /tmp/ccbNsdgJ.o: In function `main':
    :(.text+0x10): undefined reference to `initscr'
    collect2: ld returned 1 exit status
    It means that libncurses.so library cannot be found by gcc
    Where is it located? OpenSUSE store it in /usr/lib (/usr/lib64)

    Is library contains initscr():
    Code:
    readelf -s libncurses.so | grep initscr
    ?

  6. #6
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    yeah, that's the weird thing...
    I've had other problems with finding libraries on previous versions of ubuntu's gcc, like libusb.

    The current version I have:
    gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
    libncurses.so is on my 64bit machine just in /lib/

    Code:
    readelf -s /lib/libncurses.so.5 | grep initscr
       399: 000000000000c6d0   179 FUNC    GLOBAL DEFAULT   11 initscr
    the packages I use: http://packages.ubuntu.com/search?ke...ic&section=all
    you can just open the deb files with an archive manager

    In the end, all other programs I've compiled so far, including some other toolchains for my uni projects did find ncurses without any problem

Similar Threads

  1. Подскажите, что этот лог значит? (syslog)
    By VadimVB in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 479
    Last Post: 23-05-2013, 07:47
  2. Strange problem compiling toolchain
    By QMax in forum WL-500gP Q&A
    Replies: 1
    Last Post: 27-09-2009, 16:54
  3. Replies: 1
    Last Post: 09-01-2008, 11:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •