Page 1 of 3

OS X

Posted: Tue Mar 22, 2016 9:43 pm
by bob
If you download the new Xcode 7.3 update you might end up with a problem. It will compile Crafty normally, but a profile-guided optimization crashes and burns during the first compile stage. I have submitted all the info to Apple. As of right now, on my MacBook, I can no longer do a PGO compile..

Re: OS X

Posted: Wed Mar 23, 2016 12:12 am
by MikeB
bob wrote:If you download the new Xcode 7.3 update you might end up with a problem. It will compile Crafty normally, but a profile-guided optimization crashes and burns during the first compile stage. I have submitted all the info to Apple. As of right now, on my MacBook, I can no longer do a PGO compile..
Saw this just in time. If this true with gcc as well or does it include both clang and gcc?

Re: OS X

Posted: Wed Mar 23, 2016 3:25 am
by bob
MikeB wrote:
bob wrote:If you download the new Xcode 7.3 update you might end up with a problem. It will compile Crafty normally, but a profile-guided optimization crashes and burns during the first compile stage. I have submitted all the info to Apple. As of right now, on my MacBook, I can no longer do a PGO compile..
Saw this just in time. If this true with gcc as well or does it include both clang and gcc?
Just clang. gcc is an independent compiler, which I would assume you have installed via macports?

Re: OS X

Posted: Wed Mar 23, 2016 3:35 am
by MikeB
bob wrote:
MikeB wrote:
bob wrote:If you download the new Xcode 7.3 update you might end up with a problem. It will compile Crafty normally, but a profile-guided optimization crashes and burns during the first compile stage. I have submitted all the info to Apple. As of right now, on my MacBook, I can no longer do a PGO compile..
Saw this just in time. If this true with gcc as well or does it include both clang and gcc?
Just clang. gcc is an independent compiler, which I would assume you have installed via macports?
Correct.. 4.8

Re: OS X

Posted: Wed Mar 23, 2016 9:39 am
by mvk
bob wrote:If you download the new Xcode 7.3 update you might end up with a problem. It will compile Crafty normally, but a profile-guided optimization crashes and burns during the first compile stage. I have submitted all the info to Apple. As of right now, on my MacBook, I can no longer do a PGO compile..
For info, I upgraded XCode last night and tested PGO (native clang, not gcc). Works ok here.

Code: Select all

floyd-pgo1: $(wildcard Source/*) Makefile versions.json
        $(CC) $(CFLAGS) -DNDEBUG -o $@ $(uciSources) $(LDFLAGS) -fprofile-instr-generate
        echo 'bench movetime 500 bestof 1' | ./$@ | grep result

floyd-pgo2: $(wildcard Source/*) Makefile versions.json floyd-pgo1
        xcrun llvm-profdata show default.profraw
        xcrun llvm-profdata merge -output=code.profdata default.profraw
        $(CC) $(CFLAGS) -DNDEBUG -o $@ $(uciSources) $(LDFLAGS) -fprofile-instr-use=code.profdata

Xcode bloat

Posted: Wed Mar 23, 2016 11:30 am
by sje
I don't use Xcode's PGO, and it's a wonder that it ever did work as Apple has little interest in optimization.

If Apple did have an interest in optimization, then it wouldn't have included gigabytes of crap in its Xcode distribution for its watches, phones, TV boxes, tablets, etc. I was watching the files being installed over the hour or so it took to update; included were things like different sized icons for Seattle area public transit stations.

Re: Xcode bloat

Posted: Wed Mar 23, 2016 2:59 pm
by MikeB
sje wrote:I don't use Xcode's PGO, and it's a wonder that it ever did work as Apple has little interest in optimization.

If Apple did have an interest in optimization, then it wouldn't have included gigabytes of crap in its Xcode distribution for its watches, phones, TV boxes, tablets, etc. I was watching the files being installed over the hour or so it took to update; included were things like different sized icons for Seattle area public transit stations.
LOL that is ridiculous ..

Re: OS X

Posted: Wed Mar 23, 2016 5:13 pm
by bob
mvk wrote:
bob wrote:If you download the new Xcode 7.3 update you might end up with a problem. It will compile Crafty normally, but a profile-guided optimization crashes and burns during the first compile stage. I have submitted all the info to Apple. As of right now, on my MacBook, I can no longer do a PGO compile..
For info, I upgraded XCode last night and tested PGO (native clang, not gcc). Works ok here.

Code: Select all

floyd-pgo1: $(wildcard Source/*) Makefile versions.json
        $(CC) $(CFLAGS) -DNDEBUG -o $@ $(uciSources) $(LDFLAGS) -fprofile-instr-generate
        echo 'bench movetime 500 bestof 1' | ./$@ | grep result

floyd-pgo2: $(wildcard Source/*) Makefile versions.json floyd-pgo1
        xcrun llvm-profdata show default.profraw
        xcrun llvm-profdata merge -output=code.profdata default.profraw
        $(CC) $(CFLAGS) -DNDEBUG -o $@ $(uciSources) $(LDFLAGS) -fprofile-instr-use=code.profdata
I now have about a half-dozen codes that cause the compiler itself to segfault, yet they compile just fine on Xcode 7.2. I have narrowed the problems down by compiling each source file of Crafty separately. Xcode 7.3 crashes when compiling either movgen.c or evaluate.c when using the profiler.

There are other issues with things like crt0.o and such. Yet another example of Apple's SQA or lack thereof.

Re: Xcode bloat

Posted: Wed Mar 23, 2016 5:15 pm
by bob
MikeB wrote:
sje wrote:I don't use Xcode's PGO, and it's a wonder that it ever did work as Apple has little interest in optimization.

If Apple did have an interest in optimization, then it wouldn't have included gigabytes of crap in its Xcode distribution for its watches, phones, TV boxes, tablets, etc. I was watching the files being installed over the hour or so it took to update; included were things like different sized icons for Seattle area public transit stations.
LOL that is ridiculous ..
I think I am giving up on Xcode and removing it. gcc works perfectly for me, produces faster/cleaner code, and doesn't try to support everything from frying pans to flyswatters...

Re: Xcode bloat

Posted: Wed Mar 23, 2016 5:42 pm
by bob
bob wrote:
MikeB wrote:
sje wrote:I don't use Xcode's PGO, and it's a wonder that it ever did work as Apple has little interest in optimization.

If Apple did have an interest in optimization, then it wouldn't have included gigabytes of crap in its Xcode distribution for its watches, phones, TV boxes, tablets, etc. I was watching the files being installed over the hour or so it took to update; included were things like different sized icons for Seattle area public transit stations.
LOL that is ridiculous ..
I think I am giving up on Xcode and removing it. gcc works perfectly for me, produces faster/cleaner code, and doesn't try to support everything from frying pans to flyswatters...
I've installed gcc 5.3 and it seems to work really well speed-wise. Significantly faster executable than that which clang produced, so I am back in business. Xcode is dead and buried here...