We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Can't install gcc on Omega2Pro ... package libstdcpp6 not found



  • @Robert-Meagher Glad that fixed your issue. Normally I would look at each repo and see where the gcc compiler is repo'd because uncommenting everything can cause other issues/conflict.

    I can't help but ask why you want compile on the Omega, cross compiling is a bit harder to set up but once you have it working it's so much easier. You can then use GDB to debug if you need to (threw that in to keep @mawg and @JP-Norair happy)



  • Is it possible to install gcc, gmake, etc to produce a build system and I wouldn't need to build using the toolchain on another system?



  • @Jonathan-Rizzo, if you need create your own .IPK files (packages) it is able only in SDK/toolchain only. For example, I'm using official OpenWRT SDK Toolchain, that downloaded from Official OpenWRT website.

    If you want compile kernel modules, you need exactly the same version as the Onion firmware. OpewnWRT's kmods are not working on; the microcomouter will take a freeze after instmod command, reset button doesn't work too.



  • @Robert-Meagher, I had the same problem. The problem is in different version of OpenWRT repository, that now version 19 and older version Onion OS that based of version 18.

    Your opkg manager is downloading packages from OpenWRT 19, that using GCC 7 or higher.

    I fixed it by installing GCC with flags: force and without dependence, than all the dependence was installed manual. The list of depends you can found in the OpenWRT repository.

    Now I'm using GCC 7 on the Onion OS (based OpenWRT 18), with no problems includes GDB debugger.



  • @Modest-Polykarpovich said in Can't install gcc on Omega2Pro ... package libstdcpp6 not found:

    @Robert-Meagher, I had the same problem. The problem is in different version of OpenWRT repository, that now version 19 and older version Onion OS that based of version 18. MyPrepaidBalance

    Your opkg manager is downloading packages from OpenWRT 19, that using GCC 7 or higher.

    I fixed it by installing GCC with flags: force and without dependence, than all the dependence was installed manual. The list of depends you can found in the OpenWRT repository.

    Now I'm using GCC 7 on the Onion OS (based OpenWRT 18), with no problems includes GDB debugger.

    There seems to be a conflict between the standard Omega opkg sources and the lede-based sources that the Onion guys said to add to distfeeds.conf. lede sources want to install a later version of gcc and gdb, and dependencies get out of whack.



  • @Madeleine-Feliciano said in Can't install gcc on Omega2Pro ... package libstdcpp6 not found:

    @Modest-Polykarpovich said in Can't install gcc on Omega2Pro ... package libstdcpp6 not found:

    @Robert-Meagher, I had the same problem. The problem is in different version of OpenWRT repository, that now version 19 and older version Onion OS that based of version 18. MyPrepaidBalance

    Your opkg manager is downloading packages from OpenWRT 19, that using GCC 7 or higher.

    I fixed it by installing GCC with flags: force and without dependence, than all the dependence was installed manual. The list of depends you can found in the OpenWRT repository.

    Now I'm using GCC 7 on the Onion OS (based OpenWRT 18), with no problems includes GDB debugger.

    There seems to be a conflict between the standard Omega opkg sources and the lede-based sources that the Onion guys said to add to distfeeds.conf. lede sources want to install a later version of gcc and gdb, and dependencies get out of whack.

    I don't recommend to use "live-compile", because you will have next problems:

    • Difficult use third-party libraries, because IPK (OPKG's) packages installs without lib_____-dev sub-package. In that case you need to manual copy it from cross-compilation toolchain.

    • Target-machine (Onion) also hasn't got some of system-only headers (.h-files). May be it never needs for you, but if another one case it will be problem.

    • Compilation takes a long time even simple projects.

    In any case you have to install cross-compile toolchain, but I recommend install GDB on target (Onion) machine, because remote debugging doesn't works. Version of gdbserver and gdb (linux's or windows' hosts are don't work)

    P.S.
    Now I'm writing big manual with a C-templates to fast install and deploy SDK and make native applications.



  • I'm also having this issue, I tried uncommenting (some and all) of the lines from distfeeds.conf but now I get an error when running opkg update :

    opkg_download: Failed to download http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/onion/Packages.gz, wget returned 8.
    

    I checked http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc (parent of the offending feed, and noticed there is no onion directory (I looked at mirrors and the folder isn't there either). So I proceeded to comment out that particular feed and tried to install gcc, resulting in:

    Collected errors:
     * satisfy_dependencies_for: Cannot satisfy the following dependencies for gcc:
     *      libstdcpp6 *
    

    I also tried with the lede repositories (feeds) suggested by the documentation (https://docs.onion.io/omega2-docs/c-compiler-on-omega.html, which seem to point back to openwrt snapshots), but that had the same result.

    I'm running out of ideas, is there another way to get the dependency, I looked around and I found it here: https://downloads.openwrt.org/snapshots/targets/ar71xx/generic/packages/Packages, but it seems to be for the wrong architecture (and mips is not listed under targets a few dirs up).

    Any suggestions?



  • @Jesuso said in Can't install gcc on Omega2Pro ... package libstdcpp6 not found:

    distfeeds

    I've been struggling with this. Is the platform still being maintained?



  • @Jesuso @WickedCreations I can't help but wonder why you would be trying to compile on the Omega, why do you not use the cross compiler?

    IoT devices are very low on resources and you will spend so much time and frustration waiting for things to compile and some code may not compile due to the required resources. Instead if you cross compile you can use your favorite IDE and simply scp/ftp the binary to your device.



  • @crispyoz because what I have to do is very simple. Make a program that respond to UBUS messages.

    Seems easy enough to do it on the device, and I can always use my favorite editor via sshfs, or WinSCP.

    But since the documentation seems very outdated, (broken links etc) I was wondering if this is still alive.

    Also mainly on Windows here,



  • @WickedCreations

    Getting gcc and gdb (and g++ and golang, etc.) is still supported.

    The howto's have broken links, but the gist of the process is sound. The gcc and gdb packages are still available through opkg package management.

    I develop on Omega2+ hardware which requires a supplemental storage device due to the size of the development packages (e.g., I require a microSD because of the limited on-device storage). I do not know if this is true for the Omega2Pro (which is the heading under which your post has been entered -- you're shotgunning posts all over the place, so perhaps next time you might consider crafting your own new thread).

    The general process is:

    • Update your firmware to the most recent found at the official repository. Depending on where/when you acquired your device, the kernel and package configuration might be outdated. Updating your firmware is usually the best approach to assure the kernel, firmware, and available packages are all in sync.
    • Get your system to boot to external storage. The howto for this is still up to date and valid (although there's been an unnecessary step in the documented process for quite some time, it's benign). My recommendation is to do this after updating your firmware, as I've had situations where new firmware doesn't recognize the UUIDs for the partitions created under the previous firmware, making /overlay no longer mount correctly at boot.
    • Edit /etc/opkg/distfeeds.conf and enable the repo where gcc can be pulled from. You will likely also want to enable the repo where libgcc and libstdcpp are found.
    • Issue opkg update ; opkg install gcc gdb
    • If it reports missing packages, find the repo that provides the missing package and enable it; update and repeat.
      ** Which repo has the files that you need? Visit the links and check
      ** Should you enable all repos? No. As @Jesuso discovered.

    In the long term, I would highly recommend learning how to create your own firmware and packages so that you don't need to depend on valid links. The docker build image works extremely well for crafting your own customized Omega2 experience and the documentation provided at the github repo is (currently) the most up-to-date documentation for doing so.



  • @crispyoz In my case I'm trying to npm i serialport (nodejs, https://serialport.io/) to simply read the serial bus (ttyS1) and run some rather simple logic based on the data, the problem is that serialport compiles some dependencies using g++, which fail due to the g++ bin not being present on my omega.

    I don't think I can do npm install on my workstation and simply upload the resulting node_modules directory to the omega since generated binaries will be targeted for my system's architecture and not for the omega's (mips?) .

    Is there a way to do that? Or anything else that you recommend to work with nodejs libraries that depend on g++ compilation in the omega.



  • @crispyoz @Lnx-Prof Sorry for "shotgunning" this thread, it simply had the exact same message in its title than the error I was receiving, I though creating a new post with a nearly identical title would be even worst than resurrecting a 5 month old thread.

    Anyway, I came with the simple workaround of using Python instead of node, it required some extra effort but in the end it worked just fine. I didn't knew about cross compiling and a quick search led me to finding what it is, how to do it for node packages, and even found an already cross-compiled repo of the package I was having issues with.

    I'll leave those here in case someone else finds this thread having the same issues I had.
    This repo contains binaries targeted for the omega2 for the serialport library in case you're trying to interface with an arduino via serial: https://github.com/sdesalas/node-serialport-omega2

    And here's a post about how to cross-compile for an npm module on Omega2:
    https://github.com/sdesalas/node-serialport-omega2/wiki/How-to-Cross-Compile-an-NPM-module-on-Omega2

    Sorry again about necro-ing this topic and thanks for the help!

    EDIT**: The previous link on how to cross-compile didn't worked for me, but there are instructions in the official onion website:
    https://docs.onion.io/omega2-docs/cross-compiling.html


Log in to reply
 

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