ports head -r484652: multimedia/gstreamer1-libav fails to amd64 -> armv7 cross build: error: /usr/local/bin/as: unrecognized option `-isystem'

Mark Millard marklmi at yahoo.com
Sun Nov 11 14:46:18 UTC 2018



On 2018-Nov-11, at 05:26, Jan Beich <jbeich at FreeBSD.org> wrote:

> Mark Millard <marklmi at yahoo.com> writes:
> 
>> On 2018-Nov-11, at 03:55, Jan Beich <jbeich at FreeBSD.org> wrote:
>> 
>>> Mark Millard via freebsd-multimedia <freebsd-multimedia at freebsd.org>
>>> writes:
>>> 
>>>> poudirere-devel reported:
>>>> 
>>>> [00:38:41] [03] [00:02:01] Saved multimedia/gstreamer1-libav | gstreamer1-libav-1.14.4_1 wrkdir to: /usr/local/poudriere/data/wrkdirs/FBSDFSSDjailArmV7-default/default/gstreamer1-libav-1.14.4_1.tbz
>>>> [00:38:42] [03] [00:02:02] Finished multimedia/gstreamer1-libav | gstreamer1-libav-1.14.4_1: Failed: configure
>>>> 
>>> 
>>> I can't reproduce on 13.0 armv7 (clang 7.0.1): https://ptpb.pw/wdCK
>>> 
>>>> /usr/local/bin/as -mcpu=cortex-a7 -isystem /usr/local/include -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -no-integrated-as -march=armv7-a -fPIC -c -o /tmp/ffconf.mw9w5KeR/test.o /tmp/ffconf.mw9w5KeR/test.S
>>>> /usr/local/bin/as: unrecognized option `-isystem'
>>> 
>>> -isystem originates from USES=localbase defined in the port's Makefile.
>>> No clue how you've got ASFLAGS poisoned by CPPFLAGS or CFLAGS, though.
>>> 
>>> Can you provide poudriere log?
>> 
>> Sure. But first for reference:
>> 
>> # svnlite status /usr/ports/multimedia/gstreamer1-libav/
>> # 
>> 
>> So, no local changes.
>> 
>> As for the log . . .
> [...]
>> --CONFIGURE_ENV--
>> ... ADDR2LINE="/usr/local/bin/addr2line" AR="/usr/local/bin/ar" AS="/usr/local/bin/as" CPPFILT="/usr/local/bin/c++filt" GPROF="/usr/local/bin/gprof" LD="/usr/local/bin/ld" NM="/usr/local/bin/nm" OBJCOPY="/usr/local/bin/objcopy" OBJDUMP="/usr/local/bin/objdump" RANLIB="/usr/local/bin/ranlib" READELF="/usr/local/bin/readelf" SIZE="/usr/local/bin/size" STRINGS="/usr/local/bin/strings" ...
>> --End CONFIGURE_ENV--
> [...]
>> ===>   gstreamer1-libav-1.14.4_1 depends on executable: as - not found
>> ===>   Installing existing package /packages/All/binutils-2.30_5,1.txz
>> Installing binutils-2.30_5,1...
>> `-- Installing gettext-runtime-0.19.8.1_2...
>> |   `-- Installing indexinfo-0.3.1...
>> |   `-- Extracting indexinfo-0.3.1: .... done
>> `-- Extracting gettext-runtime-0.19.8.1_2: .......... done
>> Extracting binutils-2.30_5,1: .......... done
> 
> Can you track down what defines USE_BINUTILS=yes on armv7 ?

/usr/ports/multimedia/gstreamer1-libav/Makefile has:

FFMPEG_VARS_OFF+=       LLD_UNSAFE=yes # aarch64

(The comment about aarch64 is not indicating conditional
logic. My guess it just indicates a context where LLD_UNSAFE
is required, rather than conceptually optional --even if
always currently applied for the FFMEG_VAR_OFF context.)

The one place with USE_BINUTILS=yes in /usr/ports/Mk/bsd.port.mk
is:

.if defined(LLD_UNSAFE) && ${/usr/bin/ld:L:tA} == /usr/bin/ld.lld
LDFLAGS+=       -fuse-ld=bfd
BINARY_ALIAS+=  ld=${LD}
.  if !defined(USE_BINUTILS)
.    if exists(/usr/bin/ld.bfd)
LD=     /usr/bin/ld.bfd
CONFIGURE_ENV+= LD=${LD}
MAKE_ENV+=      LD=${LD}
.    else
USE_BINUTILS=   yes
.    endif
.  endif
.endif

Note that WITH_BINTUILS/WITHOUT_BINUTILS has buildworld defaults
of:

     WITHOUT_BINUTILS
             Set to not build or install binutils (as, ld, and objdump) as
             part of the normal system build.  The resulting system cannot
             build programs from source.

             This is a default setting on arm64/aarch64 and riscv/riscv64.
             When set, it enforces these options:

             WITHOUT_GDB

     WITH_BINUTILS
             Set to build and install binutils (as, ld, and objdump) as part
             of the normal system build.

             This is a default setting on amd64/amd64, arm/arm, arm/armv6,
             arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el,
             mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf,
             mips/mips64elhf, mips/mips64hf, powerpc/powerpc,
             powerpc/powerpc64, powerpc/powerpcspe and sparc64/sparc64.

But at this stage in many contexts WITHOUT_BINUTILS= can validly
be manually set.

I'd originally done that for /usr/obj/DESTDIRs/clang-armv7-installworld-poud/
and other armv7 material until I wanted to use /libexec/gdb inside that
context to get a backtrace and related information for another problem. (Well
after my report of the gstreamer1-linav issue.) I'll likely be going back to
using WITHOUT_BINUTILS=  now that I've reported the detail for a
qemu-arm-static failure.

For amd64, armv7, and powerpc64 I only have WITH_BINUTILS= in order to allow
WITH_GDB= when it seems appropriate for what is going on. (Sometime contexts
are not appropriate for ports or are not ready for having ports yet.)



> See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233137

My understanding is that /usr/bin/ld.bfd does not work for
aarch64 and so WITHOUT_BINUTILS= is more of a requirement.

So if lld is a problem, then USE_BINUTILS=yes ends up being
nearly required. There is devel/aarch64-binutils as an
alternative.

FFMPEG_VARS_OFF+=       LLD_UNSAFE=yes # aarch64

suggests that, for aarch64, USE_BINUTILS=yes is almost
required for that context.




Side notes:

There is no devel/armv7-binutils or any devel/arm-binutils but
there are various special purpose devel/arm-*-binutils ones.

I ignore above: base/binutils and base/gcc and their
use.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-multimedia mailing list