Re: Clang as default compiler

2012-09-20 Thread Roland Smith
On Wed, Sep 19, 2012 at 02:13:41PM -0400, Gary Palmer wrote:
> > 
> > Rxvt-unicode seemed to crash reliably whenever I was scrolling through a
> > document with less(1). If I reached the end of the document, and pressed 
> > Page
> > Down (keysim Next), it would crash. It was quite weird. 
> > 
> 
> That sounds like the bell was doing it.  If you do CTRL-G (or something
> else that makes a beep) from the shell prompt in rxvt-unicode does it
> also crash?

Now there's an idea. Now that you mention it, I don't recall hearing the bell
at that time. I'll recompile with clang and test it over the weekend.

Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpE6FRUera6D.pgp
Description: PGP signature


Re: Clang as default compiler

2012-09-19 Thread Gary Palmer
On Wed, Sep 19, 2012 at 07:12:50PM +0200, Roland Smith wrote:
> On Tue, Sep 18, 2012 at 12:02:20AM +0200, Dimitry Andric wrote:
> > On 2012-09-17 21:43, Roland Smith wrote:
> > > On Wed, Sep 12, 2012 at 01:04:20AM -0500, Mark Linimon wrote:
> > ...
> > >> For most of the failures, we are already aware of them, as a result of
> > >> our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
> > >> really help us all that much.
> > >
> > > Those are build failures. What about crashes? E.g. I've recently had
> > > crashes with x11-wm/i3 and x11/rxvt-unicode. Both problems disappeared 
> > > after
> > > recompiling them with gcc46.
> > 
> > We can't figure them all out without *your* help. :-)  Please attempt to
> > run the program in a debugger, gather core dumps, etc.  Or at least, try
> > to make it into a reproducible case, so somebody else can attempt to
> > diagnose it.  And please specify the exact version of clang you used.
> 
> I was using the clang that is in base in 9.0-RELEASE-p3:
> 
> FreeBSD clang version 3.0 (branches/release_30 142614) 20111021
> Target: x86_64-unknown-freebsd9.0
> Thread model: posix
> 
> I was thinking of installing the most recent clang-devel since it seemed to
> have a lot of improvements, but I was wondering what is the correct way of
> makeing sure that it is used in preference to the one in base? I thought about
> moving /usr/local/bin before /usr/bin in $PATH, but I'm not sure that is a
> good idea.
> 
> > Now, most of the time this is because programs contain bugs, or
> > undefined behavior, which happens to go unnoticed with gcc, for example
> > because it optimized by accident in such a way to mask the bug.  In a
> > few other cases, real clang bugs are found, and most of the time, those
> > can be fixed quickly.
> > 
> > That said, in these cases specifically, how do the applications crash?
> > Right at startup, or after specific inputs or user actions?
> 
> Rxvt-unicode seemed to crash reliably whenever I was scrolling through a
> document with less(1). If I reached the end of the document, and pressed Page
> Down (keysim Next), it would crash. It was quite weird. 
> 

That sounds like the bell was doing it.  If you do CTRL-G (or something
else that makes a beep) from the shell prompt in rxvt-unicode does it
also crash?

Regards,

Gary
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-19 Thread Roland Smith
On Tue, Sep 18, 2012 at 12:02:20AM +0200, Dimitry Andric wrote:
> On 2012-09-17 21:43, Roland Smith wrote:
> > On Wed, Sep 12, 2012 at 01:04:20AM -0500, Mark Linimon wrote:
> ...
> >> For most of the failures, we are already aware of them, as a result of
> >> our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
> >> really help us all that much.
> >
> > Those are build failures. What about crashes? E.g. I've recently had
> > crashes with x11-wm/i3 and x11/rxvt-unicode. Both problems disappeared after
> > recompiling them with gcc46.
> 
> We can't figure them all out without *your* help. :-)  Please attempt to
> run the program in a debugger, gather core dumps, etc.  Or at least, try
> to make it into a reproducible case, so somebody else can attempt to
> diagnose it.  And please specify the exact version of clang you used.

I was using the clang that is in base in 9.0-RELEASE-p3:

FreeBSD clang version 3.0 (branches/release_30 142614) 20111021
Target: x86_64-unknown-freebsd9.0
Thread model: posix

I was thinking of installing the most recent clang-devel since it seemed to
have a lot of improvements, but I was wondering what is the correct way of
makeing sure that it is used in preference to the one in base? I thought about
moving /usr/local/bin before /usr/bin in $PATH, but I'm not sure that is a
good idea.

> Now, most of the time this is because programs contain bugs, or
> undefined behavior, which happens to go unnoticed with gcc, for example
> because it optimized by accident in such a way to mask the bug.  In a
> few other cases, real clang bugs are found, and most of the time, those
> can be fixed quickly.
> 
> That said, in these cases specifically, how do the applications crash?
> Right at startup, or after specific inputs or user actions?

Rxvt-unicode seemed to crash reliably whenever I was scrolling through a
document with less(1). If I reached the end of the document, and pressed Page
Down (keysim Next), it would crash. It was quite weird. 

I couldn't pinpoint a concrete action that crashed x11-wm/i3.

Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpujqeF2YDzn.pgp
Description: PGP signature


Re: Clang as default compiler

2012-09-18 Thread Jakub Lach
Could you elaborate?

After setting WITHOUT_GCC I don't have
installed gcc/++  so it looks like it's working.




--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/Clang-as-default-compiler-tp5742836p5744598.html
Sent from the freebsd-stable mailing list archive at Nabble.com.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-17 Thread Dimitry Andric

On 2012-09-17 21:43, Roland Smith wrote:

On Wed, Sep 12, 2012 at 01:04:20AM -0500, Mark Linimon wrote:

...

For most of the failures, we are already aware of them, as a result of
our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
really help us all that much.


Those are build failures. What about crashes? E.g. I've recently had
crashes with x11-wm/i3 and x11/rxvt-unicode. Both problems disappeared after
recompiling them with gcc46.


We can't figure them all out without *your* help. :-)  Please attempt to
run the program in a debugger, gather core dumps, etc.  Or at least, try
to make it into a reproducible case, so somebody else can attempt to
diagnose it.  And please specify the exact version of clang you used.

Now, most of the time this is because programs contain bugs, or
undefined behavior, which happens to go unnoticed with gcc, for example
because it optimized by accident in such a way to mask the bug.  In a
few other cases, real clang bugs are found, and most of the time, those
can be fixed quickly.

That said, in these cases specifically, how do the applications crash?
Right at startup, or after specific inputs or user actions?
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-17 Thread Roland Smith
On Wed, Sep 12, 2012 at 01:04:20AM -0500, Mark Linimon wrote:
> On Tue, Sep 11, 2012 at 11:49:24PM +0200, Andreas Nilsson wrote:
> > Is there a specif PR to use for ports that fails with clang and does
> > not specify to use gcc ( > devel/cdecl and deskutils/calibre so were
> > the culprits so far)
> 
> There is no specific PR.  We have not yet placed the requirement on our
> ports maintainers to deal with clang.
> 
> For most of the failures, we are already aware of them, as a result of
> our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
> really help us all that much.

Those are build failures. What about crashes? E.g. I've recently had
crashes with x11-wm/i3 and x11/rxvt-unicode. Both problems disappeared after
recompiling them with gcc46. 

Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpI9WK6wuK68.pgp
Description: PGP signature


Re: Clang as default compiler

2012-09-12 Thread Volodymyr Kostyrko

12.09.2012 00:49, Andreas Nilsson wrote:

On another clang note: Is there a page specifying valid settings for
-march, my google-foo is failing me. Ie, I'm looking for the equivalent of
http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options


I'm using the minimum of:

   : | gcc -E -v -march=native -
   : | clang -E -v -march=native -

because there are number of ports that still doesn't compile with clang 
or GCC4.6.



After successful install I went on to upgrade some ports. Is there a specif
PR to use for ports that fails with clang and does not specify to use gcc (
devel/cdecl and deskutils/calibre so were the culprits so far)


It's up to you to fix this ports and submit patches. You can always 
rollback to using GCC.


--
Sphinx of black quartz judge my vow.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-12 Thread Andreas Nilsson
>
>
> > in src.conf. No problem so far. However I wanted to avoid building base
> gcc
> > ( the whole collection ). Is  WITHOUT_GCC what I'm looking for?
> >
>
> It probably is. However, WITHOUT_GCC is not supported yet.
>
> > On another clang note: Is there a page specifying valid settings for
> > -march, my google-foo is failing me. Ie, I'm looking for the equivalent
> of
> >
> http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/i386-and-x86_002d64-Options.htm
> > l#i386-and-x86_002d64-Options
> >
>
> Take a look at lines 120 and below of contrib/llvm/lib/Target/X86/X86.td in
> the FreeBSD source directory for supported march switches.
>

 >There is no specific PR.  We have not yet placed the requirement on our
 >ports maintainers to deal with clang.

Is there a time frame for this requirement?

And for the know broken ports, how are the users supposed to deal with them
until the ports is fixed? Modifying the port by hand in the local ports
tree?

Best regards
Andreas
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-12 Thread Mark Linimon
On Wed, Sep 12, 2012 at 11:54:51AM +0300, Alexander Yerenkow wrote:
> How about run automated test on two poudriere setups, one with CLANG set
> up, other with USE_GCC=4.2 applied to all ports which marked as broken,

We have been running various tests for quite some time.

> Is there somewhere list of these clang-failing ports?

http://wiki.freebsd.org/PortsAndClang .  I have been maintaing and
updating this for over a year now.

mcl
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-12 Thread Alexander Yerenkow
How about run automated test on two poudriere setups, one with CLANG set
up, other with USE_GCC=4.2 applied to all ports which marked as broken,
and find in pretty long but relatively easy way ports which should have
USE_GCC=4.2 to survive clang-era, and ports which even with that require a
bit more love?

Is there somewhere list of these clang-failing ports? I think some mass
testing could be organized by little efforts.

-- 
Regards,
Alexander Yerenkow
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-12 Thread Mark Linimon
On Wed, Sep 12, 2012 at 08:00:46AM +0100, Chris Rees wrote:
> We don't want thousands of PRs duplicating the information from a simple
> list of failures.

Thanks, that was the point I was trying to make.

mcl
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-12 Thread Chris Rees
On 12 Sep 2012 07:19, "Christer Solskogen" 
wrote:
>
> On Wed, Sep 12, 2012 at 8:04 AM, Mark Linimon 
wrote:
>
> > For most of the failures, we are already aware of them, as a result of
> > our periodic runs.  So, just filing a PR to say "broken on clang"
doesn't
> > really help us all that much.
> >
>
> I disagree. Just a tiny bit ;-)
> If the PR says that USE_GCC=4.2 works as a workaround, it helps.

We don't want thousands of PRs duplicating the information from a simple
list of failures.

Any can be fixed in this way.

Chris
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-11 Thread Christer Solskogen
On Wed, Sep 12, 2012 at 8:04 AM, Mark Linimon  wrote:

> For most of the failures, we are already aware of them, as a result of
> our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
> really help us all that much.
>

I disagree. Just a tiny bit ;-)
If the PR says that USE_GCC=4.2 works as a workaround, it helps.

-- 
chs,
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-11 Thread Mark Linimon
On Tue, Sep 11, 2012 at 11:49:24PM +0200, Andreas Nilsson wrote:
> Is there a specif PR to use for ports that fails with clang and does
> not specify to use gcc ( > devel/cdecl and deskutils/calibre so were
> the culprits so far)

There is no specific PR.  We have not yet placed the requirement on our
ports maintainers to deal with clang.

For most of the failures, we are already aware of them, as a result of
our periodic runs.  So, just filing a PR to say "broken on clang" doesn't
really help us all that much.

mcl
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Clang as default compiler

2012-09-11 Thread Schaich Alonso
On 2012-09-11 (Tuesday) 23:49:24 Andreas Nilsson wrote:
> Today I decided to take the plunge and make clang the default compiler, ie
> I set
> 
> WITH_CLANG=yes
> WITH_CLANG_IS_CC=yes
> WITH_CLANG_EXTRAS=yes
> 
> in src.conf. No problem so far. However I wanted to avoid building base gcc
> ( the whole collection ). Is  WITHOUT_GCC what I'm looking for?
> 

It probably is. However, WITHOUT_GCC is not supported yet.

> On another clang note: Is there a page specifying valid settings for
> -march, my google-foo is failing me. Ie, I'm looking for the equivalent of
> http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/i386-and-x86_002d64-Options.htm
> l#i386-and-x86_002d64-Options
> 

Take a look at lines 120 and below of contrib/llvm/lib/Target/X86/X86.td in 
the FreeBSD source directory for supported march switches.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Clang as default compiler

2012-09-11 Thread Andreas Nilsson
Today I decided to take the plunge and make clang the default compiler, ie
I set

WITH_CLANG=yes
WITH_CLANG_IS_CC=yes
WITH_CLANG_EXTRAS=yes

in src.conf. No problem so far. However I wanted to avoid building base gcc
( the whole collection ). Is  WITHOUT_GCC what I'm looking for?

On another clang note: Is there a page specifying valid settings for
-march, my google-foo is failing me. Ie, I'm looking for the equivalent of
http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

After successful install I went on to upgrade some ports. Is there a specif
PR to use for ports that fails with clang and does not specify to use gcc (
devel/cdecl and deskutils/calibre so were the culprits so far)

Best regards
Andreas
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"