powerpc (non-64) 10.1-STABLE context: CXXLD mesa_dri_drivers.la gets c++: Internal error: Segmentation fault (program ld)

Mark Millard markmi at dsl-only.net
Mon Mar 9 03:23:37 UTC 2015

Basic context information (more details later):

# freebsd-version -ku; uname -a
FreeBSD FBSDG4S0 10.1-STABLE FreeBSD 10.1-STABLE #0 r279507M: Sun Mar  8 14:09:34 PDT 2015     root at FBSDG4S0:/usr/obj/powerpc.powerpc/usr/src/sys/GENERICvtsc  powerpc

This variant of powerpc GENERIC (not GENERIC64) was running on a PowerMac G5 Quad-Core, not that I expect that matters for the below.

The problem:

For the above powerpc port-build context graphics/dri failed to build because of a segmentation fault during a CXXLD mesa_dri_drivers.la .

===>>> Launching child to install graphics/dri

===>>> x11/xorg 13/16 >> graphics/dri (1/212)
portmaster: x11/xorg 13/16 >> graphics/dri (1/212)
===>>> Port directory: /usr/ports/graphics/dri

===>>> Starting check for all dependencies
===>>> Gathering dependency list for graphics/dri from ports
===>>> Dependency check complete for graphics/dri

===>>> x11/xorg 13/16 >> graphics/dri (1/212)
portmaster: x11/xorg 13/16 >> graphics/dri (1/12)
===>  Cleaning for dri-10.4.5,2
  CC       swrast.lo
  CCLD     libswrast_dri.la
gmake[7]: Leaving directory '/usr/obj/portswork/usr/ports/graphics/dri/work/Mesa-10.4.5/src/mesa/drivers/dri/swrast'
gmake[7]: Entering directory '/usr/obj/portswork/usr/ports/graphics/dri/work/Mesa-10.4.5/src/mesa/drivers/dri'
cd ../../../.. && gmake  am--refresh
cd ../../../.. && gmake  am--refresh
  CXXLD    mesa_dri_drivers.la
c++: Internal error: Segmentation fault (program ld)
Please submit a full bug report.
See <URL:http://www.freebsd.org/support.html> for instructions.
Makefile:651: recipe for target 'mesa_dri_drivers.la' failed
gmake[7]: *** [mesa_dri_drivers.la] Error 1
gmake[7]: Leaving directory '/usr/obj/portswork/usr/ports/graphics/dri/work/Mesa-10.4.5/src/mesa/drivers/dri'
Makefile:737: recipe for target 'all-recursive' failed
gmake[6]: *** [all-recursive] Error 1

Other context details:

$ cd /usr/src
$ svnlite info
Path: .
Working Copy Root Path: /usr/src
URL: https://svn0.us-west.freebsd.org/base/stable/10
Relative URL: ^/stable/10
Repository Root: https://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 279507
Node Kind: directory
Schedule: normal
Last Changed Author: ngie
Last Changed Rev: 279507
Last Changed Date: 2015-03-01 14:12:24 -0800 (Sun, 01 Mar 2015)

$ svnlite st --no-ignore
?       .snap
?       restoresymtable
M       sys/ddb/db_main.c
M       sys/ddb/db_script.c
I       sys/powerpc/conf/GENERIC64vtsc
I       sys/powerpc/conf/GENERICvtsc
M       sys/powerpc/ofw/ofw_machdep.c
M       sys/powerpc/ofw/ofwcall64.S
M       sys/powerpc/powerpc/dump_machdep.c

sys/powerpc/ofw/ofw_machdep.c has a powerpc64 PowerMac G5 specific change to avoid intermittent boot problems. For powerpc the #if structure avoids the change.

sys/ddb/... and sys/powerpc/ofw/ofwcall64.S are just to help me get evidence if I do end up with another early-boot failure. But here ofwcall64.S was not in use and I've not yet put such an addition into ofwcall.S . DDB and GDB are listed in sys/powerpc/conf/GENERICvtsc for the same reason.

sys/powerpc/powerpc/dump_machdep.c is from me forcing the DMA transfer size for dumps to be small enough not to be rejected as too large of a DMA request size.

sys/powerpc/conf/GENERICvtsc turns off ps3 in order to turn on both vt and sc. It includes the standard GENERIC.

# more /etc/make.conf

# more /etc/src.conf

# cc --version
cc (GCC) 4.2.1 20070831 patched [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

# clang --version
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
Target: powerpc-unknown-freebsd10.1
Thread model: posix

There is no port-based gcc/g++ or clang present.

$ cd /usr/ports
$ svnlite info
Path: .
Working Copy Root Path: /usr/ports
URL: https://svn0.us-west.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: https://svn0.us-west.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 380683
Node Kind: directory
Schedule: normal
Last Changed Author: demon
Last Changed Rev: 380683
Last Changed Date: 2015-03-07 03:31:11 -0800 (Sat, 07 Mar 2015)

$ svnlite st --no-ignore
?       .snap
I       distfiles
M       graphics/libGL/bsd.mesalib.mk
I       packages
?       restoresymtable

$ svnlite diff graphics/libGL/bsd.mesalib.mk
Index: graphics/libGL/bsd.mesalib.mk
--- graphics/libGL/bsd.mesalib.mk	(revision 380683)
+++ graphics/libGL/bsd.mesalib.mk	(working copy)
@@ -136,6 +136,10 @@

+.if ${ARCH} == powerpc64
+CFLAGS+=	-mminimal-toc
	@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \

Mark Millard
markmi at dsl-only.net

More information about the freebsd-ports mailing list