[ Cross-Compile ] Mipsel-openwrt-linux-gcc : Command Not Found



  • @volkan-ünal if you have the full build system installed you need to install the ugpio library like so:

    scripts/feeds install libugpio



  • Thanks for ur quick reply,

    i tried it before. Here is the output

    ./scripts/feeds install libugpio
    WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
    WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libidn2', which does not exist
    WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libssh2', which does not exist
    WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
    WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
    Ignoring feed 'packages' - index missing
    Ignoring feed 'luci' - index missing
    Ignoring feed 'routing' - index missing
    Ignoring feed 'telephony' - index missing
    Ignoring feed 'onion' - index missing



  • @volkan-ünal

    ./scripts/feeds clean
    ./scripts/feeds update -a
    ./scripts/feeds install -a

    sh scripts/onion-feed-setup.sh



  • i did and after

    scripts/feeds install libugpio

    volkan@ubuntu:~/source$ ./scripts/feeds install libugpio
    Collecting package info: done
    WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'Onion-Console', which does not exist
    WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'transmission-daemon', which does not exist
    WARNING: Makefile 'package/feeds/onion/zeromq/Makefile' has a build dependency on 'libuuid', which does not exist
    volkan@ubuntu:~/source$ cd -
    /home/volkan
    volkan@ubuntu:~$ cd oniongit/
    volkan@ubuntu:~/oniongit$ cd c-cross-compile-example/
    volkan@ubuntu:~/oniongit/c-cross-compile-example$ sh xCompile.sh -buildroot ~/source/ -lib ugpio
    Compiling C program
    /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin//mipsel-openwrt-linux-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/include -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/include gpioRead.c -o gpioRead -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/lib -lugpio
    gpioRead.c:7:10: fatal error: ugpio/ugpio.h: No such file or directory
    #include <ugpio/ugpio.h>
    ^~~~~~~~~~~~~~~
    compilation terminated.
    makefile:9: recipe for target 'gpioRead' failed
    make: *** [gpioRead] Error 1

    i think, .sh file is wrong
    volkan@ubuntu:~/source$ ./scripts/feeds install libugpio
    Collecting package info: done
    WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'Onion-Console', which does not exist
    WARNING: Makefile 'package/feeds/onion/transmission-console-app/Makefile' has a dependency on 'transmission-daemon', which does not exist
    WARNING: Makefile 'package/feeds/onion/zeromq/Makefile' has a build dependency on 'libuuid', which does not exist
    volkan@ubuntu:~/source$ cd -
    /home/volkan
    volkan@ubuntu:~$ cd oniongit/
    volkan@ubuntu:~/oniongit$ cd c-cross-compile-example/
    volkan@ubuntu:~/oniongit/c-cross-compile-example$ sh xCompile.sh -buildroot ~/source/ -lib ugpio
    Compiling C program
    /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-7.3.0_musl/bin//mipsel-openwrt-linux-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/include -I /home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/include -I /home/volkan/source//staging_dir/target-mipsel_24kc_musl/include gpioRead.c -o gpioRead -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/usr/lib -L/home/volkan/source//staging_dir/toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/usr/lib -L/home/volkan/source//staging_dir/target-mipsel_24kc_musl/lib -lugpio
    gpioRead.c:7:10: fatal error: ugpio/ugpio.h: No such file or directory
    #include <ugpio/ugpio.h>
    ^~~~~~~~~~~~~~~
    compilation terminated.
    makefile:9: recipe for target 'gpioRead' failed
    make: *** [gpioRead] Error 1

    I really don't understand why the company doesn't update its documentation.



  • @volkan-ünal

    It looks like your xCompile is not quite correct, check you have this:

    define the toolchain and target names

    #TOOLCHAIN_NAME="toolchain-mipsel_24kc_gcc-5.4.0_musl-1.1.16"
    TOOLCHAIN_NAME="toolchain-mipsel_24kc_gcc-7.3.0_musl"
    #TARGET_NAME="target-mipsel_24kc_musl-1.1.16"
    TARGET_NAME="target-mipsel_24kc_musl"



  • This post is deleted!


  • @volkan-ünal your xCompile has been modified here:

    define the compilers and such

    TOOLCHAIN_CC="$TOOLCHAIN_BIN/mipsel-openwrt-linux-gcc"

    yours has:

    TOOLCHAIN_CC="$BUILDROOT_PATH/mipsel-openwrt-linux-gcc"



  • @crispyoz Firstly, thanks for your support. I'm looking for the relevant library on my computer, but it doesn't exist.





  • @volkan-ünal, If you post same error, you are newbie in cross-compilation. It's thorny way but you choose right direction for it. You can take my template to start create your own applications, then translate and publish my README.md file from Russian into English for a someone else, because my English is poor. Follow to the link about.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.