Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2016 23:58:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 214553] devel/godot: fails to build on aarch64
Message-ID:  <bug-214553-13-oTZnZDJG0A@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-214553-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-214553-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214553

--- Comment #3 from Jan Beich (mail not working) <jbeich@FreeBSD.org> ---
(In reply to Shane from comment #2)
> I expect adding CXXFLAGS_aarch64=3D -DNO_THREADS to Makefile should allow=
 the
> build to work.

Correct. Tested on 110aarch64 via poudriere + qemu-user-static. This may al=
so
unbreak other non-x86 platforms e.g., sparc64. However, mips has many ${ARC=
H}
variants[1] which makes you wonder if NO_THREAD conditional should be reord=
ered
to be a #warning rather than #error.

> For a full fix - in core/safe_refcount.h:209
> https://github.com/godotengine/godot/blob/master/core/safe_refcount.h#L209
> there is asm code for arm - does the arm asm code also work for aarch64, =
so we
> can add aarch64 to the #if test or does an aarch64 version need to be mad=
e?

According to an upstream issue[2] aarch64 may need "some new lines of code =
in
the reference counter classes, as they have different implementations in asm
depending on the cpu arch".

  In file included from platform/x11/context_gl_x11.cpp:29:
  In file included from platform/x11/context_gl_x11.h:41:
  In file included from core/os/os.h:32:
  In file included from core/ustring.h:33:
  In file included from core/vector.h:37:
  In file included from core/os/memory.h:33:
  core/safe_refcount.h:245:6: error: unrecognized instruction mnemonic
                           "    strex   %1, %0, [%2]    \n"
                            ^
  <inline asm>:3:5: note: instantiated into assembly here
      strex   x9, x8, [x0]
      ^

In order to reproduce even on x86 try adding "-target aarch64--freebsd" e.g=
.,

  $ clang++ -target aarch64--freebsd -DGLEW_NO_GLU -DRTAUDIO_ENABLED
-DFREETYPE_ENABLED -DENABLE_DEPRECATED -DTYPED_METHOD_BIND -DOPENGL_ENABLED
-DOSS_ENABLED -DX11_ENABLED -DUNIX_ENABLED -DGLES2_ENABLED -DGLES_OVER_GL
-DMUSEPACK_ENABLED-DSQUISH_ENABLED -DVORBIS_ENABLED -DOPUS_ENABLED
-DTHEORA_ENABLED -DTHEORALIB_ENABLED -DPNG_ENABLED -DDDS_ENABLED -DPVR_ENAB=
LED
-DJPG_ENABLED -DWEBP_ENABLED -DSPEEX_ENABLED -DGDSCRIPT_ENABLED
-DMINIZIP_ENABLED -DXML_ENABLED -DETC1_ENABLED -DGLEW_ENABLED -DGLEW_STATIC
-D_THREAD_SAFE -Icore -Icore/math -Itools -Idrivers -I. -Iplatform/x11
-I/usr/local/include -I/usr/local/include/freetype2 -Iplatform/x11 -c
platform/x11/context_gl_x11.cpp

[1] $ make targets -C /usr/src | awk -F/ '/mips/ { print $2 }'
    mipsel
    mips
    mips64el
    mips64
    mipsn32
    mipselhf
    mipshf
    mips64elhf
    mips64hf
[2] https://github.com/godotengine/godot/issues/5240#issuecomment-246202471

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214553-13-oTZnZDJG0A>