Skip to content
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

Some small fixes for FreeBSD #11287

Merged
merged 2 commits into from
May 23, 2024
Merged

Some small fixes for FreeBSD #11287

merged 2 commits into from
May 23, 2024

Conversation

TheLastRar
Copy link
Contributor

@TheLastRar TheLastRar commented May 22, 2024

Description of Changes

Corrects type for stub implementation of AutoUpdaterDialog::processUpdate()
Define MAP_FIXED_NOREPLACE as MAP_FIXED | MAP_EXCL, which should serve the same purpose

Rationale behind Changes

Some socket code is common between Mac and FreeBSD, but not Linux.
Setting up a FreeBSD VM for testing is cheaper then getting a Mac (I mean, it's in the name)

Suggested Testing Steps

It's still a bit of effort compile for FreeBSD, In addition to this PR you would need to deal with the following issues;

Qt with Multitouch fails to compile, due to code intended to support FreeBSD you can do one of the following;
Disable Multitouch with -no-mtdev or apply the same Qt base/wayland patches FreeBSD's port does.

cpuinfo doesn't support FreeBSD
Locally apply either pytorch/cpuinfo#230 or pytorch/cpuinfo#172, I think the port uses the former.

Incorrect shaderc headers being used when system installed shaderc is present.
/usr/local/include is not treated as an implicit include (unlike Ubuntu)
This leaves us at the mercy of cmake's ordering, which ends up being incorrect.
Somehow none of the system provided dependencies we use mark this directory as a SYSTEM, so cmake see fit to have this as the very first include directory.
deps/include gets marked as SYSTEM, so appears a fair bit later in the search order.
Providing an environment variable CXXFLAGS="-isystem /usr/local/include" manages to get includes in the correct order.
Or alternatively apply #11292 which also enforces correct include order.

I dunno if that last issue is an problem with my configuration, or something FreeBSD has messed up.

@stenzek
Copy link
Contributor

stenzek commented May 22, 2024

I didn't bother adding this in my PR, since we don't really support FreeBSD anyway.

Incorrect shaderc headers being used when system installed shaderc is present.

This won't work. You need to use the deps version. Which would mean creating a deps build script :-)

@TheLastRar
Copy link
Contributor Author

TheLastRar commented May 22, 2024

I didn't bother adding this in my PR, since we don't really support FreeBSD anyway.

Incorrect shaderc headers being used when system installed shaderc is present.

This won't work. You need to use the deps version. Which would mean creating a deps build script :-)

I am using the deps script and clang still picks the wrong headers for the reasons I outlined in that section

The linux deps script mostly works, one just needs to fudge with the build Qt step

Edit: I guess it wasn't clear that I was using that, only mentioning the deps directory without mentioning the use of the script

I appreciate that FreeBSD isn't an officially supported target, but we already have code in place for FreeBSD support. (including in LnxHostSys.cpp)
I opted not to include any changes needed to the deps script for supporting FreeBSD, due to it's not officially supported nature

@stenzek stenzek merged commit 63a5a15 into PCSX2:master May 23, 2024
12 checks passed
@stenzek
Copy link
Contributor

stenzek commented May 23, 2024

I see. Yeah.. include order is definitely problematic. I guess we'd have to re-order it, and/or use -Isystem instead (assuming that changes the priority, not sure if it does). Neither is really a great solution..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants