Menu

Build with PROFILE=96348GWV_DT fails

Help
dgktkr
2011-03-10
2013-05-29
  • dgktkr

    dgktkr - 2011-03-10

    Hi,

    I downloaded the source trunk and installed the toolchain supplied by BitSwitcher. After cd'ing into the directory dev_tree, I entered 'make PROFILE=96348GWV_DT'. The build process got quite a way, but then it kicked out with an error.

    make[4]: Entering directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra/iperf-2.0.2/src'
    g++  -O2    -o iperf -O2  -pthread  -DHAVE_CONFIG_H Client.o Extractor.o Launch.o List.o Listener.o Locale.o PerfSocket.o ReportCSV.o ReportDefault.o Reporter.o Server.o Settings.o SocketAddr.o gnu_getopt.o gnu_getopt_long.o main.o service.o sockets.o stdio.o tcp_window_size.o ../compat/libcompat.a 
    make[4]: Leaving directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra/iperf-2.0.2/src'
    make[4]: Entering directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra/iperf-2.0.2'
    make[4]: Leaving directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra/iperf-2.0.2'
    make[3]: Leaving directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra/iperf-2.0.2'
    make[2]: Leaving directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra/iperf-2.0.2'
    cp iperf-2.0.2/src/iperf /home/glenn/Desktop/BS/trunk/dev_tree/targets/fs.src/usr/bin
    /opt/toolchains/uclibc-crosstools/bin/mips-linux-uclibc-strip /home/glenn/Desktop/BS/trunk/dev_tree/targets/fs.src/usr/bin/iperf
    /opt/toolchains/uclibc-crosstools/bin/mips-linux-uclibc-strip: Unable to recognise the format of the input file /home/glenn/Desktop/BS/trunk/dev_tree/targets/fs.src/usr/bin/iperf
    make[1]: *** [iperf] Error 1
    make[1]: Leaving directory `/home/glenn/Desktop/BS/trunk/dev_tree/bs_extra'
    make: *** [bs_extra] Error 2
    

    Any hints as to what might be going wrong?

    Earlier, it didn't even get that far, because it was looking for stuff in Patrick's iperf directory (not mine!). That seemed to be solved by going into my bs_extra/iperf-2.0.2 directory and executing ./configure.

     
  • dgktkr

    dgktkr - 2011-03-10

    Google is your friend!

    I did a search on "mips-linux-uclibc-strip" + "Unable to recognise the format" and the hit http://www.ip-phone-forum.de/showthread.php?t=167980&page=1 sheds light on the matter.

    Executing "file iperf" revealed that iperf is in ELF format for Intel 80386, when something for MIPS is expected.

    Looking at the Makefile in bs_extra/iperf-2.0.2, I see that it used the host's compiler and not the crosscompiler from the toolchain. So now I need to consult the GNU make manual to figure out the best way to fix the problem.

    dgktkr

    PS I hope it's OK to post here the actions that lead me to a solution to building  good bitswitcher firmware. If someone else like me comes along who is new to Linux and GNU make, it might be of use to them.

     
  • dgktkr

    dgktkr - 2011-03-11

    To get make to compile code for the mips cpu, two environment variables can be defined and exported:

    $ CC=/opt/toolchains/uclibc-crosstools/bin/mips-linux-gcc;export CC
    $ CXX=/opt/toolchains/uclibc-crosstools/bin/mips-linux-g++;export CXX
    

    More errors occurred after that fix. I'm using Ubuntu 10.10 and got a bunch of lines complaining that rpl_malloc is undefined.
    http://groups.google.com/group/ikarus-users/browse_thread/thread/fd1d101eac32633f gives a solution: execute

    $ export ac_cv_func_malloc_0_nonnull=yes
    

    while in the bs_extra/iperf-2.0.2 directory, then

    ./configure --host mips-linux-uclibc
    

    Now, back in the trunk/dev_tree directory

    $ sudo make PROFILE=96348GWV_DT
    

    which finally resulted in a successful build. The sudo was necessary, because make wants a password for a

    su --command"..."
    

    and I  don't know what the superuser password is. The password for my account didn't work.

    dgktkr

     

Log in to post a comment.

MongoDB Logo MongoDB