@catoutofbed that's probably not bash claiming it then
multiple things can return the same errno
@catoutofbed run ldd on it
@iliana
what a badly named error then
@iliana
nope, i fixed that and it's a completely different error that's making bash error out
@catoutofbed errno(3) is a global variable that contains the last error, and the exec(3) family of functions returns errors like that
so *anything* in exec's path returning ENOENT causes bash to provide that error message
@catoutofbed you probably already knew that actually. hrm.
@catoutofbed anyway. how does ldd look now?
@iliana
it seems to be finding the libraries and i *should* be able to run x86_64 executables
@catoutofbed given that ldd is probably an x86_64 executable, I would believe you
now run ldd on liblib.so
@catoutofbed why does a.out not list a dependency on ld-linux-x86-64.so.2?
@catoutofbed (also lol on my system ldd is a static binary. seems appropriate)
@iliana it's uh
it's a bash script on here?????
@catoutofbed oh christ it is a shell script
I always assumed...
# This is the `ldd' command, which lists what shared libraries are
# used by given dynamically-linked executables. It works by invoking the
# run-time dynamic linker as a command and setting the environment
# variable LD_TRACE_LOADED_OBJECTS to a non-empty value.
I hate computers
@iliana
they're pretty bad
@catoutofbed @iliana ban computers
@iliana oh, maybe ldd is just a bash script on solaris lol
@iliana
goooooood question
@catoutofbed what happens if you run
$ /usr/lib64/ld-linux-x86-64.so.2 ./a.out
@iliana segfault
which is probably on my end so i think we're running properly
@iliana so now the question of what the hell is ld doing that causes it to not link that
@iliana
so it gets weirder?
i tried invoking rustc with --crate-type=cdylib instead of dylib
now it's linking what appears to be correctly and yet????
@catoutofbed does ./a.out define _start?
@iliana
huh.....
how in the hell
i know what i'm linking with does?
weird thing is the elf header is valid except the entry point is at the top of the pheader for some reason?
@iliana
okay, now i've relinked and it does have _start in the symbol table
it seems that something is going srong in remapping /lib/ld64.so.1 to /usr/lib64/ld-linux-x86-64.so.2?
because ldd suggests that's what it's doing
but the executable doesn't load unless i manually specify that library?
@catoutofbed we have reached the limits of things I feel comfortable guessing about tbqh
good luck
@iliana
thanks for trying
there's plenty of stuff out there for calling into ffi from rust but not the other way around :\
@catoutofbed I guess I'm kind of confused as to what you're doing that would remap the 32-bit dynamic linker into the 64-bit one
that seems chaotic?
@iliana
i don't know what's doing that either tbqh
@iliana @catoutofbed ldd is a bash script
@catoutofbed @iliana apparently, writing is easier than reading, while drinking your very first coffee
hello, good morning, i'm a unix guru
@catoutofbed @iliana eh, there's worse
@catoutofbed it's saying that it can't find a critical component for running (perhaps even, its own runner) and it's saying that in the most unix way possible.
@meena
imo it should at least be a different error than the same error i would get if i was trying to run a file that didn't exist
i get *why* it happens i just think it's bad
@catoutofbed that's not the unix way, tho
why do you think systems like rust and elm must put *so* *much* effort into producing sensible and usable errors?
it goes against the grain of any and every system that they are built upon
incidentally, this is why i get so mad at people who cite "the unix way" against systemd: what exactly is the unix way? and how do you turn it and twist it to be more user friendly? or more computer friendly? instead of neither.
@meena
yes i know it's the unix way
that doesn't protect it from being bad
and that doesn't stop me from having to interact with it and thus wanting it to do reasonable things
@catoutofbed it's 08:08 and i'm already mad at computer (people)
@catoutofbed it's ok
it's only unfortunate, because i cannot catalyse this as energy to work, because i have an appointment
@meena
oooof
good luck in your appointment
@iliana