Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2012 10:48:11 -0500
From:      Richard Kuhns <rjk@wintek.com>
To:        freebsd-stable@freebsd.org
Cc:        mike.jakubik@intertainservices.com, dim@freebsd.org
Subject:   Re: Error compiling world (usr/src/gnu/usr.bin/texinfo) w/ Clang
Message-ID:  <509A82BB.7070108@wintek.com>
In-Reply-To: <509A73A8.2050602@FreeBSD.org>
References:  <1352242797.4156.3.camel@mjakubik.localdomain> <509A73A8.2050602@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/07/12 09:43, Dimitry Andric wrote:
> On 2012-11-06 23:59, Mike Jakubik wrote:>
>> I've ran in to this issue on two different machines, both have recent
>> stable code. The problem appears to be
>> with /usr/src/gnu/usr.bin/texinfo, i am using Clang to compile.
> ...
>> 1 error
>> *** Error code 2
>> 1 error
>> *** Error code 2
>> 1 error
> 
> The output you pasted looks like it was produced by a multi-threaded
> build, and the actual error was obscured.  Can you please retry this
> with a single-threaded build?
> 
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
> 

I'm not the original poster, but I've seen the same problem on 2 different
machines as well. I just finished a single-threaded buildworld; it dies building
boot2.

svn says I'm "At revision 242695."

The relevant portion of make.conf:

========
CC=clang
CXX=clang++
CPP=clang-cpp
# build world without -Werror
NO_WERROR=
#
CPUTYPE?=core2
WITH_OPTIMIZED_CFLAGS=yes
========

===> sys/boot/i386/boot2 (all)
objcopy -S -O binary boot1.out boot1
dd if=/dev/zero of=boot2.ldr bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.000021 secs (24403223 bytes/sec)
clang -Os  -fno-guess-branch-probability  -fomit-frame-pointer
-fno-unit-at-a-time  -mno-align-long-strings  -mrtd  -mregparm=3  -DUSE_XREAD
-DUFS1_AND_UFS2  -DFLAGS=0x80  -DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600
-I/usr/src/sys/boot/i386/boot2/../../common
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I.  -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align  -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
-Winline --param max-inline-insns-single=100  -mstack-alignment=8 -mllvm
-inline-threshold=3 -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret
-ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse
-mno-sse2 -mno-sse3 -msoft-float -m32 -march=i386 -std=gnu99 -Qunused-arguments
   -S -o boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c
clang: warning: the clang compiler does not support '-fno-unit-at-a-time'
In file included from /usr/src/sys/boot/i386/boot2/boot2.c:170:
/usr/src/sys/boot/i386/boot2/../../common/ufsread.c:233:17: warning: cast from
'char *' to
      'struct ufs1_dinode *' increases required alignment from 1 to 4 [-Wcast-align]
                        memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/boot/i386/boot2/../../common/ufsread.c:236:17: warning: cast from
'char *' to
      'struct ufs2_dinode *' increases required alignment from 1 to 4 [-Wcast-align]
                        memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n,
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/sys/boot/i386/boot2/boot2.c:222:1: warning: no previous prototype for
function 'main'
      [-Wmissing-prototypes]
main(void)
^
/usr/src/sys/boot/i386/boot2/boot2.c:353:4: warning: cast from 'caddr_t' (aka
'char *') to
      'Elf32_Word *' (aka 'unsigned int *') increases required alignment from 1
to 4 [-Wcast-align]
                *(Elf32_Word *)p = es[i].sh_size;
                 ^~~~~~~~~~~~~~~
/usr/src/sys/boot/i386/boot2/boot2.c:619:8: warning: cast from 'caddr_t' (aka
'char *') to 'uint32_t *'
      (aka 'unsigned int *') increases required alignment from 1 to 4 [-Wcast-align]
        t1 = *(uint32_t *)PTOV(0x46c);
              ^~~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s
rm -f boot2.s.tmp
clang  -m32 -c boot2.s
clang -Os  -fno-guess-branch-probability  -fomit-frame-pointer
-fno-unit-at-a-time  -mno-align-long-strings  -mrtd  -mregparm=3  -DUSE_XREAD
-DUFS1_AND_UFS2  -DFLAGS=0x80  -DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600
-I/usr/src/sys/boot/i386/boot2/../../common
-I/usr/src/sys/boot/i386/boot2/../btx/lib -I.  -Wall -Waggregate-return
-Wbad-function-cast -Wcast-align  -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings
-Winline --param max-inline-insns-single=100  -mstack-alignment=8 -mllvm
-inline-threshold=3 -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret
-ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse
-mno-sse2 -mno-sse3 -msoft-float -m32 -march=i386 -std=gnu99 -Qunused-arguments
    -m32 -c /usr/src/sys/boot/i386/boot2/sio.S
clang: warning: the clang compiler does not support '-fno-unit-at-a-time'
ld -static -N --gc-sections -nostdlib -m elf_i386_fbsd -Ttext 0x2000 -o
boot2.out /misc/obj/usr/src/sys/boot/i386/boot2/../btx/lib/crt0.o boot2.o sio.o
objcopy -S -O binary boot2.out boot2.bin
btxld -v -E 0x2000 -f bin -b
/misc/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr  -o boot2.ld
-P 1 boot2.bin
kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1
client: fmt=bin size=1575 text=0 data=0 bss=0 entry=0
output: fmt=bin size=1e05 text=200 data=1c05 org=0 entry=0
-5 bytes available
*** [boot2] Error code 1

Stop in /usr/src/sys/boot/i386/boot2.
*** [all] Error code 1

Stop in /usr/src/sys/boot/i386.
*** [all] Error code 1

Stop in /usr/src/sys/boot.
*** [all] Error code 1

Stop in /usr/src/sys.
*** [sys.all__D] Error code 1

Stop in /usr/src.
*** [everything] Error code 1

Stop in /usr/src.
*** [buildworld] Error code 1

Stop in /usr/src.

-- 
Richard Kuhns <rjk@wintek.com>     My Desk:          765-269-8541
Wintek Corporation                 Internet Support: 765-269-8503
427 N 6th Street STE C             Consulting:       765-269-8504
Lafayette, IN 47901-2211           Accounting:       765-269-8502



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509A82BB.7070108>