without the actual error message, I can only guess the errors are saying something like the archtecture of system libraries are not compatible, or cannot find libraries for x86.
to my knowledge, alpine's musl-gcc doesn't enable multlib, and also, you cannot install the musl libc of multiple architectures. so I would say alpine is not ideal to do this kind of cross compiling. you could either:
build the project in a native 32bit alpine distro; or
use a distro that is cross-compiling friendly, like debian; or
ok so on Windows I installed cross and docker and managed to compile it, however when running this on a 32bit linux operating system I get the following errors:
./updatesql_email_err
./updatesql_email_err: /lib/libc.so.6: version `GLIBC_2.29' not found (required by ./updatesql_email_err)
./updatesql_email_err: /lib/libc.so.6: version `GLIBC_2.9' not found (required by ./updatesql_email_err)
./updatesql_email_err: /lib/libc.so.6: version `GLIBC_2.16' not found (required by ./updatesql_email_err)
./updatesql_email_err: /lib/libc.so.6: version `GLIBC_2.15' not found (required by ./updatesql_email_err)
./updatesql_email_err: /lib/libc.so.6: version `GLIBC_2.28' not found (required by ./updatesql_email_err)
./updatesql_email_err: /lib/libc.so.6: version `GLIBC_2.18' not found (required by ./updatesql_email_err)
so some linking issues I have, is there a way to statically link glibc or something?
Statically linking glibc is a bad idea. If anything it makes the program less portable due to certain paths getting hard coded in the final executable that differ between distros. It also breaks certain functionality of glibc due to said functionality requiring dynamic linking support. Musl is easier to statically link.
In your case it seems like you have glibc 2.8 or older. Glibc 2.9 was released in 2008. If your kernel is just as old, rust won't work with it even if you get a working libc. Rust needs 4.1 or older as kernel version which is from 2015. Can you run /lib/libc.so.6 (or if that doesn't work with glibc versions this old, /lib/ld-linux.so.2) to get the version of glibc you have on your system and uname -r to get the kernel version to confirm that you have a too old system? (All commands should be run on the target system, not the system you used to build)
Alpine Linux doesn’t have glibc at all. It is built on musl instead of GNU libc. So using the musl targets instead of the gnu ones is the correct solution.
I meant the distro that I wanted to put the executable on was 32bit GNU/Linux but I had alpine wsl on my windows computer so yeah wanted to figure out how to compile it for that but yeah it works now.