aarch64 host based sysutils/u-boot-{pine64, rock64, rpi[34]} builds fail for: "aarch64-none-elf-gcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found"
Mark Millard
marklmi at yahoo.com
Tue Apr 28 21:01:03 UTC 2020
[Found a cause of the poudiere vs. not distinction.]
On 2020-Apr-28, at 13:01, Mark Millard <marklmi at yahoo.com> wrote:
>
> On 2020-Apr-28, at 09:23, Mark Millard <marklmi at yahoo.com> wrote:
>
>> On 2020-Apr-28, at 07:39, Emmanuel Vadot <manu at bidouilliste.com> wrote:
>>
>>> On Mon, 27 Apr 2020 20:14:47 -0700
>>> Mark Millard <marklmi at yahoo.com> wrote:
>>>
>>>> On 2020-Apr-27, at 17:15, Mark Millard <marklmi at yahoo.com> wrote:
>>>>
>>>>> On 2020-Apr-27, at 11:46, Emmanuel Vadot <manu at bidouilliste.com> wrote:
>>>>>
>>>>>> On Mon, 27 Apr 2020 12:32:46 +0200
>>>>>> Emmanuel Vadot <manu at bidouilliste.com> wrote:
>>>>>>
>>>>>>> On Sun, 26 Apr 2020 12:13:46 -0700
>>>>>>> . . .
>>>>>>
>>>>>> This is solved with r533162.
>>>>>> I've tested that sysutils/u-boot-pine64-lts build and boots fine.
>>>>>> Let me know if you have still any issues.
>>>>>
>>>>> The poudriere-devel runs based on updating /usr/ports content
>>>>> ended up scheduling 190 package builds, including a couple of
>>>>> llvm*'s. Depending on where in the sequence things happen, it
>>>>> could be some time before having such full-native results.
>>>>>
>>>>> In a amd64->aarch64 pouriere-devel based cross-build, with
>>>>> nxb-bin in use (a faster build environment in my context),
>>>>> I got:
>>>>>
>>>>> . . .
>>>>> gmake[4]: Leaving directory '/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build/aarch64-none-elf/ilp32/libgcc'
>>>>> gmake[3]: Leaving directory '/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build/aarch64-none-elf/libgcc'
>>>>> gmake[2]: Leaving directory '/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build/aarch64-none-elf/libgcc'
>>>>> gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build'
>>>>> ====> Compressing man pages (compress-man)
>>>>> ===========================================================================
>>>>> =======================<phase: package >============================
>>>>> ===> Building package for aarch64-none-elf-gcc-8.4.0_1
>>>>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/stage/usr/local/lib/gcc/aarch64-none-elf/8.4.0/plugin/gtype.state:No such file or directory
>>>>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/stage/usr/local/lib/gcc/aarch64-none-elf/8.4.0/plugin/include/ada/gcc-interface/ada-tree.def:No such file or direct
>>>>> ory
>>>>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/stage/usr/local/lib/gcc/aarch64-none-elf/8.4.0/plugin/include/addresses.h:No such file or directory
>>>>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/stage/usr/local/lib/gcc/aarch64-none-elf/8.4.0/plugin/include/alias.h:No such file or directory
>>>>> . . . (long list) . . .
>>>>>
>>>>>
>>>>> That leads to:
>>>>>
>>>>> [00:29:06] [04] [00:10:01] Saved devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 wrkdir to: /usr/local/poudriere/data/wrkdirs/FBSDFSSDjailCortexA53-default/default/aarch64-none-elf-gcc-8.4.0_1.tar
>>>>> [00:29:10] [04] [00:10:05] Finished devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1: Failed: package
>>>>> [00:29:12] [04] [00:10:07] Skipping sysutils/atf-rk3328 | atf-rk3328-v2.3: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>> [00:29:12] [04] [00:10:07] Skipping sysutils/atf-sun50i_a64 | atf-sun50i_a64-v2.3: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>> [00:29:12] [04] [00:10:07] Skipping sysutils/u-boot-pine64 | u-boot-pine64-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>> [00:29:12] [04] [00:10:07] Skipping sysutils/u-boot-rock64 | u-boot-rock64-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>> [00:29:12] [04] [00:10:07] Skipping sysutils/u-boot-rpi3 | u-boot-rpi3-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>> [00:29:12] [04] [00:10:07] Skipping sysutils/u-boot-rpi4 | u-boot-rpi4-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>>
>>>>>
>>>>>
>>>>> I'm guessing that the full-native builds will do similarly.
>>>>> But we will eventually see.
>>>>
>>>> One of the aarch64 environments finally got there:
>>>>
>>>> [07:40:23] [02] [00:23:04] Saved devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 wrkdir to: /usr/local/poudriere/data/wrkdirs/FBSDFSSDjailCortexA57-default/default/aarch64-none-elf-gcc-8.4.0_1.tar
>>>> [07:40:42] [02] [00:23:23] Finished devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1: Failed: package
>>>> [07:40:55] [02] [00:23:36] Skipping sysutils/u-boot-pine64 | u-boot-pine64-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>> [07:40:55] [02] [00:23:36] Skipping sysutils/u-boot-rock64 | u-boot-rock64-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>> [07:40:55] [02] [00:23:36] Skipping sysutils/u-boot-rpi3 | u-boot-rpi3-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>> [07:40:55] [02] [00:23:36] Skipping sysutils/u-boot-rpi4 | u-boot-rpi4-2020.04: Dependent port devel/aarch64-none-elf-gcc | aarch64-none-elf-gcc-8.4.0_1 failed
>>>>
>>>> It failed for the same sorts of reasons as the cross build:
>>>>
>>>> =======================<phase: package >============================
>>>> ===> Building package for aarch64-none-elf-gcc-8.4.0_1
>>>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/stage/usr/local/lib/gcc/aarch64-none-elf/8.4.0/plugin/gtype.state:No such file or directory
>>>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/stage/usr/local/lib/gcc/aarch64-none-elf/8.4.0/plugin/include/ada/gcc-interface/ada-tree.def:No such file or direct
>>>> ory
>>>> . . .
>>>>
>>>
>>> I can reproduce that with poudriere too.
>>> For some reason this doesn't happened when doing a make package ...
>>
>> It also happened for the poudriere-based build of
>> devel/arm-none-eabi-gcc :
>>
>> [00:26:15] [07] [00:13:23] Saving devel/arm-none-eabi-gcc | arm-none-eabi-gcc-8.4.0_1 wrkdir
>> [00:26:23] [07] [00:13:31] Saved devel/arm-none-eabi-gcc | arm-none-eabi-gcc-8.4.0_1 wrkdir to: /usr/local/poudriere/data/wrkdirs/FBSDFSSDjailCortexA53-default/default/arm-none-eabi-gcc-8.4.0_1.tar
>> [00:26:28] [07] [00:13:36] Finished devel/arm-none-eabi-gcc | arm-none-eabi-gcc-8.4.0_1: Failed: package
>> [00:26:30] [07] [00:13:38] Skipping sysutils/u-boot-orangepi-plus-2e | u-boot-orangepi-plus-2e-2020.04: Dependent port devel/arm-none-eabi-gcc | arm-none-eabi-gcc-8.4.0_1 failed
>> [00:26:30] [07] [00:13:38] Skipping sysutils/u-boot-rpi2 | u-boot-rpi2-2020.04: Dependent port devel/arm-none-eabi-gcc | arm-none-eabi-gcc-8.4.0_1 failed
>> [00:26:30] [07] [00:13:38] Skipping sysutils/u-boot-sinovoip-bpi-m3 | u-boot-sinovoip-bpi-m3-2020.04: Dependent port devel/arm-none-eabi-gcc | arm-none-eabi-gcc-8.4.0_1 failed
>>
>> because of:
>>
>> =======================<phase: package >============================
>> ===> Building package for arm-none-eabi-gcc-8.4.0_1
>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/8.4.0/plugin/gtype.state:No such file or directory
>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/8.4.0/plugin/include/ada/gcc-interface/ada-tree.def:No such file or directory
>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/8.4.0/plugin/include/addresses.h:No such file or directory
>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/8.4.0/plugin/include/alias.h:No such file or directory
>> pkg-static: Unable to access file /wrkdirs/usr/ports/devel/arm-none-eabi-gcc/work/stage/usr/local/lib/gcc/arm-none-eabi/8.4.0/plugin/include/all-tree.def:No such file or directory
>> . . .
>>
>
> Some other differences between a poudriere based build
> and a portmaster based build for the aarch64 case follow.
> The paths with /mnt/prefixes are to the portmaster based
> build:
>
> # diff -r /wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/ /mnt/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/ | grep -i "enable_plugin"
> < enable_plugin = no
>> enable_plugin = yes
> < /* #undef ENABLE_PLUGIN */
>> #define ENABLE_PLUGIN 1
> < enable_plugin='no'
>> enable_plugin='yes'
>> #define ENABLE_PLUGIN 1
> < S["enable_plugin"]="no"
>> S["enable_plugin"]="yes"
>> D["ENABLE_PLUGIN"]=" 1"
>
> While looking for differences that might contribute to the
> "no"s above, I ran into something possibly unrelated but
> important in the future . . .
>
> One thing is that I have a WITHOUT_BINUTILS= system build as
> part of testing that such will work when if fully goes away.
> I see differences in part based on that:
>
> 1383c1382,1383
> < configure:8340: result: no
> ---
>> configure:8326: found /usr/local/bin/as
>> configure:8337: result: as
> 1407c1407,1408
> < configure:9740: result: no
> ---
>> configure:9726: found /usr/local/bin/objdump
>> configure:9737: result: objdump
> . . .
> 2369a2371
>> ac_cv_prog_AS=as
> 2377a2380
>> ac_cv_prog_OBJDUMP=objdump
>
> (No evidence so far that such contributes to lack of
> plugins being enabled. It is just a difference that
> I ran into while looking.)
>
> The devel/*-none-*-gcc examples do not cause
> /usr/local/bin/ instances of as or objdump to
> exist in poudriere-devel contexts, even when
> the system does not have the commands of itself.
> At some point this likely will need to change.
>
>
>
> As I have time I'll look around more at the build
> materials and see if I find an explanation for
> plugins not being enabled under poudriere-devel
> based builds.
Turns out that objdump is important and makes the
distinction in my context . . .
work/gcc-8.4.0/config/gcc-plugin.m4 has:
. . .
AC_DEFUN([GCC_ENABLE_PLUGINS],
[# Check for plugin support
AC_ARG_ENABLE(plugin,
[AS_HELP_STRING([--enable-plugin], [enable plugin support])],
enable_plugin=$enableval,
enable_plugin=yes; default_plugin=yes)
pluginlibs=
plugin_check=yes
case "${host}" in
. . .
*)
if test x$build = x$host; then
export_sym_check="objdump${exeext} -T"
elif test x$host = x$target; then
export_sym_check="$gcc_cv_objdump -T"
else
export_sym_check=
fi
;;
esac
. . .
if test x"$enable_plugin" = x"yes" -a x"$plugin_check" = x"yes"; then
AC_MSG_CHECKING([for exported symbols])
if test "x$export_sym_check" != x; then
echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
${CC} ${CFLAGS} ${LDFLAGS} conftest.c -o conftest$ac_exeext > /dev/null 2>&1
if $export_sym_check conftest$ac_exeext | grep foobar > /dev/null; then
: # No need to use a flag
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for -rdynamic])
${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c -o conftest$ac_exeext > /dev/null 2>&1
if $export_sym_check conftest$ac_exeext | grep foobar > /dev/null; then
plugin_rdynamic=yes
pluginlibs="-rdynamic"
else
plugin_rdynamic=no
enable_plugin=no
fi
AC_MSG_RESULT([$plugin_rdynamic])
fi
else
AC_MSG_RESULT([unable to check])
fi
. . .
But (both the poudriere-devel based build and the portmaster
build show such so I picked to show just one):
/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build/gcc/config.log:gcc_cv_objdump=/usr/local/aarch64-none-elf/bin/objdump
/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build/gcc/config.log:gcc_cv_objdump='/usr/local/aarch64-none-elf/bin/objdump'
/wrkdirs/usr/ports/devel/aarch64-none-elf-gcc/work/.build/gcc/config.cache:gcc_cv_objdump=${gcc_cv_objdump=/usr/local/aarch64-none-elf/bin/objdump}
Under poudiere-devel there is no /usr/local/aarch64-none-elf/bin/objdump path.
Under make/portmaster there may be an old /usr/local/aarch64-none-elf/bin/objdump path.
In my environments (showing one example context):
# ls -ldT /usr/local/aarch64-none-elf/bin/objdump
-r-xr-xr-x 2 root wheel 8593272 Jan 30 01:05:50 2020 /usr/local/aarch64-none-elf/bin/objdump
So in portmaster (or make) the old /usr/local/aarch64-none-elf/bin/objdump
is used but in poudriere the path used fails and that failure is not
handled distinctly as "objdump tool missing".
It looks like devel/aarch64-none-elf-gcc/Makefile would need
changes for WITHOUT_BINUTILS= contexts in order to make sure
that an objdump exists via a known/used path, including in
poudriere based builds.
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-arm
mailing list