Re: Clang error make buildworld

From: Olivier Smedts <olivier_at_gid0.org>
Date: Thu, 5 May 2011 15:46:21 +0200
2011/5/5 O. Hartmann <ohartman_at_zedat.fu-berlin.de>:
> On 05/04/11 16:20, Dimitry Andric wrote:
>>
>> On 2011-05-04 15:44, Manfred Antar wrote:
>> ...
>>>
>>> src.conf:
>>>
>>> WITHOUT_DYNAMICROOT=yes
>>> WITH_IDEA=yes
>>> .if !defined(CC) || ${CC} == "cc"
>>> CC=clang
>>> .endif
>>> .if !defined(CXX) || ${CXX} == "c++"
>>> CXX=clang++
>>> .endif
>>> #Don't die on warnings
>>> NO_WERROR=
>>> WERROR=
>>
>> Aha. Please move the clang-related stuff to make.conf instead, e.g.
>> this fragment:
>>
>> .if !defined(CC) || ${CC} == "cc"
>> CC=clang
>> .endif
>> .if !defined(CXX) || ${CXX} == "c++"
>> CXX=clang++
>> .endif
>> #Don't die on warnings
>> NO_WERROR=
>> WERROR=
>>
>
>
> On a notebook (DELL Latitude E6510) I tried compiling world with CLANG. So
> far, so good. It worked. But after rebooting I got a strange misbehaviour of
> the xdm login window (black/white instead of coloured), but this was only
> some superficial symptome. The whole system seems to be corrupted. Hitting
> tab key results like hitting exit in the console. The gcc 4.2.1 system
> compiler isn't capable of producing binaries, see message below. At this
> very moment, the box isn't usable anymore, I can't even compile a world with
> cc (see error below, that was generated by trying to compile a kernel and
> I'm really confused why cc is used instead of clang).
>
> Well, the boxes I reported errors from prior to this are desktop systems
> with nVidia (Fermi based) graphics boards using a driver BLOB 270.XX.XX
> which is also used by the notebook.
>
> The desktop boxes uses C2D based intel chips, the notebook uses a Core-i5
> based chip. All systems got compiled with option
>
> CPUTYPE?=native

Can you try without CPUTYPE "native", or with another value ?
"native" is not a supported value in /usr/share/mk/bsd.cpu.mk

With gcc I used :
CPUTYPE?=core2
CFLAGS=-O2 -pipe -march=native
NO_CPU_CFLAGS=yes
COPTFLAGS=-O2 -pipe -march=native
NO_CPU_COPTFLAGS=yes

So that /usr/share/mk/bsd.cpu.mk could set the right variables and I
could set my own "-march" value in CFLAGS for gcc.

But now for HEAD (which has a newer gcc and clang) I use :
CPUTYPE?=core2
CFLAGS=-O2 -pipe -march=core2
NO_CPU_CFLAGS=yes
COPTFLAGS=-O2 -pipe -march=core2
NO_CPU_COPTFLAGS=yes

Because with clang, -march=native often breaks buildworld, while
-march=core2 is ok.

First, try to see if you buildworld is still broken with a different
(or empty!) make.conf.

> I guess the first compilation with CLANG "destroyed" the base' system
> compiler, at this moment I'm incapable of switching back. Floating like a
> dead man in the water.
>
>
> Any suggestions?
>
> Regards and thanks in advance,
> Oliver
> ---
> awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -h
> awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -d
> rpcgen -hM /usr/src/sys/kgssapi/gssd.x | grep -v pthread.h > gssd.h
> cc1: internal compiler error: Bus error: 10
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> rpcgen -c /usr/src/sys/kgssapi/gssd.x -o gssd_xdr.c
> cc1: internal compiler error: Bus error: 10
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> *** Error code 1
>
> Stop in /usr/obj/usr/src/sys/MUNIN.
> *** Error code 1
>
> Stop in /usr/src.
> *** Error code 1
>
> Stop in /usr/src.
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
>



-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: olivier_at_gid0.org        - against HTML email & vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  "Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas."
Received on Thu May 05 2011 - 11:46:23 UTC

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