Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Mar 2019 17:10:28 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   32-bit powerpc: gcc8 unable to build devel/llvm60: "/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935"
Message-ID:  <1A031A56-9D18-4B12-B98B-302F94C5CF56@yahoo.com>

next in thread | raw e-mail | index | archive | help
My ports-mgmt/pouriere-devel based build attempt for building =
devel/llvm60 failed
with:

[00:00:53] [01] [00:00:00] Building devel/llvm60 | llvm60-6.0.1_6
[02:05:13] [01] [02:04:20] Saved devel/llvm60 | llvm60-6.0.1_6 wrkdir =
to: =
/usr/local/poudriere/data/wrkdirs/FBSDpowerpc-default/default/llvm60-6.0.1=
_6.tbz
[02:05:14] [01] [02:04:21] Finished devel/llvm60 | llvm60-6.0.1_6: =
Failed: build
[02:05:30] Stopping 1 builders

The log shows:

[3365/4552] : && /usr/local/bin/g++8 -fPIC -O2 -pipe  -DNDEBUG =
-Wl,-rpath=3D/usr/local/lib/gcc8  -DNDEBUG -D_GLIBCXX_USE_C99 =
-Wl,-rpath=3D/usr/local/lib/gcc8 -isystem /usr/local/include -fPIC =
-fvisibility
-inlines-hidden -Werror=3Ddate-time -std=3Dc++11 -Wall -W =
-Wno-unused-parameter -Wwrite-strings -Wcast-qual =
-Wno-missing-field-initializers -pedantic -Wno-long-long =
-Wno-maybe-uninitialized -Wdelete-non-v
irtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -pipe  =
-DNDEBUG -Wl,-rpath=3D/usr/local/lib/gcc8  -DNDEBUG -D_GLIBCXX_USE_C99 =
-Wl,-rpath=3D/usr/local/lib/gcc8 -isystem /usr/local/include=20
 -Wl,-rpath=3D/usr/local/lib/gcc8 -L/usr/local/lib/gcc8   -Wl,-z,origin  =
-Wl,-O3 -Wl,--gc-sections  =
-Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto=
/LTO.exports -shared -Wl,-so
name,libLTO.so.6 -o lib/libLTO.so.6.0.1 =
tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o =
tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib =
-Wl,-rpath,"\$ORIGIN/../lib:/usr/local/lib" lib/libLL
VM-6.0.so && :
FAILED: lib/libLTO.so.6.0.1=20
: && /usr/local/bin/g++8 -fPIC -O2 -pipe  -DNDEBUG =
-Wl,-rpath=3D/usr/local/lib/gcc8  -DNDEBUG -D_GLIBCXX_USE_C99 =
-Wl,-rpath=3D/usr/local/lib/gcc8 -isystem /usr/local/include -fPIC =
-fvisibility-inlines-hid
den -Werror=3Ddate-time -std=3Dc++11 -Wall -W -Wno-unused-parameter =
-Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic =
-Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor=20
-Wno-comment -ffunction-sections -fdata-sections -O2 -pipe  -DNDEBUG =
-Wl,-rpath=3D/usr/local/lib/gcc8  -DNDEBUG -D_GLIBCXX_USE_C99 =
-Wl,-rpath=3D/usr/local/lib/gcc8 -isystem /usr/local/include  =
-Wl,-rpath=3D
/usr/local/lib/gcc8 -L/usr/local/lib/gcc8   -Wl,-z,origin  -Wl,-O3 =
-Wl,--gc-sections  =
-Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto=
/LTO.exports -shared -Wl,-soname,libLTO.
so.6 -o lib/libLTO.so.6.0.1 =
tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o =
tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib =
-Wl,-rpath,"\$ORIGIN/../lib:/usr/local/lib" lib/libLLVM-6.0.so &&
 :
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
/usr/local/bin/ld: BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935
collect2: error: ld returned 1 exit status
. . .

The assert seems to be the last BFD_ASSERT shown below:

 /* If this is a weak defined symbol in a dynamic object, and we know
     the real definition in the dynamic object, copy interesting flags
     over to the real definition.  */
  if (h->is_weakalias)
    {
      struct elf_link_hash_entry *def =3D weakdef (h);
  =20
      /* If the real definition is defined by a regular object file,
         don't do anything special.  See the longer description in
         _bfd_elf_adjust_dynamic_symbol, below.  */
      if (def->def_regular)
        {
          h =3D def;
          while ((h =3D h->u.alias) !=3D def)
            h->is_weakalias =3D 0;
        }
      else
        {
          while (h->root.type =3D=3D bfd_link_hash_indirect)
            h =3D (struct elf_link_hash_entry *) h->root.u.i.link;
          BFD_ASSERT (h->root.type =3D=3D bfd_link_hash_defined
                      || h->root.type =3D=3D bfd_link_hash_defweak);
          BFD_ASSERT (def->def_dynamic);
          BFD_ASSERT (def->root.type =3D=3D bfd_link_hash_defined);
          (*bed->elf_backend_copy_indirect_symbol) (eif->info, def, h);
        }
. . .


Context:

# uname -apKU
FreeBSD FBSDG4S 13.0-CURRENT FreeBSD 13.0-CURRENT #14 r344955M: Fri Mar  =
8 22:39:44 PST 2019     =
markmi@FBSDFSSD:/usr/obj/powerpcvtsc_clang_gcc421/powerpc.powerpc/usr/src/=
powerpc.powerpc/sys/GENERICvtsc-NODBG  powerpc powerpc 1300014 1300014

(The 32-bit powerpc is running a gcc 4.2.1 based system. amd64 =
system-clang built the
bootstrap gcc 4.2.1 toolchain, which in turn built the system. The =
32-bit FreeBSD was
running on  a PowerMac G5 [2-sockets, 2 cores each].)

# svnlite info /usr/ports/ | grep 'Re[plv]'
Relative URL: ^/head
Repository Root: svn://svn0.us-west.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 495006
Last Changed Rev: 495006




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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1A031A56-9D18-4B12-B98B-302F94C5CF56>