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

Assorted FreeBSD fixes #13691

Merged
merged 7 commits into from Apr 26, 2018
Merged

Assorted FreeBSD fixes #13691

merged 7 commits into from Apr 26, 2018

Conversation

ghost
Copy link

@ghost ghost commented Mar 25, 2018

Description

  • Allow modules that use evdev to build on FreeBSD. This will allow building the GBM and Wayland platforms in addition to X11 on FreeBSD
  • Some fixes for the Wayland platform on FreeBSD which didn't build anymore with some of the recent changes and waylandpp 0.2.2, because of missing headers for wayland::presentation_t, wayland::xdg_wm_base_t, and not linking with libwayland-client-extra++.
  • FreeBSD 12.0 will switch to LLVM's lld on amd64 soon. Unfortunately find_soname will break in that case due to slightly different linker output. I'm not sure if this is appropriate for Linux so cmake/scripts/linux/Macros.cmake was copied for FreeBSD.
  • Let Kodi build on ARM architectures on FreeBSD. Tested on a Raspberry Pi 2 running FreeBSD 12.0-CURRENT a while ago. Using the UI and a couple of addons worked fine, but when trying to play any audio/video file Kodi simply hangs right now. But at least this allows one to build Kodi on FreeBSD/arm without jumping through any extra hoops.

I can break any of these out into separate pull requests if necessary.

Motivation and Context

I maintain the multimedia/kodi-devel port on FreeBSD. The penultimate goal would be to build it without having to apply custom patches or at least reduce them to a minimum.

How Has This Been Tested?

As part of multimedia/kodi-devel updates on FreeBSD only.

Screenshots (if appropriate):

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@@ -403,12 +410,16 @@ int CLinuxInputDevice::KeyboardGetSymbol(unsigned short value)
break;
*/
}

#else

This comment was marked as spam.

@@ -1,4 +1,7 @@
set(ARCH_DEFINES -D_LINUX -DTARGET_POSIX -DTARGET_FREEBSD)
if(CORE_PLATFORM_NAME_LC STREQUAL rbpi)
list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI)

This comment was marked as spam.

This comment was marked as spam.

@ghost
Copy link
Author

ghost commented Mar 25, 2018

Hmm, the Jenkins build currently fails with this error which doesn't appear to be my fault. Any chance to fix it?

ERROR: $GIT_COMMIT (d4540a9108a5740bd2799448333e3ee87f242ec8) doesn't match currently checked out revision (406db2b2961f355dc3e37112a8ff6de31efa9e82)

@notspiff
Copy link
Contributor

jenkins build this please

@ghost
Copy link
Author

ghost commented Mar 25, 2018

I'm going to partially revert the Wayland fixes since they broke the Linux+Wayland build. It seems there is some sort of problem with generate-wayland-extra-protocols on FreeBSD.

set(PLATFORM_REQUIRED_DEPS OpenGLES EGL GBM LibDRM)
set(PLATFORM_OPTIONAL_DEPS VAAPI)
set(APP_RENDER_SYSTEM gles)
list(APPEND PLATFORM_DEFINES -DMESA_EGL_NO_X11_HEADERS -DPLATFORM_SETTINGS_FILE=gbm.xml)

This comment was marked as spam.

@@ -0,0 +1,3 @@
set(PLATFORM_REQUIRED_DEPS OpenGLES EGL MMAL)

This comment was marked as spam.

@lrusak
Copy link
Contributor

lrusak commented Mar 25, 2018

For raspberry pi what is the point? AFAIK there is no hw accelerated video decode available on freebsd for the RPi.

Copy link
Member

@yol yol left a comment

Choose a reason for hiding this comment

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

There is no need to link wayland-client-extra++.

@@ -0,0 +1,2 @@
include(cmake/platform/linux/rbpi.cmake)
list(APPEND ARCH_DEFINES -D_ARMEL -DTARGET_RASPBERRY_PI)

This comment was marked as spam.

@jenkins4kodi jenkins4kodi added Rebase needed PR that does not apply/merge cleanly to current base branch and removed Rebase needed PR that does not apply/merge cleanly to current base branch labels Apr 6, 2018
@Rechi Rechi added Type: Improvement non-breaking change which improves existing functionality v18 Leia Platform: FreeBSD labels Apr 10, 2018
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Apr 11, 2018
@ghost
Copy link
Author

ghost commented Apr 13, 2018

There is no need to link wayland-client-extra++.

Well, Kodi will not link without it:

...
/usr/bin/ld: error: undefined symbol: wayland::xdg_toplevel_t::set_fullscreen(wayland::output_t)
>>> referenced by ShellSurfaceXdgShell.cpp
>>>               ShellSurfaceXdgShell.cpp.o:(KODI::WINDOWING::WAYLAND::CShellSurfaceXdgShell::SetFullScreen(wayland::output_t const&, float)) in archive build/windowing/wayland/windowing_WAYLAND.a

/usr/bin/ld: error: undefined symbol: wayland::xdg_toplevel_t::unset_fullscreen()
>>> referenced by ShellSurfaceXdgShell.cpp
>>>               ShellSurfaceXdgShell.cpp.o:(KODI::WINDOWING::WAYLAND::CShellSurfaceXdgShell::SetWindowed()) in archive build/windowing/wayland/windowing_WAYLAND.a
...

But this is probably related to the other Wayland trouble I mentioned earlier. I've removed this from the PR too until I can figure out what the real problem is. Clearly something else is going wrong. Maybe my graphics/waylandpp port is broken in some way.

@yol
Copy link
Member

yol commented Apr 13, 2018

@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Apr 13, 2018
@ghost
Copy link
Author

ghost commented Apr 13, 2018

Right. This fixes it.

@ghost ghost mentioned this pull request Apr 20, 2018
10 tasks
@Rechi Rechi requested a review from yol April 22, 2018 08:40
@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Apr 25, 2018
Tobias Kortkamp added 7 commits April 25, 2018 22:49
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
…tform on FreeBSD

Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
cmake/scripts/freebsd/ExtraTargets.cmake is just a clone of Linux'
ExtraTargets.cmake, so just include it instead.  This way things
cannot go out of sync in the future.
DEBUG: CSettings: loaded settings definition from special://xbmc/system/settings/freebsd.xml
FATAL: Unable to load freebsd-specific settings definitions

Also fixes a crash when libva-intel-driver is installed

Signed-off-by: Tobias Kortkamp <tobik@FreeBSD.org>
@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Apr 25, 2018
@Rechi Rechi merged commit 650b5f2 into xbmc:master Apr 26, 2018
@Rechi Rechi added this to the Leia 18.0-alpha2 milestone Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: FreeBSD Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants