Re: Doing it wrong: Building world with lang/clang-devel and lang/gcc49

From: Sean Bruno <sean_bruno_at_yahoo.com>
Date: Wed, 25 Sep 2013 09:04:19 -0700
On Tue, 2013-09-24 at 22:15 -0700, Sean Bruno wrote:
> On Sun, 2013-09-22 at 16:53 -0500, Brooks Davis wrote:
> > On Sat, Sep 21, 2013 at 03:42:16PM +0400, Lev Serebryakov wrote:
> > > Hello, Sean.
> > > You wrote 20 ???????????????? 2013 ??., 22:39:30:
> > > 
> > > SB> wow, that didn't work at all.  :-)
> > > 
> > > SB> I set these in make.conf:
> > > 
> > > SB> CC=/usr/local/bin/clang
> > > SB> C++=/usr/local/bin/clang++
> > > SB> CPP=/usr/local/bin/clang++
> > > 
> > > SB> It exploded pretty badly:
> > > 
> > > SB> http://people.freebsd.org/~sbruno/doingitwrong.txt
> > > 
> > > SB> Any reason that this shouldn't work?
> > > Try
> > > 
> > > XCC=/usr/local/bin/clang
> > > XCXX=/usr/local/bin/clang++
> > > XCPP=/usr/local/bin/clang++
> > > COMPILER_TYPE=clang
> > > 
> > >  It should work, at least, in theory.
> > 
> > You will likely also need -WITHOUT_FORMAT_EXTENSIONS.
> > 
> > -- Brooks
> 
> 
> Well, I've tried clang-devel, gcc46 and gcc49.  Each one yeilds
> different failures and I'm really just totally confused at this point.
> 
> I've set:
>        export XCC=/usr/local/bin/gcc49
>         export XCXX=/usr/local/bin/g++49
>         export XCPP=/usr/local/bin/g++49
>         export CC=/usr/local/bin/gcc49
>         export CXX=/usr/local/bin/g++49
>         export CPP=/usr/local/bin/g++49
>         export COMPILER_TYPE=gcc
> and
> 	export TARGET=mips
> 	export TARGET_ARCH=mips
> 	export SRCCONF=/dev/null
> 	export SRCROOT=/home/sbruno/bsd/fbsd_head
> 	export MAKEOBJDIRPREFIX=/var/tmp
> 	export DESTDIR=/mipsbuild/$TARGET_ARCH
> 	export KERNCONF=MALTA
> 
> 
> ==> usr.bin/dtc (obj,depend,all,install)
> --- obj ---
> /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/home/sbruno/bsd/fbsd_head/usr.bin/dtc created for /home/sbruno/bsd/fbsd_head/usr.bin/dtc
> --- .depend ---
> rm -f .depend
> CC='/usr/local/bin/gcc49' mkdep -f .depend -a
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include      /home/sbruno/bsd/fbsd_head/usr.bin/dtc/dtc.cc /home/sbruno/bsd/fbsd_head/usr.bin/dtc/input_buffer.cc /home/sbruno/bsd/fbsd_head/usr.bin/dtc/string.cc /home/sbruno/bsd/fbsd_head/usr.bin/dtc/dtb.cc /home/sbruno/bsd/fbsd_head/usr.bin/dtc/fdt.cc /home/sbruno/bsd/fbsd_head/usr.bin/dtc/checking.cc   
> echo
> dtc: /usr/lib/libc.a /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/lib/libegacy.a >> .depend
> echo dtc: /usr/lib/libstdc++.a >> .depend
> make[3]: /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/home/sbruno/bsd/fbsd_head/usr.bin/dtc/.depend, 347: ignoring stale .depend for /usr/lib/libstdc++.a
> --- dtc.o ---
> --- input_buffer.o ---
> --- string.o ---
> --- dtb.o ---
> --- fdt.o ---
> --- checking.o ---
> --- dtc.o ---
> /usr/local/bin/g++49 -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -c /home/sbruno/bsd/fbsd_head/usr.bin/dtc/dtc.cc
> --- input_buffer.o ---
> /usr/local/bin/g++49 -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -c /home/sbruno/bsd/fbsd_head/usr.bin/dtc/input_buffer.cc
> --- string.o ---
> /usr/local/bin/g++49 -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -c /home/sbruno/bsd/fbsd_head/usr.bin/dtc/string.cc
> --- dtb.o ---
> /usr/local/bin/g++49 -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -c /home/sbruno/bsd/fbsd_head/usr.bin/dtc/dtb.cc
> --- fdt.o ---
> /usr/local/bin/g++49 -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -c /home/sbruno/bsd/fbsd_head/usr.bin/dtc/fdt.cc
> --- checking.o ---
> /usr/local/bin/g++49 -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -c /home/sbruno/bsd/fbsd_head/usr.bin/dtc/checking.cc
> --- string.o ---
> In file included
> from /home/sbruno/bsd/fbsd_head/usr.bin/dtc/input_buffer.hh:35:0,
> 
> from /home/sbruno/bsd/fbsd_head/usr.bin/dtc/string.hh:35,
> 
> from /home/sbruno/bsd/fbsd_head/usr.bin/dtc/string.cc:33:
> /home/sbruno/bsd/fbsd_head/usr.bin/dtc/util.hh:53:21: error: 'uint8_t'
> was not declared in this scope
>  typedef std::vector<uint8_t> byte_buffer;
>                      ^
> /home/sbruno/bsd/fbsd_head/usr.bin/dtc/util.hh:53:28: error: template
> argument 1 is invalid
>  typedef std::vector<uint8_t> byte_buffer;
> 
> 
> 
> with gcc49 I get even more peculiar behavior:
> 
> ===> gnu/usr.bin/gperf/doc (depend)
> make[3]: /var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/home/sbruno/bsd/fbsd_head/gnu/usr.bin/gperf/.depend, 145: ignoring stale .depend for /usr/lib/libstdc++.a
> --- gperf ---
> /usr/local/bin/clang++ -O2 -pipe
> -I/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/include
> -I/home/sbruno/bsd/fbsd_head/gnu/usr.bin/gperf/../../../contrib/gperf/lib -I/home/sbruno/bsd/fbsd_head/gnu/usr.bin/gperf  -static -L/var/tmp/mips.mips/home/sbruno/bsd/fbsd_head/tmp/legacy/usr/lib -o gperf bool-array.o hash-table.o input.o keyword-list.o keyword.o main.o options.o output.o positions.o search.o version.o getline.o hash.o -legacy
> /usr/local/bin/ld: cannot find -lstdc++
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> *** [gperf] Error code 1
> 
> 


ok, completely giving up on any hope of externally cross compiling a
different $arch I swtiched back to see if I could muddle through and get
amd64 to compile ON amd64 with lang/gcc49

did this http://www.freebsd.org/doc/en/articles/custom-gcc/article.html

Fails here:

===> lib/libproc (all)
make[5]: /usr/obj/home/sbruno/bsd/head/lib/libproc/.depend, 187:
ignoring stale .depend
for /usr/obj/home/sbruno/bsd/head/tmp/usr/lib/libstdc++.a
/usr/bin/ld: cannot find -lsupc++
cc: error: linker command failed with exit code 1 (use -v to see
invocation)
--- libproc.so.2 ---
*** [libproc.so.2] Error code 1

make[5]: stopped in /home/sbruno/bsd/head/lib/libproc


No idea what to do next.  I assume that this has worked in the past for
someone?

Received on Wed Sep 25 2013 - 14:04:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:42 UTC