Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Mar 2015 22:16:03 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-ports@freebsd.org, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   powerpc64 context, sysutils/polkit fails to build: broken pipe during /usr/local/lib/gobject-introspection/giscanner/sourcescanner.py
Message-ID:  <C27BB0D9-665D-4D4E-96A4-096A82D7EA54@dsl-only.net>

next in thread | raw e-mail | index | archive | help
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@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 =3D 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

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


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

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

    def _parse(self, filenames):
        if not filenames:
            return
=20
        defines =3D ['__GI_SCANNER__']
        undefs =3D []
        cpp_args =3D os.environ.get('CC', 'cc').split()  # support =
CC=3D"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 =3D ['gcc']
        cpp_args +=3D os.environ.get('CPPFLAGS', '').split()
        cpp_args +=3D os.environ.get('CFLAGS', '').split()
        cpp_args +=3D ['-E', '-C', '-I.', '-']
        cpp_args +=3D self._cpp_options

        proc =3D subprocess.Popen(cpp_args,
                                stdin=3Dsubprocess.PIPE,
                                stdout=3Dsubprocess.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=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

# 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
=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
=20
+.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

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



=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?C27BB0D9-665D-4D4E-96A4-096A82D7EA54>