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
Linux Support #1430
Comments
linux_stack_walker has a merge conflict in .gdbinit... should probably use |
The You can add this to the commands to auto-resolve in a union-like way: $ sed -i '/^<<<<<<</d;/^=======/d;/^>>>>>>>/d' .gdbinit
$ git add .gdbinit
$ git commit --no-edit |
Oh yeah, I should add: Use gdb for debugging, lldb is painfully slow and I'm not sure why. |
What is the current state of these merge requests? There seem to be only minor objections from the maintainers. This work is the basis for all further Linux development. |
Games still do not run. There are also some threading issues (race conditions?) with exiting the emulator. There's also the case of wide chars being different sizes between the guest and host (16 bit vs 32 bit, respectively). |
I wasn't aware of race conditions... |
To my knowledge merging this does not break anything, it only improves things. |
AudioA cross platform audio back-end is implemented in PR #1498. This comment was edited since my previous thoughts are no longer relevant |
InputInput has been implemented in PR #1493 |
Great work! |
The window title issue was fixed 0fdbcde |
Is this it? |
Perhaps in src/xenia/kernel/util/shim_utils.h but from my tests running this app, it's only ansi strings being called. |
Ok a quick static analysis on which code segments assume Lines 283 to 295 in d4a5a57
Lines 402 to 408 in d4a5a57
xenia/src/xenia/kernel/util/shim_utils.h Lines 104 to 122 in d4a5a57
What about using
in the case of 4 byte Another way would be to use std::u16string all around - That would however introduce other problems I guess. |
I went and ran with |
That happened to me too on my local branch when i did the conversion. Trying to debug this in GDB is a nightmare though.. when I try to run dolphin.xex, the stack is clobbered when it crashes, so I don't know what to look at in IDA to try and figure out the crash. |
Eww... Generally speaking, a clean solution on Linux is to use |
For anyone not following along on the #dev-linux channel on the discord, I've gotten the game emulation to be stable. I'm going to check to make sure the fixes don't interfere with Windows, then open a new PR to get the changes merged. Note: Vulkan Graphics and SDL Audio do not work as of now. SDL Input may work but I have no way of testing it in a game. |
#1517 should fix the segfaulting while running emulations. |
There seems to be a bug in the auto reset events in the threading PR. |
Rebased and fixed the conflicts. |
Thanks to PR #1792, Xenia finally builds on a local linux test system. While that's great progress, the resulting (debug) build predictably crashes, as mentioned above and shown here. Tested on Linux Mint 20.1 / kernel 5.11 with commit 95031d9. I can do some testing with this PR to help out, but agree with @JoelLinn that it may be best to merge as-is, especially given the lack of activity in over a year at this point. Now that Linux builds are compiling in master, I can imagine devs and testers alike could produce more useful results without a need to be aware of or dependent upon this PR. I can only assume the checkoff lists mentioned in the summary are still up-to-date. Thoughts? |
I concur with this comment. As a frequent user of this software (for playing games and high-level reverse engineering of said games) I also recommend all non-problematic pending commits be merged into the master branch so that more pressing matters (such as Vulkan rendering and windowing) can be addressed on the journey to a fully functional Linux release. Should I try compiling a custom build of the software myself (incorporating the pending commits of course) and relay the results of doing so back to you all? |
I think biggest hesitation for merging is with #1339 I think. It modifies code that is shared among platforms and has some open discussions. |
Hi for me, without any patch or applied any PR, fail build in my archlinux (own package)
commit used: 4861022 clang 12.0.1 #1339, , #1405, #1431, #1433 needs rebase due conflict files EDIT: fixed with
greetings |
seems #1076 needs to be added to the list. with this PR now i can able to run xenia without segfaults and initated properly the vulkan subsystem on my linux greetings |
Need to add Lines 12 to 16 in 00aba94
|
Fixed in #2211 I believe |
Hi! From what I can gather from the thread Linux support is still very experimental and broken, but I want to report some issues I'm having while attempting to build the AUR package. There seems to be several errors happening while trying to compile Error one appears as follows:
Error two states this:
If this is completely unrelated then please excuse me. |
When trying to build from AUR this error occurs for me too. |
AUR issue has been resolved. |
Current State
Xenia on Linux compiles for Travis tests in order to check C++ errors, style and very basic functionality. It has some nice abstract function definition. Most of these definitions are stubs with failing asserts which mean running Xenia in debug causes
SIGABRT
and running in release will eventually crash due to missing implementation.The biggest missing part is the threading. Without threading implementation, the Xenia UI can't run and wait. The emulated threads and synchronization primitives which are built on top of these cannot work properly.
There is also PPC CPU emulation discrepancies between Windows and Linux. The registers used on 64-bit Windows and 64-bit Linux are not the same, therefore proper care must be made to use the correct registers when transitioning from guest to host code and vice-versa.
Memory mapping needs a bit of work due to the differences in shared memory and explicit memory ranges having different parameters and prefixes on Linux.
The GTK windowing and its interaction with Vulkan needs to fixed for several bugs.
The use of paths and the string functions need to better specify NT-style line endings (
\
) which are used by guest and Windows host. In the case of a Linux host, Unix line endings must be used when specifying guest paths.Linux debugging and stack walking functions need to be implemented.
Approach to Adding Support
My approach to fixing the following problem has been to first add unit tests (and to use the ones already there) to the already working Windows implementation in order to have a behavioural ground truth. Then I add implementation to Linux which satisfy these tests. Once the Linux implementation pass the tests, I activate those tests on Travis in order to prevent future regressions.
Active PRs
Here are the PRs that I have worked on to have native Linux working. Some of these are built on top of the work of others and I preserved the authorship in the commits.
They are in descending order of importance.
Things left to do
If anyone feels like contributing to the port there are a few areas which have not yet been addressed:
New State
The fixes allow for all unit tests in the project to run and pass on Linux with clang.
The Xenia UI works and can select files with the open dialog.
Loading a xex will work up until emulation.
Calling a host function works as well as host calling a guest function.
Logging works.
Loading a ROM will eventually crash during emulation.
To try all the changes together:
I maintain a branch on my repo: https://github.com/bwrsandman/xenia/tree/linux
If you are running Arch Linux, the folllowing AUR package installs it for you: https://aur.archlinux.org/packages/xenia-git/
You can merge the changes yourself and fix any conflicts:
The text was updated successfully, but these errors were encountered: