Not enough space for yun-gcc

Forgive me if there is some page or thread obscured from my Google-fu that covers this topic, but I'm having trouble getting yun-gcc onto my freshly-upgraded Yun 1.5. (btw, thanks for making this happen, I wasted countless hours on the build system with very little to show for it)

Here's what happens when I foolishly think that having the package available is as easy as installing it:

root@ArduinoHID:~# opkg install yun-gcc
Installing yun-gcc (4.6.2-1) to root...
Collected errors:
 * verify_pkg_installable: Only have 6736kb available on filesystem /overlay, pkg yun-gcc needs 47086
 * opkg_install_cmd: Cannot install package yun-gcc.

Things I can think of but have not seen any explanation of anywhere:

  • Free up space by removing unneeded packages (which would include...?)
  • Install gcc somewhere else, like the sd card (but how....?)

Any advice appreciated. This whole exercise of getting native C code on the Yun has been many months of an asymptotic curve. I'm always so damned close, but stymied by one missing piece of information.

I certainly can't be the only one to run into this. All I did was wipe/upgrade to 1.5, and tried the install. There's no step-by-step instructions I was able to find (not even what the package name is, I had to dig even for that). So if it's not as easy as installing it, a FAQ describing that fact would be very much appreciated by those late in the game who have not had the time to follow the progress of yun-gcc in detail.

Thanks again!

Please follow this tutorial http://arduino.cc/en/Tutorial/ExpandingYunDiskSpace

It will make the yun believing your SD card is its new flash storage, going from about 7 free megs to the gigas of your SD card

Then reinstall yun-gcc

Thanks for the lightning response! Yup, stumbled on that shortly after posting my request. I had a high-speed 16G micro-SD card that I bought in an emergency just for the SD adapter, and now I have a use for it. :slight_smile: So I now have a 16G card with 1G reserved for data, the rest for the Yun.

It still would be nice to have a FAQ on going-from-zero-to-yun-gcc that covers these kinds of details that are obscure for those of us who want to use the Yun but are overwhelmed with other embedded projects.

And while I was typing this, I hit the next brick wall:

root@ArduinoHID:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Signature check passed.
root@ArduinoHID:~# opkg install yun-gcc
Installing yun-gcc (4.6.2-1) to root...
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/yun-gcc_4.6.2-1_ar71xx.ipk.
Collected errors:
 * opkg_install_pkg: Package yun-gcc md5sum mismatch. Either the opkg or the package index are corrupt. Try 'opkg update'.
 * opkg_install_cmd: Cannot install package yun-gcc.
root@ArduinoHID:~#

Thoughts?

Ok, think I answered my own question again. Stumbled into this posting:

opkg defaults to /tmp, which fills up, and emits a nice helpful error message about a bad checksum. (can’t complain too loudly there, I was just last week guilty of having one of my module emit a misleading error…)

Another brick wall:

root@ArduinoHID:~/hidflash# make mphidflash32
gcc -O3  -DVERSION_MAIN=1 -DVERSION_SUB=6 -c main.c
main.c:38:20: fatal error: string.h: No such file or directory
compilation terminated.
make: *** [main.o] Error 1

The beginning of main .c in question is pretty vanilla:

#include <stdio.h>
#include <string.h>
#include "mphidflash.h"

After poking around the system to find what was where, I tried:

 CPATH=/usr/lib/gcc/mips-openwrt-linux-uclibc/4.6.2/include
:/usr/lib/gcc/mips-openwrt-linux-uclibc/4.6.2/include/ssp; export CPATH

But that just changed the nature of the error:

root@ArduinoHID:~/hidflash# make mphidflash32
gcc -O3  -DVERSION_MAIN=1 -DVERSION_SUB=6 -c main.c
In file included from main.c:38:0:
/usr/lib/gcc/mips-openwrt-linux-uclibc/4.6.2/include/ssp/string.h:39:25: fatal error: string.h: No such file or directory
compilation terminated.
make: *** [main.o] Error 1

Thoughts? Pointers?

yun-gcc is just the toolchain (compiler, linker…)
As of now, you must provide the header files you need.
Help in improving this is more than welcome

rfd_arduino:
It still would be nice to have a FAQ on going-from-zero-to-yun-gcc that covers these kinds of details that are obscure for those of us who want to use the Yun but are overwhelmed with other embedded projects.

Do you mind writing this very FAQ? We have provided a playground page just for this kind of needs: see http://playground.arduino.cc/Hardware/Yun

I'd be a pretty lousy candidate for that since I've done so many things that I'm not sure what was germane to getting this far and what wasn't. And I don't have time at this point to retrace my steps (I've already put far too much time into it).

Besides, I still don't have it working. I understand that headers and libraries are tied together, but string.h not working? Seriously? This is basic libc stuff. stdio.h is there (I can get hello-world to compile and run, but that's just a printf), but nothing else?

I know much of this is volunteer work, and I appreciate the work that goes into it. If I didn't have a day job juggling multiple clients I'd be happy to contribute (for now, this thread will have to suffice).

The closest thing to a FAQ is this post:
http://forum.arduino.cc/index.php?topic=241368.msg1765537#msg1765537 but it refers to a version before it got included in the main repository. I saw next to no activity at that time so this effort got put on the back burner.

Since I have now seen more interest than I expected I will try to put a FAQ together but it may take a while to find the time.

I understand that headers and libraries are tied together, but string.h not working? Seriously? This is basic libc stuff. stdio.h is there (I can get hello-world to compile and run, but that's just a printf), but nothing else?

Actually it isn't an issue of working, it is TOTALLY not there. After compilation there are different versions of the same header scattered all over the place in the build tree, finding the right one isn't always easy. As noted at the bottom of one of my previous posts,

I got to the point I could compile hello.c and haven't tested much outside of that. If problems are found please post them so I can try to help and fix them in the next release. I do know there are a lot of headers missing, this is easy to fix as they are found so PLEASE report them!

The best place to do this is Yun-gcc package is missing many headers · Issue #18 · arduino/openwrt-packages-yun · GitHub, I already added string.h

Thanks for helping find issues with this, there are many warts on this package, knowing which ones are giving people problems gives focus.

Actually it isn't an issue of working, it is TOTALLY not there. After compilation there are different versions of the same header scattered all over the place in the build tree, finding the right one isn't always easy. As noted at the bottom of one of my previous posts,

Yeah, no kidding. :slight_smile: A "find . -name string.h -print" in the toolchain directory was pretty scary. It was sheer luck that I found a directory that was a pretty decent approximation of /usr/include as quickly as I did.

As I refer to in my other thread, the structure of the OpenWrt build system is not exactly impedance-matched to this task either. At least from what I was able to grok from it.

Which obviously wasn't much since I couldn't even get it to do a helloworld package. And I followed the googled examples to the letter. It always ended up with make dying on "no target" before it would even copy the source over to $(BUILD_DIR). :0