-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rsxInit() change brings issue with SDL libraries #106
Comments
Ugh. That commit mixes a lot of unrelated changes which should have been separate commits... @shagkur Changing the prototype of the API function |
Too bad it isn't cpp, overloading would be perfect. |
Keep calm. No worries i‘ll fix all corresponding libraries.
miigotu <notifications@github.com> schrieb am Fr. 10. Juli 2020 um 22:39:
… Too bad it isn't cpp, overloading would be perfect.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#106 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADQD7WWCVSIFJPNEU3WVELR2536HANCNFSM4OWWSKGQ>
.
|
Perhaps you can run a build of all ps3libraries against this commit and
give me list of the failing ones?
Mike Wiedenbauer <mike.wiedenbauer@unblu.com> schrieb am Fr. 10. Juli 2020
um 23:04:
… Keep calm. No worries i‘ll fix all corresponding libraries.
miigotu ***@***.***> schrieb am Fr. 10. Juli 2020 um 22:39:
> Too bad it isn't cpp, overloading would be perfect.
>
> —
> You are receiving this because you were mentioned.
>
>
> Reply to this email directly, view it on GitHub
> <#106 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AADQD7WWCVSIFJPNEU3WVELR2536HANCNFSM4OWWSKGQ>
> .
>
|
Well, if you call the function with the new prototype
and then you don't have to change any libraries (or applications) at all... |
I get your point. As well as i know how it could be solved. But this one is a bit more complicated since i also changed defines by their names. The question here is: What do we maintain? The ps3dev, hence ps3toolchain, psl1ght and the ps3librariies? If so, those are our only responsibilities. And then we still should fix the libraries. |
thanks @shagkur 👍 |
@shagkur Could you please fix SDL2_PSL1GHT as well? I'd like to merge the |
@zeldin whats now broken? i already made a PR for rsxInit change and it already got merged!? |
SDL2_PSL1GHT is. Note the "2". (Only the |
Ahh got it. Where is the branch? git url? |
cant fork it (seems to be the same as yours, somehow). github says i've already forked it (the ones from you, for which i already fixed it). Perhaps you can apply this one-liner yourself? the diff from my PR should be still around. |
It looks like he forked the SDL_PSL1GHT repo and then updated it to be SDL2. Just add https://github.com/sergiou87/SDL2_PSL1GHT/ as a remote and you should be able to pull the master branch from there. After you fix the issue, push the fix to a branch in your own fork and then create a PR against sergiou87/SDL2_PSL1GHT. |
Does not work. If i pull/merge the upstream into mine i get a ton of merge conflicts. Not sure how i should solve this. |
Dont pull/merge. Create a new branch based on sergio87/master.
|
Then, when you have committed the fix to |
Done (i guess) |
@shagkur Thanks! |
@zeldin |
Cool. I guess nobody needed to call a function with that many arguments before. 😄 |
probably not. I wanted to use "gcmSetZcull" which takes 12 arguments and always got an assertion with one argument past gpr10. After analyzing the stub asm method (and my little understanding of PPC asm) i figured that we dont pass those args and the SPRX lib just gets undefined data. |
@zeldin Your change of the RS600_ABI_NAME to linux seems to have a huge impact on resulting binaries. In my case (it's a quite big c++ project) the resulting binary crashes immediately. reverting to the commit before (along with changing back sbrk.c in psl1ght) results in working binaries. Although the rsxtest samples did work with your commit too. Anyways. I strongly believe we need to stick to "aixdesc", as PS3 is AIX ABI compliant and therefor have to figure why the .text duplicate error happens. Perhaps we need to adapt/adjust cell64lv2.h a bit. small side note: i got the "more than 8 function args to PRX calls" fixed :) |
@shagkur You will need to recompile all files in order to avoid problems. I don't think the PS3 is "AIX ABI compiliant" any more than it is "Linux ABI compliant", both AIX and (big endian) Linux use ELF ABIv1. The difference here is just that all the non-function-descriptor symbols (starting with |
And I know exactly why the |
Thanks! |
@zeldin Here we go.... clone/fork this one: https://github.com/shagkur/irrlichtPS3.git and build example/2 (as well as the whole library) |
@shakgur Thanks. I get this while compiling though:
"Cg toolkit" appears to be unmaintained, unsupported, and closed source X86 code. Is there an opensource alternative, or could you perhaps provide the relevant build products somewhere? |
@zeldin What Os do you use? I'm on ubuntu and i just did sudo apt-get install -y nvidia-cg-toolkit. |
@shagkur Gentoo/ppc64. |
@zeldin okay. Sure it's not needed to get psl1ght built, but to know whether the stuff works or not it does matter ;) |
Well, if you give me the build products generated with Cg toolkit, I can build the rest. We are looking for an issue with gcc, not Cg toolkit, so I don't expect I shall need to rebuild those parts. |
That's true. I'll get you the fragments needed to build the library. |
Put the files into the build folder of the library. |
Thanks. Now I can build examples/2. Will investigate. |
Thank your very much! |
Hm, interresting. With the new gcc the |
The difference appears to be that in one case globals are found by loading their address from the .got ( |
Well to me it seems by changing the abi name and in gcc configure addin -melf64ppc results in different build results. Keep in mind that the original PS3 SDK still is on gcc 4.1.1 and probably the underlaying FW OS is kinda relies on some sort of ABI compliancy. |
We've always been incompatible with the FW OS ABI (which uses 32 bit pointers, for examples). That why we need wrappers. |
The TOC thing seems to be because large TOC support is now default (you've always had the options to turn it on), but I don't see why it should break anything. As I said, I'll try turning it off and see if anything else differs. |
Yeah sure go on. I guess, nowadays, you know more and better about gcc toolchain build tweaking. I did that things at that time myself. But this is ages ago hence i'm quite happy you take a look at it. |
Btw. i need your opinion on an other topic..... |
Well this is some strange awkwardness within FW OS ABI anyways. Having a 64bit system and then fiddling around with 32bit pointers. |
The 32-bit pointers do kind of make sense considering the PS3 has <1GB of RAM... |
well atm they don't really share much. Wouldn't make sense to create a utility macro therefore. I guess, for now i keep it with 2 and if i'm really in the mood to spend hours of stupid copy over work, i'll collapse the 2 into 1. |
@shagkur I changed the default code model to "small" (max 64K TOC), and now the binary built in Note that there is no obvious reason why building with the "medium" model should make the code crash, this has nothing to do with ABI and is purely a code generation style option (the code uses a few more instructions for TOC lookups, but in return can handle TOC entries beyond the initial 64K). So it might be the case that there is a logical bomb type bug somewhere (in PSL1GHT, in irrlichtPS3, elsewhere) which just happened to become triggered by the code moving around a bit... Its also a bit puzzling that you would get the "small" model before my changes (but I confirm that it does happen); both AIX and Linux use the "medium" code model by default in gcc 7 (in gcc 4 only "small" existed), and |
@zeldin Have you been able to run the example on HW? or do you mind to send me your build version of the example, so i can test here? |
I haven't tested it on HW yet, I'm making a full rebuild of everything now, I can send you the resulting binary afterwards. Well, it wasn't forceful, it was just the default, but it was this default setting that I could change from "medium" to "small" to get the small model back afterward. There's probably a logical explanation for this, I just didn't see it without instrumentation of the code, and doing that seemed a little overkill. 😄 Regarding "big" binaries, the "medium" model actually makes the TOC smaller, and also can handle larger TOCs, so if anything it should work better with big binaries than the "small" model does... It's all very weird. Well, if you have a backtrace maybe it could shed some light (l1ght?) on things. Feel free to collect one and pastebin it. |
@shagkur Here are the binaries I build with everything from master: https://mc.pp.se/irrlicht_example_2.zip |
That sounds promising. Yeah, it's not that fancy example, but if it wouldn't work it'd crash immediatly. |
@zeldin Here's the built from the "nonworking" toolchain with the stacktrace: |
Looks like it's crashing in pngDecCreate, but the actual crash is down inside libpngdec.sprx somewhere. So I guess it got bad arguments from the caller ( |
Okay. hmm...need to take a look then. Kinda strange it's not triggering the crash with the small model? |
Just noted that recent changes in
rsxInit()
from d0eea6e , brings some issues when building the SDL_PSL1GHT library fromps3libraries
(013-sdl_psl1ght.sh)e.g., you'll get a
too few arguments to function 'rsxInit'
error inSDL_PSL1GHTvideo.c
maybe other libs or samples are affected.
The text was updated successfully, but these errors were encountered: