OS X

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

OS X

Post by bob » Tue Mar 22, 2016 8:43 pm

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..

MikeB
Posts: 2894
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: OS X

Post by MikeB » Tue Mar 22, 2016 11:12 pm

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?

bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: OS X

Post by bob » Wed Mar 23, 2016 2:25 am

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?

MikeB
Posts: 2894
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: OS X

Post by MikeB » Wed Mar 23, 2016 2:35 am

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

mvk
Posts: 589
Joined: Tue Jun 04, 2013 8:15 pm

Re: OS X

Post by mvk » Wed Mar 23, 2016 8:39 am

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
[Account deleted]

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 6:43 pm

Xcode bloat

Post by sje » Wed Mar 23, 2016 10:30 am

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.

MikeB
Posts: 2894
Joined: Thu Mar 09, 2006 5:34 am
Location: Pen Argyl, Pennsylvania

Re: Xcode bloat

Post by MikeB » Wed Mar 23, 2016 1:59 pm

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 ..

bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: OS X

Post by bob » Wed Mar 23, 2016 4:13 pm

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.

bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Xcode bloat

Post by bob » Wed Mar 23, 2016 4:15 pm

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...

bob
Posts: 20358
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Xcode bloat

Post by bob » Wed Mar 23, 2016 4:42 pm

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...

Post Reply