Bug 219441 - graphics/mesa-dri: fails to build on aarch64
Summary: graphics/mesa-dri: fails to build on aarch64
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: freebsd-x11 mailing list
URL:
Keywords: regression
Depends on:
Blocks: 219406
  Show dependency treegraph
 
Reported: 2017-05-21 22:33 UTC by Jan Beich
Modified: 2017-06-06 05:14 UTC (History)
1 user (show)

See Also:
rezny: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2017-05-21 22:33:45 UTC
/bin/sh ../../../../libtool  --tag=CC   --mode=compile cc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"17.1.0\" -DPACKAGE_STRING=\"Mesa\ 17.1.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"17.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FLATTEN=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1 -DHAVE_FUNC_ATTRIBUTE_VISIBILITY=1 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_FUNC_ATTRIBUTE_WEAK=1 -DHAVE_FUNC_ATTRIBUTE_ALIAS=1 -DHAVE_DLADDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -I.   -isystem /usr/local/include -I../../../../src/compiler/nir -I/usr/local/include -I/usr/local/include/libdrm  -I/usr/local/include -I/usr/local/include/libdrm  -I./include -I../../../../src -I../../../../include -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I../../../../src/gallium/winsys -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG -DTEXTURE_FLOAT_ENABLED -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DHAVE_DRI3 -DENABLE_SHADER_CACHE -DHAVE_MINCORE -DHAVE_LLVM=0x0400 -DMESA_LLVM_VERSION_PATCH=1 -fvisibility=hidden    -DVC4_BUILD_NEON -march=armv7-a -mfpu=neon -O2 -pipe  -isystem /usr/local/include -fno-strict-aliasing -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-math-errno -fno-trapping-math -Qunused-arguments  -MT libvc4_neon_la-vc4_tiling_lt.lo -MD -MP -MF .deps/libvc4_neon_la-vc4_tiling_lt.Tpo -c -o libvc4_neon_la-vc4_tiling_lt.lo `test -f 'vc4_tiling_lt.c' || echo './'`vc4_tiling_lt.c
[...]
cc: error: the clang compiler does not support '-march=armv7-a'
gmake[5]: *** [Makefile:822: libvc4_neon_la-vc4_tiling_lt.lo] Error 1
gmake[5]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.1.0/src/gallium/drivers/vc4'
gmake[4]: *** [Makefile:598: all-recursive] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.1.0/src/gallium'
gmake[3]: *** [Makefile:851: all-recursive] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.1.0/src'
gmake[2]: *** [Makefile:642: all] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.1.0/src'
gmake[1]: *** [Makefile:642: all-recursive] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/mesa-dri/work/mesa-17.1.0'
*** Error code 1
Comment 1 Jan Beich freebsd_committer 2017-05-21 22:39:15 UTC
-mfpu=neon is also unnecessary on aarch64:

  $ clang -target aarch64-unknown-freebsd12.0 -mfpu=neon -c test.c
  clang: warning: argument unused during compilation: '-mfpu=neon' [-Wunused-command-line-argument]

  $ aarch64-unknown-freebsd12.0-gcc -mfpu=neon -c test.c
  aarch64-unknown-freebsd12.0-gcc: error: unrecognized command line option '-mfpu=neon'
Comment 2 Jan Beich freebsd_committer 2017-05-21 22:56:40 UTC
-march=armv7-a seems wrong even for armv6 in case user defines CPUTYPE=thunderx (or armv8-a) via make.conf.
Comment 3 Jan Beich freebsd_committer 2017-05-21 23:05:42 UTC
(In reply to Jan Beich from comment #2)
> CPUTYPE=thunderx

Oops, wrong example. Cavium ThunderX doesn't implement aarch32.
Comment 4 commit-hook freebsd_committer 2017-06-06 05:10:41 UTC
A commit references this bug:

Author: rezny
Date: Tue Jun  6 05:09:54 UTC 2017
New revision: 442741
URL: https://svnweb.freebsd.org/changeset/ports/442741

Log:
  Update the Mesa ports to 17.1.1

  - fix build on aarch64 by limiting the vc4 neon patch to armv6 [1]

  PR:		219441 [1]
  Submitted by:	strejda [1]
  Reported by:	jbeich [1]
  Reviewed by:	kwm
  Approved by:	swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11066

Changes:
  head/graphics/mesa-dri/Makefile
  head/graphics/mesa-dri/Makefile.common
  head/graphics/mesa-dri/distinfo
  head/graphics/mesa-dri/files/extra-src_gallium_drivers_vc4_Makefile.in
  head/graphics/mesa-dri/files/patch-src_gallium_drivers_vc4_Makefile.in
Comment 5 Matthew Rezny freebsd_committer 2017-06-06 05:14:42 UTC
strejda informed me that the patch for building the neon bits of vc4 was only meant to be used on armv6