Bug 241762

Summary: devel/godot: fix build on powerpc64
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Piotr Kubaj <pkubaj>
Status: Closed FIXED    
Severity: Affects Only Me CC: FreeBSD
Priority: --- Flags: FreeBSD: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243498
Attachments:
Description Flags
patch
FreeBSD: maintainer-approval-
v2 FreeBSD: maintainer-approval+

Description Piotr Kubaj freebsd_committer freebsd_triage 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 freebsd_triage 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.
Comment 4 commit-hook freebsd_committer freebsd_triage 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

Log:
  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)

Changes:
  head/devel/godot/Makefile
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 freebsd_triage 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...