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

Unbreak build on FreeBSD #119

Merged
merged 2 commits into from
Jan 1, 2023
Merged

Unbreak build on FreeBSD #119

merged 2 commits into from
Jan 1, 2023

Conversation

jbeich
Copy link

@jbeich jbeich commented Oct 26, 2020

Runtime is still broken: need to file bugs as those are non-trivial.

Depends on emersion/libliftoff#52

Copy link
Collaborator

@Joshua-Ashton Joshua-Ashton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the situation is wrt realtime priority compute is *BSD (or id thats even supported at all)

Would you be able to see if that's working? On Linux at least we need NICE for that.

@emersion
Copy link
Collaborator

I've removed epoll usage in master.

@emersion
Copy link
Collaborator

Did you have the chance to test if gamescope was working fine on FreeBSD with this PR?

@jbeich
Copy link
Author

jbeich commented Aug 10, 2021

@emersion
Copy link
Collaborator

OK, thanks for the status update!

@jbeich
Copy link
Author

jbeich commented Feb 14, 2022

FreeBSD recently stubbed dma_buf_poll, so gamescope now runs. I have Intel GPU (0x1912, Skylake), so INTEL_DEBUG=norbc is required to avoid #356 visual glitch:
gamescope glxgears before
gamescope gtk3-demo before

On BSD systems only the super-user may lower priority values.

meson.build:40:0: ERROR: Dependency "libcap" not found, tried pkgconfig and cmake

src/main.cpp:7:10: fatal error: 'sys/capability.h' file not found
 #include <sys/capability.h>
          ^~~~~~~~~~~~~~~~~~
src/main.cpp:244:2: error: unknown type name 'cap_t'
        cap_t caps = cap_get_proc();
        ^
src/main.cpp:244:15: error: use of undeclared identifier 'cap_get_proc'
        cap_t caps = cap_get_proc();
                     ^
src/main.cpp:247:3: error: unknown type name 'cap_flag_value_t'
                cap_flag_value_t nicecapvalue = CAP_CLEAR;
                ^
src/main.cpp:247:35: error: use of undeclared identifier 'CAP_CLEAR'
                cap_flag_value_t nicecapvalue = CAP_CLEAR;
                                                ^
src/main.cpp:248:23: error: use of undeclared identifier 'CAP_SYS_NICE'
                cap_get_flag( caps, CAP_SYS_NICE, CAP_EFFECTIVE, &nicecapvalue );
                                    ^
src/main.cpp:248:37: error: use of undeclared identifier 'CAP_EFFECTIVE'
                cap_get_flag( caps, CAP_SYS_NICE, CAP_EFFECTIVE, &nicecapvalue );
                                                  ^
src/main.cpp:250:24: error: use of undeclared identifier 'CAP_SET'
                if ( nicecapvalue == CAP_SET )
                                     ^
DragonFly and FreeBSD adopted a similar API to Linux. Other sytems
maybe interested as well, so add a warning.

src/steamcompmgr.cpp:51:10: fatal error: 'sys/prctl.h' file not found
 #include <sys/prctl.h>
         ^~~~~~~~~~~~~
src/steamcompmgr.cpp:3118:9: error: use of undeclared identifier 'PR_SET_CHILD_SUBREAPER'
        prctl( PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0 );
               ^
@Joshua-Ashton
Copy link
Collaborator

Is this ready?

@jbeich
Copy link
Author

jbeich commented Jan 1, 2023

Yes apart from

  • runtime is still affected by Crash in sdlwindow_init on FreeBSD #120, so worked around via a618ea0 (not in this PR because too ugly)
  • CAP_SYS_NICE equivalent remains unimplemented. Besides, my iGPU isn't powerful enough to see the difference.

@Joshua-Ashton
Copy link
Collaborator

You can feel free to make the SDL window init stuff a condition variable instead. The muted abuse was just convenient.

@Joshua-Ashton Joshua-Ashton merged commit 50d5ea8 into ValveSoftware:master Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants