Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Mar 2015 20:23:32 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-ports@freebsd.org, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, freebsd-toolchain@freebsd.org
Subject:   powerpc (non-64) 10.1-STABLE context: CXXLD mesa_dri_drivers.la gets c++: Internal error: Segmentation fault (program ld)
Message-ID:  <55D5E445-4018-488D-B776-9CA5A062A904@dsl-only.net>

next in thread | raw e-mail | index | archive | help
Basic context information (more details later):

# freebsd-version -ku; uname -a
10.1-STABLE
10.1-STABLE
FreeBSD FBSDG4S0 10.1-STABLE FreeBSD 10.1-STABLE #0 r279507M: Sun Mar  8 =
14:09:34 PDT 2015     =
root@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 .

...
=3D=3D=3D>>> Launching child to install graphics/dri

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

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

=3D=3D=3D>>> x11/xorg 13/16 >> graphics/dri (1/212)
portmaster: x11/xorg 13/16 >> graphics/dri (1/12)
=3D=3D=3D>  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/drive=
rs/dri/swrast'
gmake[7]: Entering directory =
'/usr/obj/portswork/usr/ports/graphics/dri/work/Mesa-10.4.5/src/mesa/drive=
rs/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/drive=
rs/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
#CPP=3Dclang-cpp
#CC=3Dclang
#CXX=3Dclang++
WRKDIRPREFIX=3D/usr/obj/portswork
WITH_DEBUG=3D
MALLOC_PRODUCTION=3D

# more /etc/src.conf
#CPP=3Dclang-cpp
#CC=3Dclang
#CXX=3Dclang++
#CFLAGS+=3D-DELF_VERBOSE
#WITH_DEBUG_FILES=3D
#WITHOUT_CLANG

# 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
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR =
PURPOSE.

# 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
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- graphics/libGL/bsd.mesalib.mk	(revision 380683)
+++ graphics/libGL/bsd.mesalib.mk	(working copy)
@@ -136,6 +136,10 @@
CONFIGURE_ARGS+=3D--enable-vdpau
.endif

+.if ${ARCH} =3D=3D powerpc64
+CFLAGS+=3D	-mminimal-toc
+.endif
+
post-patch:
	@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e =
's|x86_64|amd64|' \
		${WRKSRC}/configure

=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55D5E445-4018-488D-B776-9CA5A062A904>