Bug 207268 - irc/ircd-ratbox needs GCC to RUN on i386 (builds fine with CLANG but crashes)
Summary: irc/ircd-ratbox needs GCC to RUN on i386 (builds fine with CLANG but crashes)
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: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 01:39 UTC by John Marshall
Modified: 2016-03-18 13:58 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (moggie)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Marshall 2016-02-17 01:39:56 UTC
After a successful build of irc/ircd-ratbox on i386 it fails to run...

Feb 17 10:08:08 rwsrv04 kernel: pid 28391 (ircd), uid 72: exited on signal 11 (core dumped)

This has been going on for a long time now. I have been working around this by just adding "USE_GCC= yes" near the top of the Makefile on the only i386 server we are still running. I would submit a patch but I cannot find the canonical way of doing this in an arhitecture-specific way. The Porters Handbook seems to be silent on the matter.

make(1) says that MACHINE_ARCH is available for testing architecture but I cannot see that used in other ports. It looks like ARCH is the preferred variable. ARCH is setup in bsd.port.mk but bsd.port.mk is what processes the dependent USE_GCC variable. So, the following patch "works for me" but I leave it to the ports gurus to do this according to the traditions of the rites of the inner sanctum of ports committers.

rwsrv04# svn diff Makefile
Index: Makefile
===================================================================
--- Makefile	(revision 409014)
+++ Makefile	(working copy)
@@ -19,6 +19,9 @@
 CPE_VENDOR=	ratbox
 USE_RC_SUBR=	ircd-ratbox
 USE_LDCONFIG=	${PREFIX}/lib/ircd-ratbox
+.if ${MACHINE_ARCH} == "i386"
+USE_GCC=	yes
+.endif
 
 MAKE_JOBS_UNSAFE=	yes
Comment 1 Mark Felder freebsd_committer 2016-03-18 13:54:26 UTC
Confirmed, it does segfault in an i386 jail

$ ircd -foreground
ircd: version ircd-ratbox-3.0.8
ircd: libratbox version: 20120429_0-27395 - Using SSL: OpenSSL 1.0.1l-freebsd 15 Jan 2015 compiled: 0x100010cf, library 0x100010cf
ircd: pid 31352
ircd: running in foreground mode from /usr/local
Segmentation fault
Comment 2 commit-hook freebsd_committer 2016-03-18 13:58:11 UTC
A commit references this bug:

Author: feld
Date: Fri Mar 18 13:57:45 UTC 2016
New revision: 411355
URL: https://svnweb.freebsd.org/changeset/ports/411355

Log:
  irc/ircd-ratbox: Use GCC for i386

  When built with Clang on i386 ratbox segfaults at startup.

  PR:		207268

Changes:
  head/irc/ircd-ratbox/Makefile