Bug 241762 - devel/godot: fix build on powerpc64
Summary: devel/godot: fix build on powerpc64
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-06 18:37 UTC by Piotr Kubaj
Modified: 2019-11-10 02:23 UTC (History)
1 user (show)

See Also:
FreeBSD: maintainer-feedback+


Attachments
patch (1.34 KB, patch)
2019-11-06 18:37 UTC, Piotr Kubaj
FreeBSD: maintainer-approval-
Details | Diff
v2 (1.08 KB, patch)
2019-11-08 11:26 UTC, Piotr Kubaj
FreeBSD: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-11-06 18:37:42 UTC
Created attachment 208918 [details]
patch

Use system libvpx. Using the included one results in using AVX code which causes error on powerpc64:
thirdparty/libvpx/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c:15:10: fatal error: immintrin.h: No such file or directory
   15 | #include <immintrin.h>
      |          ^~~~~~~~~~~~~
compilation terminated.

Also add USES=gl xorg.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2019-11-08 03:59:01 UTC
Approved as mentor (builds on ppcports) pending maintainer review.
Comment 2 Shane 2019-11-08 04:26:09 UTC
Comment on attachment 208918 [details]
patch

The issue I see is that this will apply to every platform. The godot internal libvpx contains significant modifications that I would expect issues from the system lib. See https://github.com/godotengine/godot/commit/1556d0d377ec

A quick option to try is to use a conditional such as -

.if ${ARCH} == powerpc64
LIB_DEPENDS+= libvpx.so:multimedia/libvpx
MAKE_ARGS+= builtin_libvpx=False
.endif

A better solution that could be pushed upstream is to adjust modules/webm/libvpx/SCsub and/or thirdparty/libvpx/* to list and include the correct files and flags for PPC. This change should also contain the patches from the libvpx port for PPC. Similar changes can also be done to fix the arm build.
Comment 3 Piotr Kubaj freebsd_committer 2019-11-08 11:26:27 UTC
Created attachment 208970 [details]
v2

Godot's configs seem to be built on the premise that it's either x86 or ARM and I don't want to refactor it.

Could you then review this patch? I additionally enabled build on armv6 because it's likely that it failed because of libvpx before.