powerpc64 context, sysutils/polkit fails to build: broken pipe during /usr/local/lib/gobject-introspection/giscanner/sourcescanner.py

Mark Millard markmi at dsl-only.net
Mon Mar 9 06:44:51 UTC 2015


Nathan W. wrote:

> This builds without issue for me, both on a G5 system and on a POWER8.
> -Nathan


I decided to "pkg delete '*'", check /usr/local/... and /var/db/pkg/..., and start a rebuild of all my ports to see what happens.

The sysutils/polkit problem was gone.

Other notes:

I still had to configure graphics/png to not run its tests that make use of cmake'c ctest. (This is just for powerpc64 builds: ctest works fine for my powerpc builds.) powerpc64's ctest builds but crashes when run.

graphics/libGL/bsd.mesalib.mk needed the powerpc64 patch that I included in my context notes.

The result built and using a PowerMac G5 with video hardware that was historically supported and the same xorg.conf from long ago for that same context basically worked for startxfce4.

I could control-option Fn to get to a console but by the time I tried to get back after that Xorg had died/quit. This was true for both vt and sc.

My X11 related powerpc (non-64) builds were stopped by...

"CXXLD mesa_dri_drivers.la" gets "c++: Internal error: Segmentation fault (program ld)"



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

On 2015-Mar-7, at 10:16 PM, Mark Millard <markmi at dsl-only.net> wrote:

powerpc64 context (more details are listed later):

$ freebsd-version -ku; uname -a
10.1-STABLE
10.1-STABLE
FreeBSD FBSDG5S0 10.1-STABLE FreeBSD 10.1-STABLE #0 r279507M: Fri Mar  6 23:08:59 PST 2015     root at FBSDG5S0:/usr/obj/usr/src/sys/GENERIC64vtsc  powerpc

Ports Revision 380683 via svnlite update. I've been using portmaster.


The problem (which I've not figured out yet)...

x11/xorg, x11-drivers/xf86-video-ati-ums, x11-drivers/xf86-video-scfb, and x11-wm/xfce4 are all blocked from building by sysutils/polkit failing to build because of a broken pipe with a subprocess...

...
gmake  all-am
gmake[6]: Entering directory '/usr/obj/portswork/usr/ports/sysutils/polkit/work/polkit-0.105/src/polkit'
 CC     libpolkit_gobject_1_la-polkitenumtypes.lo
 CC     libpolkit_gobject_1_la-polkitactiondescription.lo
 CC     libpolkit_gobject_1_la-polkitauthorityfeatures.lo
 CC     libpolkit_gobject_1_la-polkitdetails.lo
 CC     libpolkit_gobject_1_la-polkitauthority.lo
 CC     libpolkit_gobject_1_la-polkiterror.lo
 CC     libpolkit_gobject_1_la-polkitsubject.lo
 CC     libpolkit_gobject_1_la-polkitunixprocess.lo
 CC     libpolkit_gobject_1_la-polkitsystembusname.lo
 CC     libpolkit_gobject_1_la-polkitidentity.lo
 CC     libpolkit_gobject_1_la-polkitunixuser.lo
 CC     libpolkit_gobject_1_la-polkitunixgroup.lo
 CC     libpolkit_gobject_1_la-polkitunixnetgroup.lo
 CC     libpolkit_gobject_1_la-polkitauthorizationresult.lo
 CC     libpolkit_gobject_1_la-polkitcheckauthorizationflags.lo
 CC     libpolkit_gobject_1_la-polkitimplicitauthorization.lo
 CC     libpolkit_gobject_1_la-polkittemporaryauthorization.lo
 CC     libpolkit_gobject_1_la-polkitpermission.lo
 CC     libpolkit_gobject_1_la-polkitunixsession.lo
 CCLD   libpolkit-gobject-1.la
 GISCAN   Polkit-1.0.gir
Traceback (most recent call last):
 File "/usr/local/bin/g-ir-scanner", line 55, in <module>
   sys.exit(scanner_main(sys.argv))
 File "/usr/local/lib/gobject-introspection/giscanner/scannermain.py", line 517, in scanner_main
   ss = create_source_scanner(options, args)
 File "/usr/local/lib/gobject-introspection/giscanner/scannermain.py", line 430, in create_source_scanner
   ss.parse_files(filenames)
 File "/usr/local/lib/gobject-introspection/giscanner/sourcescanner.py", line 256, in parse_files
   self._parse(headers)
 File "/usr/local/lib/gobject-introspection/giscanner/sourcescanner.py", line 302, in _parse
   proc.stdin.write('#ifndef %s\n' % (define, ))
IOError: [Errno 32] Broken pipe
/usr/local/share/gobject-introspection-1.0/Makefile.introspection:153: recipe for target 'Polkit-1.0.gir' failed
gmake[6]: *** [Polkit-1.0.gir] Error 1
gmake[6]: Leaving directory '/usr/obj/portswork/usr/ports/sysutils/polkit/work/polkit-0.105/src/polkit'
Makefile:444: recipe for target 'all' failed
gmake[5]: *** [all] Error 2
gmake[5]: Leaving directory '/usr/obj/portswork/usr/ports/sysutils/polkit/work/polkit-0.105/src/polkit'
Makefile:326: recipe for target 'all-recursive' failed
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory '/usr/obj/portswork/usr/ports/sysutils/polkit/work/polkit-0.105/src'
Makefile:374: recipe for target 'all-recursive' failed
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory '/usr/obj/portswork/usr/ports/sysutils/polkit/work/polkit-0.105'
Makefile:305: recipe for target 'all' failed
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory '/usr/obj/portswork/usr/ports/sysutils/polkit/work/polkit-0.105'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/sysutils/polkit
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/polkit

===>>> make build failed for sysutils/polkit
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
      portmaster <flags> sysutils/polkit 

The relevant /usr/local/lib/gobject-introspection/giscanner/sourcescanner.py code being...

   def _parse(self, filenames):
       if not filenames:
           return

       defines = ['__GI_SCANNER__']
       undefs = []
       cpp_args = os.environ.get('CC', 'cc').split()  # support CC="ccache gcc"
       if 'cl' in cpp_args:
           # The Microsoft compiler/preprocessor (cl) does not accept
           # source input from stdin (the '-' flag), so we need
           # some help from gcc from MinGW/Cygwin or so.
           # Note that the generated dumper program is
           # still built and linked by Visual C++.
           cpp_args = ['gcc']
       cpp_args += os.environ.get('CPPFLAGS', '').split()
       cpp_args += os.environ.get('CFLAGS', '').split()
       cpp_args += ['-E', '-C', '-I.', '-']
       cpp_args += self._cpp_options

       proc = subprocess.Popen(cpp_args,
                               stdin=subprocess.PIPE,
                               stdout=subprocess.PIPE)

       for define in defines:
           proc.stdin.write('#ifndef %s\n' % (define, ))
           proc.stdin.write('# define %s\n' % (define, ))
           proc.stdin.write('#endif\n')
...

For my context the overall environment has (but ports might force other ports as alternatives to):

# more /etc/make.conf
#CPP=clang-cpp
#CC=clang
#CXX=clang++
WRKDIRPREFIX=/usr/obj/portswork
WITH_DEBUG=
MALLOC_PRODUCTION=

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

# which cc
/usr/bin/cc

# 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.

# which clang
/usr/bin/clang

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





Other context details:

$ 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 @@
CONFIGURE_ARGS+=--enable-vdpau
.endif

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

$ 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 PowerMac G5 specific change to avoid intermittent boot problems.

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. DDB and GDB are listed in sys/powerpc/conf/GENERIC64vtsc 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/GENERIC64vtsc turns off ps3 in order to turn on both vt and sc. It includes the standard GENERIC64.



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




More information about the freebsd-ports mailing list