Hi ports --

Currently, multimedia/xine-lib fails to build on aarch64:
http://build-failures.rhaalovely.net/aarch64/2018-12-03/multimedia/xine-lib.log

This is because the configure script insists on finding an assembler in its $PATH. It does so by checking if an AS env variable is set and if not it runs `cc -print-prog-name=as'. On other archs, this will return /usr/bin/as, which exists and configure is happy. On arm64, however, this returns as and since there is no as program in the $PATH, configure errors out.

The build of xine-lib (at least on arm64) doesn't appear to directly use the assembler anyway. If we lie to the configure script by setting AS="${CC}" for example, it skips the `cc -print-prog-name=as' test and continues on. That's what the attached patch does. This allowed me to successfully package and install xine-lib on arm64.

OK?

~Brian

Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/xine-lib/Makefile,v
retrieving revision 1.139
diff -u -p -r1.139 Makefile
--- Makefile	24 Oct 2018 14:28:08 -0000	1.139
+++ Makefile	19 Dec 2018 05:23:09 -0000
@@ -86,6 +86,15 @@ CONFIGURE_ENV=	CPPFLAGS="-I${X11BASE}/in
 		LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" \
 		ac_cv_header_execinfo_h=no
 
+.if ${MACHINE_ARCH:Maarch64}
+# The configure script runs `cc -print-prog-name=as'
+# if an AS env var isn't set, then tries to find that program.
+# Since there is no /usr/bin/as on arm64, this causes configure
+# to bail out and nothing gets built.
+# Let's just lie if we're on arm64.
+CONFIGURE_ENV+=	AS="${CC}"
+.endif
+
 NO_TEST=	Yes
 
 pre-configure:

Reply via email to