Date: Fri, 18 Jul 2014 10:55:47 -0700 From: Sean Bruno <sbruno@ignoranthack.me> To: freebsd-arch@freebsd.org Subject: Re: Total confusion over toolchain/xdev behavior Message-ID: <1405706147.19254.17.camel@bruno> In-Reply-To: <1404688077.1059.115.camel@bruno> References: <1404688077.1059.115.camel@bruno>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1405706147.19254.17.camel>