Bug 197132

Summary: [mips] lang/luajit unsupported build with gcc < 4.3
Product: Ports & Packages Reporter: Sean Bruno <sbruno>
Component: Individual Port(s)Assignee: Sean Bruno <sbruno>
Status: Closed FIXED    
Severity: Affects Some People CC: emaste, mips
Priority: --- Flags: bugzilla: maintainer-feedback? (osa)
Version: Latest   
Hardware: mips   
OS: Any   
URL: http://dirty.ysv.freebsd.org/data/11mips32-11mips32/2015-01-26_23h32m57s/logs/errors/luajit-2.0.3.log
Attachments:
Description Flags
Use ONLY_FOR_ARCHS to disable builds, add mips/mips64 to ARCHS that don't support this port. none

Description Sean Bruno freebsd_committer freebsd_triage 2015-01-27 17:58:38 UTC
lang/luajit should be marked as broken for mips/mips64 until we update the toolchain to support mips.

gmake[2]: Entering directory '/wrkdirs/usr/ports/lang/luajit/work/LuaJIT-2.0.3/src'
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
lj_arch.h:335:2: error: #error "No support for MIPS CPUs without FPU"
DYNASM    host/buildvm_arch.h
HOSTCC    host/buildvm.o
In file included from host/buildvm.h:16,
                 from host/buildvm.c:17:
./lj_arch.h:302:2: error: #error "Need at least GCC 4.3 or newer"
Makefile:662: recipe for target 'host/buildvm.o' failed
gmake[2]: *** [host/buildvm.o] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/lang/luajit/work/LuaJIT-2.0.3/src'
Makefile:105: recipe for target 'all' failed
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/luajit/work/LuaJIT-2.0.3'
*** Error code 1
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-27 17:58:38 UTC
Auto-assigned to maintainer osa@FreeBSD.org
Comment 2 Sean Bruno freebsd_committer freebsd_triage 2015-02-07 23:54:55 UTC
I'm thinking about changing the port to this for clarity:

Index: Makefile
===================================================================
--- Makefile	(revision 378625)
+++ Makefile	(working copy)
@@ -21,10 +21,7 @@
 		${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 	@${INSTALL_MAN} ${WRKSRC}/etc/luajit.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
 
-.include <bsd.port.pre.mk>
+ONLY_FOR_ARCHS= i386 amd64 armv6
+ONLY_FOR_ARCHS_REASON= Requires newer gcc/clang to compile.
 
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN=		Does not compile on ia64, powerpc, or sparc64
-.endif
-
 .include <bsd.port.post.mk>
Comment 3 Sean Bruno freebsd_committer freebsd_triage 2015-04-13 17:05:29 UTC
Created attachment 155552 [details]
Use ONLY_FOR_ARCHS to disable builds, add mips/mips64 to ARCHS that don't support this port.
Comment 4 Sergey A. Osokin freebsd_committer freebsd_triage 2015-05-02 17:20:14 UTC
Hi Sean,

go ahead and commit changes.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-05-02 17:53:30 UTC
A commit references this bug:

Author: sbruno
Date: Sat May  2 17:52:29 UTC 2015
New revision: 385200
URL: https://svnweb.freebsd.org/changeset/ports/385200

Log:
  lang/luajit requires a much more modern compiler than the gcc4.2.1 available
  on non-clang architechtures.  In addition, if there is no lang/gcc available
  for the architecuture, we can't build it via that method either.

  Rework archtecture disable to use ONLY_FOR_ARCHS and give a clearer reason
  why this is being disabled on powrepc/mips/sparc64.

  PR:		197132
  Reviewed by:	osa@freebsd.org (maintainer)

Changes:
  head/lang/luajit/Makefile
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-05-02 18:43:37 UTC
A commit references this bug:

Author: sbruno
Date: Sat May  2 18:43:36 UTC 2015
New revision: 385203
URL: https://svnweb.freebsd.org/changeset/ports/385203

Log:
  This time, don't delete the requisite includes for the post-install bits.

  Reimplement ONLY_FOR_ARCHS such that we know that this port requires newer
  compiler features (which aren't very clear from the port itself).  Probably
  need to validate this on powerpc as we have clang available and gcc ports.

  PR:		197132

Changes:
  head/lang/luajit/Makefile