Search
Thursday, 25th of May 2023, 16:04:12 UTC
16:09:18
karlosz
ok, rebased runtime seems to work
16:09:28
karlosz
by work i mean it crashes in the same way as before
16:09:40
karlosz
now i've just copied over the .s and .o files from the shrinkwrapped stuff
16:09:46
karlosz
need to figure out how to make the recipe work now
16:12:36
karlosz
i need to make stuff work on immobile space now
16:50:17
karlosz
Shinmera: im at the step of linking he shrinkwrap stuff with the nx runtime now\
16:50:25
karlosz
it's complaining that it can't find malloc and free
16:50:35
karlosz
do you know the right linker symbols to get it to include that?
16:51:00
Colleen
<shinmera> uuuuh, nope.
16:51:27
Colleen
<shinmera> that's odd, though? Doesn't the runtime need those, anyway?
16:52:36
Colleen
<shinmera> Like, aren't the linkflags I used in the scripts enough?
16:55:41
karlosz
the shrinkwrapo recipe is separate and didn't include the link flags
16:55:45
karlosz
now malloc and free are defined
16:56:04
karlosz
now i get more reasonable errors
16:56:09
karlosz
like dl_addr is not defined
16:56:20
karlosz
these are symbols referenced by the arm64 core that don't exist on the nx runtime
16:56:28
karlosz
i suppose the best way to deal with this is just stubbing it all out
16:57:02
Colleen
<shinmera> hmmm, I thought for sure I already stubbed out all the dl stuff.
16:57:30
karlosz
well in this case it's symbols that are referenced on arm64
16:57:44
karlosz
so there were symbols you didn't need to stub out
16:57:53
karlosz
beacuse they were only referenced from linux
16:58:21
karlosz
do yopu happen to know what the equivalent of dladdr and dlsym are?
17:03:19
Colleen
<shinmera> See Features>Basic Features>ro Library
17:04:00
Colleen
<shinmera> we'll need to statically link in a C wrapper around that, so for now, I'd say: they don't exist
17:11:52
karlosz
i think the set of link flags we have isn't complete somehow
17:11:58
karlosz
when linking it complains that it can;t find the symbol pipe
17:12:11
Colleen
<shinmera> there's no pipes.
17:12:14
karlosz
but then when i try to stub it i get a conflict with the unistd.h file
17:12:36
karlosz
apparently pipe is defined in unistd.h
17:12:49
Colleen
<shinmera> It defines a buncha constants that aren't usable, yes. It's weird.
17:13:06
karlosz
hm, how do you define the function then?
17:13:09
Colleen
<shinmera> Anyway, the link flags are complete. After all, the runtime links and starts up.
17:13:16
karlosz
the compioler complains about the conflci
17:13:45
Colleen
<shinmera> You'll have to rip out things that refer to pipes and whatnot.
17:14:13
karlosz
when i try to stub out pipe the SDK complains that unistd.h defines pipe already
17:14:23
Colleen
<shinmera> Yes. You can't do it that way.
17:14:32
Colleen
<shinmera> You have to remove whatever is trying to use the pipe symbol.
17:15:12
karlosz
hm, these are references from the linux core
17:15:29
karlosz
so i guess i'd have to modify the .s file by hand
17:15:33
Colleen
<shinmera> This is what I was always afraid of happening with this patch from the start.
17:15:57
Colleen
<shinmera> You can either do that
17:16:08
Colleen
<shinmera> Or also build a custom arm64 that rips those things out of the linux runtime, too
17:16:17
karlosz
somehow this doesn't make sense to me
17:16:32
karlosz
if the sdk runtime doesn't have the symbol pipe
17:16:41
karlosz
surely i can define it myself in the runtime
17:16:54
karlosz
the compielr complains, but at link time the symbol no longer exists
17:18:13
karlosz
ok yeah so i was able to stub out dladddr fine
17:19:24
karlosz
ah, i managed to stub out pipe as well
17:19:34
karlosz
i just neeeded to make the type signature agree exactrly
17:20:01
Colleen
<shinmera> I see in my patches I had to specifically comment out the unix-pipe function
17:20:06
karlosz
so i suppose the sdk just has these in the headers but never actually defines this stuff
17:20:19
Colleen
<shinmera> that's what I meant above, sorry for being unclear.
17:20:36
karlosz
shinmera: yeah we're building a different way now
17:20:49
karlosz
we don't have to get through make-host-2.lisp with +nx at all
17:20:54
karlosz
all we need is the runtime
17:20:57
karlosz
the core comes from linux
17:21:14
karlosz
so unix-pipe being commented out is irrelevant unless you do it for the linux build
17:22:37
Colleen
<shinmera> I meant it as an "fyi"
17:22:48
Colleen
<shinmera> and as a "it seems I've encountered pipe being weird before, too"
18:07:01
karlosz
ok, everything stubbed out
18:07:17
karlosz
now its complaininhg about not being able to relocate something in arm64-assem.S
18:07:26
karlosz
going to enable gcc-tls and see what happens
18:08:13
karlosz
actually, could you explain what is going on with the nsp stuff?
18:08:24
Colleen
<shinmera> What do you mean?
18:08:28
karlosz
so when the runtime gets built as src/runtime/sbcl, that's not something the switch can execute yet, right?
18:08:38
karlosz
you need to turn that into an nsp?
18:09:08
karlosz
so src/runtime/sbcl is the elf. what does the nsp do?
18:09:40
Colleen
<shinmera> The NSP includes the "filesystem" with the data the program needs, the switch runtime and other shared libraries, the actual executable, an application manifest for the metadata and permissions, and a graphic for the app menu.
18:10:07
Colleen
<shinmera> it's probably also signed in some way.
18:10:10
karlosz
so its a sandbox with everything in the place it expects
18:11:01
Colleen
<shinmera> the bundling is what the nxdeploy makefile is responsible for.
18:12:19
karlosz
argh the assembler syntax is different
18:13:05
karlosz
seems like a mingw thing?
18:13:20
Colleen
<shinmera> mingw shouldn't be involved at all
18:13:58
karlosz
i mean the clang assembler for nx ius different
18:14:12
karlosz
it barfs on .type directives
18:14:17
karlosz
how quickly can i comment these out...
18:20:36
karlosz
i don't know how to use sed, so i asked chatgpt to give me some commands to comment out.type and .size directives
18:23:13
karlosz
wooo, shrinkwrap binary made
18:23:17
karlosz
now to try t run it....
18:24:36
karlosz
MakeNso INPUT='../sbcl/src/runtime/sbcl', OUTPUT='code/main' The alignment for section lisp.core exceeds 4 KB. (0xlisp.core)
18:24:50
karlosz
when running make sbcl to get the nsp
18:25:19
karlosz
might be a page size issue...
18:25:52
Colleen
<shinmera> good work today!
Friday, 26th of May 2023, 4:04:12 UTC