Bug 241762 - devel/godot: fix build on powerpc64
Summary: devel/godot: fix build on powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Piotr Kubaj
Depends on:
Reported: 2019-11-06 18:37 UTC by Piotr Kubaj
Modified: 2020-01-22 09:26 UTC (History)
1 user (show)

See Also:
FreeBSD: maintainer-feedback+

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]

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]

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

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]

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.
Comment 4 commit-hook freebsd_committer 2019-11-17 01:39:01 UTC
A commit references this bug:

Author: pkubaj
Date: Sun Nov 17 01:38:15 UTC 2019
New revision: 517790
URL: https://svnweb.freebsd.org/changeset/ports/517790

  devel/godot: fix build on powerpc64

  Use system libvpx on architectures which break with included libvpx.

  PR:		241762
  Approved by:	FreeBSD@ShaneWare.Biz (maintainer), linimon (mentor)

Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-22 05:36:06 UTC
^Triage: Assign to committer that resolved

@Piotr Could you assign yourself to issues you've resolved/closed that aren't yet assigned to you please. Thanks!
Comment 6 Piotr Kubaj freebsd_committer 2020-01-22 09:26:11 UTC
(In reply to Kubilay Kocak from comment #5)
Can I somehow query bugzilla over what PR's I should assign to me? There are likely many of those...