On Tue, Feb 6, 2024, at 10:03 AM, Daniel Premo wrote:
> I'm guessing there's no C compiler, based on skimming
> https://buildroot.org/ and https://www.busybox.net/ . (Spotted
> Buildroot in Mainsail and spotted Busybox in the /usr/bin/ folder --
> many of the programs in /usr/bin/ are symlinks to /bin/busybox .)
>
> I don't want to waste anyone's time; I get it if I'm barking up the
> wrong tree.  Are Buildroot and Busybox known quantities?  Are they
> easily worked around?  They're probably designed to be not easily
> worked around, right?

Busybox is a minimal implementation of the Unix "shell and utilities"
scripting language / interactive command line environment.  It probably
won't, by itself, cause problems for what you're trying to do; however,
it definitely does not include a C compiler.  I am unfamiliar with
Buildroot, but based on the description I saw on its homepage, I agree
that it's also unlikely to provide a C compiler.

Here's a little shell script that can check whether you have a C
compiler that's at least minimally functional:

#! /bin/sh
cat > test.c <<\EOF
#include <stddef.h>
int main(void)
{
    return 0;
}
EOF
found=
for cc in cc gcc c89 c99; do
    if $cc test.c && ./a.out; then
        found=$cc
        break
    fi
done
if [ -n "$found" ]; then
    printf 'Found C compiler: %s\n' "$cc"
    rm test.c a.out
    exit 0
else
    printf 'C compiler not found\n'
    rm test.c
    exit 1
fi

If you don't have a C compiler, you are going to have to get one from
somewhere before proceeding.  It may be easier to set up a "cross
compilation" environment on a desktop computer, targeting this
embedded system.

Your larger project may be anywhere from straightforward to extremely
difficult, and this mailing list is not the right place to get help with
problems that don't directly involve config.guess and/or config.sub.
Unfortunately I do not know where you should look for further help.
I would suggest that you start by digging deeper into buildroot.org;
they may have a discussion forum or something.

Best of luck,
zw

Reply via email to