From owner-freebsd-arch@FreeBSD.ORG Fri Jul 18 17:55:50 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8EF5B4D; Fri, 18 Jul 2014 17:55:50 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60CAB2D34; Fri, 18 Jul 2014 17:55:50 +0000 (UTC) Received: from [192.168.200.205] (c-50-131-5-126.hsd1.ca.comcast.net [50.131.5.126]) (using SSLv3 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id D5F17193DD9; Fri, 18 Jul 2014 17:55:48 +0000 (UTC) Subject: Re: Total confusion over toolchain/xdev behavior From: Sean Bruno Reply-To: sbruno@freebsd.org To: freebsd-arch@freebsd.org In-Reply-To: <1404688077.1059.115.camel@bruno> References: <1404688077.1059.115.camel@bruno> Content-Type: text/plain; charset="us-ascii" Date: Fri, 18 Jul 2014 10:55:47 -0700 Message-ID: <1405706147.19254.17.camel@bruno> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2014 17:55:50 -0000 On Sun, 2014-07-06 at 16:07 -0700, Sean Bruno wrote: > Objective: install an xcompile toolchain into a jail for use by > poudriere during arm/mips/sparc/power ports pkgs builds. The build > should be possible from a non-root user. >=20 > As far as I can tell, the xdev target is completely busted for > non-clang > arch's right now as it tries to build clang no matter what I do. Its > missing some pretty key documentation to making it work correctly, so > a > lot of my attempts have been "guess and check" with verbose make. >=20 >=20 Quite a bit of success with one blocking failure. Thanks to Warner, Baptiste and Dimitry for plugging along through some of my ranting (on bcc here). The xdev target can be used to produce a compiler toolchain that can be used to build ports. However, final linking seems to fail and makes it impossible to use for building many, many ports. Regardless of the cross compile bits, simply using the xdev target for building ports natively on amd64 for amd64 manifests this issue, this leads me to believe that xdev is *not* building the tool chain correctly. There is no chroot/jail/emualtion involved in this test case. My test case: 1. build amd64 xdev tool chain: make -s -j4 xdev XDEV=3Damd64 XDEV_ARCH=3Damd64 2. modify make.conf to use this toolchain: CC=3D/usr/amd64-freebsd/usr/bin/cc CPP=3D/usr/amd64-freebsd/usr/bin/cpp CXX=3D/usr/amd64-freebsd/usr/bin/cc++ AS=3D/usr/amd64-freebsd/usr/bin/as NM=3D/usr/amd64-freebsd/usr/bin/nm RANLIB=3D/usr/amd64-freebsd/usr/bin/ranlib LD=3D/usr/amd64-freebsd/usr/bin/ld OBJCOPY=3D/usr/amd64-freebsd/usr/bin/objcopy SIZE=3D/usr/amd64-freebsd/usr/bin/llvm-size STRIPBIN=3D/usr/amd64-freebsd/usr/bin/strip 3. attempt to build ports-mgmt/pkg *NOTE* if you add -lbsdxml to CFLAGS this will not happen. Other packages manfiest similar issues, with different libs. --- pkg-static --- /usr/amd64-freebsd/usr/bin/cc -static -O2 -pipe -fno-strict-aliasing -DPORTSDIR=3D\"/usr/local/poudriere/ports/default\" -I../libpkg -I/usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2.7/pkg/../e= xternal/uthash -I/usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pk= g-1.2.7/pkg/../external/expat/lib -std=3Dgnu99 -fstack-protector -Wsystem-h= eaders -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prot= otypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwri= te-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscri= pts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno= -pointer-sign -Wmissing-variable-declarations -Wno-empty-body -Wno-string-p= lus-int -Wno-unused-const-variable -Qunused-arguments -static -o pkg-stati= c add.o annotate.o audit.o autoremove.o backup.o check.o clean.o config.o c= onvert.o create.o delete.o event.o info.o install.o lock.o main.o plugins.o= progressmeter.o query.o register.o repo.o rquery.o update.o upgrade.o sear= ch.o set.o shlib.o updating.o utils.o version.o which.o fetch.o shell.o sta= ts.o ssh.o -L/usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2= .7/pkg/../libpkg -lpkg -ledit -larchive -lutil -lpthread -lsbuf -lfe= tch -lssl -lcrypto -lmd -lz -lbz2 -llzma -ljail -lelf -larchive -lsb= uf -lfetch -lpthread -lssl -lcrypto -lmd -lz -lbz2 -llzma -ledit -= lncursesw --- pkg --- /usr/amd64-freebsd/usr/bin/cc -O2 -pipe -fno-strict-aliasing -DPORTSDIR=3D\"/usr/local/poudriere/ports/default\" -I../libpkg -I/usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2.7/pkg/../e= xternal/uthash -I/usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pk= g-1.2.7/pkg/../external/expat/lib -std=3Dgnu99 -fstack-protector -Wsystem-h= eaders -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prot= otypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwri= te-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscri= pts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno= -pointer-sign -Wmissing-variable-declarations -Wno-empty-body -Wno-string-p= lus-int -Wno-unused-const-variable -Qunused-arguments -Wl,-rpath=3D/usr/li= b:/usr/local/lib -o pkg add.o annotate.o audit.o autoremove.o backup.o chec= k.o clean.o config.o convert.o create.o delete.o event.o info.o install.o l= ock.o main.o plugins.o progressmeter.o query.o register.o repo.o rquery.o u= pdate.o upgrade.o search.o set.o shlib.o updating.o utils.o version.o which= .o fetch.o shell.o stats.o ssh.o -L/usr/local/poudriere/ports/default/ports= -mgmt/pkg/work/pkg-1.2.7/pkg/../libpkg -lpkg -ledit -larchive -lutil -= lpthread -lsbuf -lfetch -lssl -lcrypto -lmd -lz -lbz2 -llzma -ljail /usr/amd64-freebsd/usr/bin/ld: /usr/amd64-freebsd/lib/libbsdxml.so.4: invalid DSO for symbol `XML_SetUserData' definition /usr/amd64-freebsd/lib/libbsdxml.so.4: could not read symbols: Bad value cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [pkg] Error code 1 make[3]: stopped in /usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2.7/pkg 1 error make[3]: stopped in /usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2.7/pkg *** [all] Error code 2 make[2]: stopped in /usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2.7 1 error make[2]: stopped in /usr/local/poudriere/ports/default/ports-mgmt/pkg/work/pkg-1.2.7 =3D=3D=3D> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/local/poudriere/ports/default/ports-mgmt/pkg *** Error code 1 Stop. make: stopped in /usr/local/poudriere/ports/default/ports-mgmt/pkg