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)

2017-12-04 Thread Mark Millard
[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. 

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  0x1002e170 in ppc64_elf_tls_optimize (obfd=, 
info=) at 
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elf64-ppc.c:7172
7172  for (ent = htab->tls_get_addr->elf.plt.plist;
(gdb) bt
#0  0x1002e170 in ppc64_elf_tls_optimize (obfd=, 
info=) at 
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elf64-ppc.c:7172
#1  0x10001034 in ppc_before_allocation () at eelf64ppc_fbsd.c:204
#2  0x10009be4 in ldemul_before_allocation () at 
/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldemul.c:78
#3  0x10017b00 in lang_process () at 
/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldlang.c:5785
#4  0x10021ce0 in main (argc=0, argv=) at 
/usr/src/gnu/usr.bin/binutils/ld/../../../../contrib/binutils/ld/ldmain.c:459
#5  0x14a8 in _start (argc=0, argv=0x50a29380, env=0x50f0e5c8, 
obj=, cleanup=, ps_strings=)
at /usr/src/lib/csu/powerpc64/crt1.c:94
Current language:  auto; currently minimal


--- pkg-static ---
/bin/sh ../libtool  --tag=CC--mode=link cc  -O2 -pipe  -Wno-error -g 
-fno-strict-aliasing -Wall -Wno-unused-function -D_BSD_SOURCE -DINET6=1  
-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=1 -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
===> 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.)

===
Mark Millard
markmi at dsl-only.net

___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: poudriere jail -c -j JNAME -m null -M PREBUILT-WORLD-PATH -S /usr/src -v 12.0-CURRENT complains about "DIrectory not empty" for PREBUILT-WORLD-PATH

2017-12-04 Thread Bryan Drewery
On 12/3/2017 8:29 PM, Mark Millard wrote:
> Note: /usr/ports/ (and so poudriere-devel) as of -r425204 
> (poudriere-devel-3.2.99.20171129).
> 
> I expect that the below is from ports-mgmt/poudriere-=devel
> -r454996 and its:
> 
>   - ports/jail -c NOZFS: Consider non-empty-already-existing-directory a 
> failure
> 
> where the change did not cover an explicit use of -m null also
> being involved to deliberately being using a pre-built
> world that is located via use of -M PATH .
> 
> [There is one other side note about a potential
> issue later below.]
> 
> # poudriere jail -c -j FBSDjailRPI2 -m null -M 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud -S /usr/src -v 12.0-CURRENT
> [00:00:00] Creating FBSDjailRPI2 fs at 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud... fail
> [00:00:00] Error: Directory not empty at 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud
> 
> # ls -lTdt /usr/obj/DESTDIRs/clang-armv7-installworld-poud/*
> drwxr-xr-x  26 root  wheel  2048 Nov 27 00:33:01 2017 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud/etc
> drwxr-xr-x   2 root  wheel  2560 Nov 27 00:29:51 2017 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud/rescue
> . . .
> 
> (So: a pre-built world, created via a cross build and
> copied over beforehand.)
> 
> # poudriere jail -c -j FBSDjailRPI2 -m null -M 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud -S /usr/src -v 12.0-CURRENT
> [00:00:00] Creating FBSDjailRPI2 fs at 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud... fail
> [00:00:00] Error: Directory not empty at 
> /usr/obj/DESTDIRs/clang-armv7-installworld-poud

Yup will fix for 3.2.3 today.

> 
> 
> /usr/local/etc/poudriere.conf has:
> 
> NO_ZFS=yes
> 
> 
> /usr/local/share/poudriere/include/fs.sh has:
> 
> createfs() {
> [ $# -ne 3 ] && eargs createfs name mnt fs
> local name mnt fs
> name=$1
> mnt=$(echo $2 | sed -e "s,//,/,g")
> fs=$3
> 
> [ -z "${NO_ZFS}" ] || fs=none
> 
> if [ -n "${fs}" -a "${fs}" != "none" ]; then
> . . .
> else
> msg_n "Creating ${name} fs at ${mnt}..."
> if ! mkdir -p "${mnt}"; then
> echo " fail"
> err 1 "Failed to create directory ${mnt}"
> fi
> # If the directory is non-empty then we didn't create it.
> if ! dirempty "${mnt}"; then
> echo " fail"
> err 1 "Directory not empty at ${mnt}"
> fi
> echo " done"
> fi
> }
> 
> For -m null here -M /usr/obj/DESTDIRs/clang-armv7-installworld-poud
> should point to a non-empty directory as far as I can tell. And
> it does. But that leads to the above code rejecting the -M
> path.
> 
> 
> 
> [Note: I also question, if, with -S /usr/src
> in use, the SRC_BASE assignment below is
> correct.]

Yeah it's a bit off. I have a pending bug to fix here from earlier
reports from you as well that I haven't gotten to yet.

> 
> /usr/local/share/poudriere/jail.sh has:
> 
> create_jail() {
> [ "${JAILNAME#*.*}" = "${JAILNAME}" ] ||
> err 1 "The jailname cannot contain a period (.). See jail(8)"
> 
> if [ "${METHOD}" = "null" ]; then
> [ -z "${JAILMNT}" ] && \
> err 1 "Must set -M to path of jail to use"
> [ "${JAILMNT}" = "/" ] && \
> err 1 "Cannot use / for -M"
> fi
> . . .
> SRC_BASE="${JAILMNT}/usr/src"
> 
> case ${METHOD} in
> . . .
> null)
> JAILFS=none
> FCT=
> ;;
> esac
> 
> if [ "${JAILFS}" != "none" ]; then
> [ -d "${JAILMNT}" ] && \
> err 1 "Directory ${JAILMNT} already exists"
> fi
> 
> createfs ${JAILNAME} ${JAILMNT} ${JAILFS:-none}
> . . .
> 
> 
> 
> ===
> Mark Millard
> markmi at dsl-only.net
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: poudriere jail -c -j JNAME -m null -M PREBUILT-WORLD-PATH -S /usr/src -v 12.0-CURRENT complains about "DIrectory not empty" for PREBUILT-WORLD-PATH

2017-12-04 Thread Bryan Drewery
On 12/3/2017 8:29 PM, Mark Millard wrote:
> Note: /usr/ports/ (and so poudriere-devel) as of -r425204 
> (poudriere-devel-3.2.99.20171129).
> 
> I expect that the below is from ports-mgmt/poudriere-=devel
> -r454996 and its:
> 
>   - ports/jail -c NOZFS: Consider non-empty-already-existing-directory a 
> failure
> 
> where the change did not cover an explicit use of -m null also
> being involved to deliberately being using a pre-built
> world that is located via use of -M PATH .
> 
> [There is one other side note about a potential
> issue later below.]

This and the -S issue should both be fixed in
poudriere-devel-3.2.99.20171204_1
I will release it to 3.2.3 later today. Please let me know if it works
for you.

-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: poudriere jail -c -j JNAME -m null -M PREBUILT-WORLD-PATH -S /usr/src -v 12.0-CURRENT complains about "DIrectory not empty" for PREBUILT-WORLD-PATH

2017-12-04 Thread Mark Millard

On 2017-Dec-4, at 3:54 PM, Bryan Drewery  wrote:

> On 12/3/2017 8:29 PM, Mark Millard wrote:
>> Note: /usr/ports/ (and so poudriere-devel) as of -r425204 
>> (poudriere-devel-3.2.99.20171129).
>> 
>> I expect that the below is from ports-mgmt/poudriere-=devel
>> -r454996 and its:
>> 
>>  - ports/jail -c NOZFS: Consider non-empty-already-existing-directory a 
>> failure
>> 
>> where the change did not cover an explicit use of -m null also
>> being involved to deliberately being using a pre-built
>> world that is located via use of -M PATH .
>> 
>> [There is one other side note about a potential
>> issue later below.]
> 
> This and the -S issue should both be fixed in
> poudriere-devel-3.2.99.20171204_1
> I will release it to 3.2.3 later today. Please let me know if it works
> for you.

Thanks.

I've got competing non-FreeBSD time and
multiple issues across multiple TARGET_ARCH
environments, just trying to get to
/usr/ports/ -r455204 (the last before
FLAVORS was enabled). It may be a while
before my /usr/ports/ vintage catches up to
referencing the 3.2.3 vintage. I have more
to analyze and report on, probably no
ports-mgmt/poudriere-devel fixes being
involved(?). I'm not sure when I'll get
to that analysis.

When I get that far, I'll try to remember
to let you know.


On powerpc64 there is a blocking issue
for my system-clang-based context and
building pkg in poudriere (or anywhere
without a devel/powerpc64-binutils
equivalent being available at the time):
It used to be that the system binutils
was sufficient for that but now it is
not. This need not be viewed as
poudriere's problem but does stop
my testing poudriere in that context.
With a /usr/ports vintage with FLAVORS
enabled I'll likely be limited to direct
Makefile use on clang-based powerpc64,
if understand the state of things
correctly.

Back to the non-FreeBSD activity. . .

===
Mark Millard
markmi at dsl-only.net


___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


[Bug 223848] mips64 native-xtools build failure

2017-12-04 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223848

Sean Bruno  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|New |Closed

--- Comment #1 from Sean Bruno  ---
Author: bdrewery
Date: Tue Dec  5 02:23:36 2017
New Revision: 326553
URL: https://svnweb.freebsd.org/changeset/base/326553

Log:
  native-xtools: Fix build without META_MODE for GCC archs.

  The initial kernel-toolchain is built with TARGET=MACHINE but
  we want GCC to have files generated for TARGET=NXB_TARGET
  instead later on.  Just clean the files between building of
  the toolchain and nxb binaries which will let it rebuild
  when needed.

  Reported by:  sbruno
  X-MFC-With:   r325001
  MFC after:1 month
  Sponsored by: Dell EMC

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"