Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2017 10:26:35 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   head -r326192: Under clang pkg-static (1.10.2) fails to link on powerpc64: "libtool: warning: complete static linking is impossible in this configuration" (later crashes)
Message-ID:  <34DAC1A0-81A5-4381-BF25-07BF7C42A761@dsl-only.net>

next in thread | raw e-mail | index | archive | help
[I experiment with clang based worlds and kernels
on powerpc64 and powerpc.]

This was a poudriere-style build. pkg builds too early
to allow devel/binutils or devel/powerpc64-binutils
to be build first in order to use that linker or other
such utilities. Thus, /usr/bin/ld is in use. (lld is
not yet an option, last I knew anyway.)

This make poudriere ineffective for the powerpc64
context with clang as the system compiler.=20

libtool: warning: complete static linking is impossible in this =
configuration

/usr/libexec/gdb shows:
(/usr/local/bin/gdb core dumps)

Core was generated by `/usr/bin/ld --eh-frame-hdr -dynamic-linker =
/libexec/ld-elf.so.1 --enable-new-dta'.
. . .
Program terminated with signal 11, Segmentation fault.
#0  0x000000001002e170 in ppc64_elf_tls_optimize (obfd=3D<value =
optimized out>, info=3D<value optimized out>) at =
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elf6=
4-ppc.c:7172
7172			      for (ent =3D =
htab->tls_get_addr->elf.plt.plist;
(gdb) bt
#0  0x000000001002e170 in ppc64_elf_tls_optimize (obfd=3D<value =
optimized out>, info=3D<value optimized out>) at =
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elf6=
4-ppc.c:7172
#1  0x0000000010001034 in ppc_before_allocation () at =
eelf64ppc_fbsd.c:204
#2  0x0000000010009be4 in ldemul_before_allocation () at =
/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldemul.c:=
78
#3  0x0000000010017b00 in lang_process () at =
/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldlang.c:=
5785
#4  0x0000000010021ce0 in main (argc=3D0, argv=3D<value optimized out>) =
at =
/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldmain.c:=
459
#5  0x00000000100004a8 in _start (argc=3D0, argv=3D0x50a29380, =
env=3D0x50f0e5c8, obj=3D<value optimized out>, cleanup=3D<value =
optimized out>, ps_strings=3D<value optimized out>)
    at /usr/src/lib/csu/powerpc64/crt1.c:94
Current language:  auto; currently minimal


--- pkg-static ---
/bin/sh ../libtool  --tag=3DCC    --mode=3Dlink cc  -O2 -pipe  =
-Wno-error -g -fno-strict-aliasing -Wall -Wno-unused-function =
-D_BSD_SOURCE -DINET6=3D1  -all-static -Wl,--enable-new-dtags -o =
pkg-static  pkg-add.o pkg-alias.o  pkg-annotate.o pkg-audit.o  =
pkg-autoremove.o pkg-backup.o  pkg-check.o pkg-clean.o pkg-config.o  =
pkg-convert.o pkg-create.o  pkg-delete.o pkg-event.o pkg-fetch.o  =
pkg-globals.o pkg-info.o pkg-install.o  pkg-lock.o pkg-main.o =
pkg-plugins.o  pkg-query.o pkg-register.o pkg-repo.o  pkg-rquery.o =
pkg-search.o pkg-set.o  pkg-shell.o pkg-shlib.o pkg-ssh.o  pkg-stats.o =
pkg-update.o  pkg-updating.o pkg-upgrade.o  pkg-utils.o pkg-version.o =
pkg-which.o  ../libpkg/libpkg_static.la  ../compat/libbsd_compat.la =
-ljail  -larchive -lz -lutil -lbz2 -llzma -lssl  -lcrypto -lm  -lelf  =
-ljail -larchive -lz -lbz2 -llzma
libtool: warning: complete static linking is impossible in this =
configuration
libtool: link: cc -O2 -pipe -Wno-error -g -fno-strict-aliasing -Wall =
-Wno-unused-function -D_BSD_SOURCE -DINET6=3D1 -Wl,--enable-new-dtags -o =
pkg-static pkg-add.o pkg-alias.o pkg-annotate.o pkg-audit.o =
pkg-autoremove.o pkg-backup.o pkg-check.o pkg-clean.o pkg-config.o =
pkg-convert.o pkg-create.o pkg-delete.o pkg-event.o pkg-fetch.o =
pkg-globals.o pkg-info.o pkg-install.o pkg-lock.o pkg-main.o =
pkg-plugins.o pkg-query.o pkg-register.o pkg-repo.o pkg-rquery.o =
pkg-search.o pkg-set.o pkg-shell.o pkg-shlib.o pkg-ssh.o pkg-stats.o =
pkg-update.o pkg-updating.o pkg-upgrade.o pkg-utils.o pkg-version.o =
pkg-which.o  ../libpkg/.libs/libpkg_static.a =
../compat/.libs/libbsd_compat.a -lutil -lssl -lcrypto -lm -lelf -ljail =
-larchive -lz -lbz2 -llzma
. . .
--- pkg-static ---
cc: error: unable to execute command: Segmentation fault (core dumped)
cc: error: linker command failed due to signal (use -v to see =
invocation)
*** [pkg-static] Error code 254

make[4]: stopped in =
/wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.10.2/src
1 error

make[4]: stopped in =
/wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.10.2/src
*** [all-recursive] Error code 1

make[3]: stopped in /wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.10.2
1 error

make[3]: stopped in /wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.10.2
*** [all] Error code 2

make[2]: stopped in /wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.10.2
1 error

make[2]: stopped in /wrkdirs/usr/ports/ports-mgmt/pkg/work/pkg-1.10.2
=3D=3D=3D> Compilation failed unexpectedly.





Context details:

# uname -apKU
FreeBSD FBSDG5L 12.0-CURRENT FreeBSD 12.0-CURRENT  r326192M  powerpc =
powerpc64 1200054 1200054

# 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: 455204
Last Changed Rev: 455204

(The last before FLAVORS was enabled.)

=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?34DAC1A0-81A5-4381-BF25-07BF7C42A761>