Bug 221044 - x11/pixman: doesn't build with clang 5
Summary: x11/pixman: doesn't build with clang 5
Status: Closed DUPLICATE of bug 221814
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-07-27 10:42 UTC by Sylvain Garrigues
Modified: 2018-02-01 23:09 UTC (History)
4 users (show)

See Also:


Attachments
Poudriere log (166.16 KB, application/x-gzip)
2017-07-27 10:42 UTC, Sylvain Garrigues
no flags Details
Proposed workaround (635 bytes, patch)
2017-07-27 10:58 UTC, Sylvain Garrigues
no flags Details | Diff
Proposed workaround #2 (654 bytes, patch)
2017-07-27 12:23 UTC, Sylvain Garrigues
no flags Details | Diff
Proposed workaround #3 (573 bytes, patch)
2017-07-27 12:39 UTC, Sylvain Garrigues
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Garrigues 2017-07-27 10:42:48 UTC
Created attachment 184763 [details]
Poudriere log

Seems like it fails at assembly source code (pixman-arm-simd-asm.S) compilation, cf. build log attached.
Comment 1 Sylvain Garrigues 2017-07-27 10:43:28 UTC
It used to build with clang 4
Comment 2 Sylvain Garrigues 2017-07-27 10:58:42 UTC
Created attachment 184765 [details]
Proposed workaround

Proposed workaround attached
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-07-27 11:32:10 UTC
Comment on attachment 184765 [details]
Proposed workaround

Clang 4.0 built fine because it failed configure check.

  -checking whether to use ARM SIMD assembler... no
  -checking whether to use ARM NEON assembler... no
  +checking whether to use ARM SIMD assembler... yes
  +checking whether to use ARM NEON assembler... yes
  [...]
  -checking for GCC vector extensions... no
  +checking for GCC vector extensions... yes

> BUILD_DEPENDS+= as:devel/binutils

Replace as with ${LOCALBASE}/bin/as. armv6 (unlike aarch64) does have /usr/bin/as which can be found via PATH thus BUILD_DEPENDS may ignore the dependency.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-07-27 11:34:13 UTC
Comment on attachment 184765 [details]
Proposed workaround

> CFLAGS+=        -no-integrated-as -B/usr/local/bin

Can you unhardcode /usr/local as ${LOCALBASE} ?
Comment 5 Sylvain Garrigues 2017-07-27 12:23:15 UTC
Created attachment 184766 [details]
Proposed workaround #2

With suggested improvements
Comment 6 Sylvain Garrigues 2017-07-27 12:39:46 UTC
Created attachment 184767 [details]
Proposed workaround #3

Moved location of the .if ${ARCH} block after bsd.port.pre.mk is included, sorry.
Comment 7 Sylvain Garrigues 2017-07-27 13:15:46 UTC
What I don't like with my workaround is that because of the -B flag, all external tools called by clang (e.g. the linker) will come from the devel/binutils port, instead of the ones in base.

My intention is only to use the latest GNU AS.
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-02-01 10:37:41 UTC
Makefile shows:
.if ${ARCH} == "armv6" || ${ARCH} == "armv7"
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
CONFIGURE_ENV+= CCASFLAGS="${CFLAGS} -no-integrated-as"
.endif

so I guess it is solved. Could it closed?