How to compile from Source Codes and the Tools

General discussion about computer chess...
User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: How to compile from Source Codes and the Tools

Post by Uly » Mon Jan 31, 2011 12:04 pm

Thanks, I see MinGW was already suggested in this thread, I'll check them.

User avatar
Bo Persson
Posts: 14
Joined: Thu Jun 10, 2010 10:34 am
Real Name: Bo Persson
Location: Malmö, Sweden

Re: How to compile from Source Codes and the Tools

Post by Bo Persson » Tue Feb 01, 2011 6:24 pm

Ron Murawski wrote:
Uly wrote: I recall I used some small program for my custom TSCP compiles, but I don't remember what since it was several years ago.
One of these maybe?


MinGW-w64 -- a 32/64-bit Build and Development Environment for Windows (CygWin) with minimal toolchain. No GUI IDE. Open-source. Contains GCC
http://sourceforge.net/projects/mingw-w64/

Open Watcom -- Open Watcom 32/64-bit C/C++ compiler with IDE + tools for Windows. Open-source.
http://www.openwatcom.org/

MinGW -- 32-bit builds for Windows. No GUI IDE. Open-source. Contains GCC
http://www.mingw.org/

Digital Mars -- C/C++ and D 32-bit compilers for Windows. Free. Some Free GUI IDEs support the D language.
http://www.digitalmars.com/

LCC-Win32 -- LCC C compiler with IDE + tools for Windows. Free.
http://www.cs.virginia.edu/~lcc-win32/


Ron
That would be experimental 64-bit support at best.

If you want native 64-bit programs for Windows, Visual Studio is the way to go. If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: How to compile from Source Codes and the Tools

Post by Prima » Tue Feb 01, 2011 9:59 pm

Bo Persson wrote:That would be experimental 64-bit support at best.

If you want native 64-bit programs for Windows, Visual Studio is the way to go. If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?
Hi Bo Persson,

obviously you're adept with Windows and probably the best suitable compile to use it with. I currently have a 30-day trial Ms Visual Studio 2010 and I tried the PGO option which has these sub settings:
Instrument
Update
Optimize
Run Instrument/Optimise....
.

Any way, when I chose Instrument, it compiles but I get an error message asking for a pgort.dll when attempting to run the executive file. The error message is attached, if it helps. I've also atached my Microsoft Visual Studio 2010 builds. The PGOI build is the one giving me error when I run it.
What I'm I doing wrong here?
The Pgort.dll file found on the internet is not compatible with the MsVS2010-PGO-Instrument executive file build and gives me an error message.
Attachments
Stockfish-2.0.1PreserveAnalysis-G-MsVS2010PGO-x64.7z
Stockfish-2.0.1PreserveAnalysis-G-MsVS2010PGO-x64
(216.69 KiB) Downloaded 186 times
MsVS2010-PGO-Instrument-ErrorReport.PNG
PGO + Instrument-executive file error message from Visual Studio 2010 compile

Jeremy Bernstein
Site Admin
Posts: 1226
Joined: Wed Jun 09, 2010 7:49 am
Real Name: Jeremy Bernstein
Location: Berlin, Germany
Contact:

Re: How to compile from Source Codes and the Tools

Post by Jeremy Bernstein » Tue Feb 01, 2011 10:04 pm

Prima wrote:
Bo Persson wrote:That would be experimental 64-bit support at best.

If you want native 64-bit programs for Windows, Visual Studio is the way to go. If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?
Hi Bo Persson,

obviously you're adept with Windows and probably the best suitable compile to use it with. I currently have a 30-day trial Ms Visual Studio 2010 and I tried the PGO option which has these sub settings:
Instrument
Update
Optimize
Run Instrument/Optimise....
.

Any way, when I chose Instrument, it compiles but I get an error message asking for a pgort.dll when attempting to run the executive file. The error message is attached, if it helps. I've also atached my Microsoft Visual Studio 2010 builds. The PGOI build is the one giving me error when I run it.
What I'm I doing wrong here?
The Pgort.dll file found on the internet is not compatible with the MsVS2010-PGO-Instrument executive file build and gives me an error message.
PGO doesn't work, except in the most expensive (Enterprise? not sure what they call it now) version of VS.NET. I have the Standard paid edition (several hundred Euro) of VS2008 and I was pretty ticked that it's not included.

Jeremy

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: How to compile from Source Codes and the Tools

Post by Prima » Tue Feb 01, 2011 10:06 pm

Here's my compile fo Stockfish 2.0.1Preserve Analysis with PGO compile. The executive file with the PGOI is the one compiled with PGO->Instrument that gives error, asking for Pgort.dll.
Attachments
Stockfish-2.0.1PreserveAnalysis-G-MsVS2010PGO-x64.7z
Stockfish-2.0.1PreserveAnalysis-MsVS2010PGO-x64
(216.69 KiB) Downloaded 177 times
Last edited by Prima on Tue Feb 01, 2011 10:09 pm, edited 1 time in total.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: How to compile from Source Codes and the Tools

Post by Prima » Tue Feb 01, 2011 10:08 pm

Jeremy Bernstein wrote:
Prima wrote:
Bo Persson wrote:That would be experimental 64-bit support at best.

If you want native 64-bit programs for Windows, Visual Studio is the way to go. If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?
Hi Bo Persson,

obviously you're adept with Windows and probably the best suitable compile to use it with. I currently have a 30-day trial Ms Visual Studio 2010 and I tried the PGO option which has these sub settings:
Instrument
Update
Optimize
Run Instrument/Optimise....
.

Any way, when I chose Instrument, it compiles but I get an error message asking for a pgort.dll when attempting to run the executive file. The error message is attached, if it helps. I've also atached my Microsoft Visual Studio 2010 builds. The PGOI build is the one giving me error when I run it.
What I'm I doing wrong here?
The Pgort.dll file found on the internet is not compatible with the MsVS2010-PGO-Instrument executive file build and gives me an error message.
PGO doesn't work, except in the most expensive (Enterprise? not sure what they call it now) version of VS.NET. I have the Standard paid edition (several hundred Euro) of VS2008 and I was pretty ticked that it's not included.

Jeremy
Thanks Jeremy. This explains a lot! I thought I was NOT doing something right. The sad part is, a compatible pgort.dll is not found on the internet.

Ron Murawski
Posts: 11
Joined: Thu Jun 10, 2010 6:04 am

Re: How to compile from Source Codes and the Tools

Post by Ron Murawski » Tue Feb 01, 2011 10:28 pm

Bo Persson wrote:
Ron Murawski wrote:
Uly wrote: I recall I used some small program for my custom TSCP compiles, but I don't remember what since it was several years ago.
One of these maybe?


MinGW-w64 -- a 32/64-bit Build and Development Environment for Windows (CygWin) with minimal toolchain. No GUI IDE. Open-source. Contains GCC
http://sourceforge.net/projects/mingw-w64/

Open Watcom -- Open Watcom 32/64-bit C/C++ compiler with IDE + tools for Windows. Open-source.
http://www.openwatcom.org/

MinGW -- 32-bit builds for Windows. No GUI IDE. Open-source. Contains GCC
http://www.mingw.org/

Digital Mars -- C/C++ and D 32-bit compilers for Windows. Free. Some Free GUI IDEs support the D language.
http://www.digitalmars.com/

LCC-Win32 -- LCC C compiler with IDE + tools for Windows. Free.
http://www.cs.virginia.edu/~lcc-win32/


Ron
That would be experimental 64-bit support at best.

If you want native 64-bit programs for Windows, Visual Studio is the way to go. If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?
The days of considering MinGW-w64 as 'experimental' have passed. I don't claim
that there's no bugs, but it builds major programs like Gimp without trouble.

There are many open source, cross-platform C/C++ IDEs that are compiler
agnostic; Visual Studio is not. If you want to build 64-bit cross-platform
programs, a cross-platform IDE plus MinGW-w64 is the way to go.

(Possible cross-platform C/C++ IDE choices: Code::Blocks, CodeLite, NetBeans,
Geany, etc.)

I concede that Visual Studio builds faster binaries, but the perfomance gap
shrinks every year. At the moment using MinGW-w64 instead of Visual Studio to
build a chess program will cost you 10 Elo at most. For non-chess programs the
perfomance difference doesn't matter.

Ron

gaard
Posts: 127
Joined: Thu Jun 10, 2010 1:39 am
Real Name: Martin Wyngaarden
Location: Holland, Michigan

Re: How to compile from Source Codes and the Tools

Post by gaard » Tue Feb 01, 2011 11:09 pm

Prima wrote:
Jeremy Bernstein wrote:
Prima wrote:
Bo Persson wrote:That would be experimental 64-bit support at best.

If you want native 64-bit programs for Windows, Visual Studio is the way to go. If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?
Hi Bo Persson,

obviously you're adept with Windows and probably the best suitable compile to use it with. I currently have a 30-day trial Ms Visual Studio 2010 and I tried the PGO option which has these sub settings:
Instrument
Update
Optimize
Run Instrument/Optimise....
.

Any way, when I chose Instrument, it compiles but I get an error message asking for a pgort.dll when attempting to run the executive file. The error message is attached, if it helps. I've also atached my Microsoft Visual Studio 2010 builds. The PGOI build is the one giving me error when I run it.
What I'm I doing wrong here?
The Pgort.dll file found on the internet is not compatible with the MsVS2010-PGO-Instrument executive file build and gives me an error message.
PGO doesn't work, except in the most expensive (Enterprise? not sure what they call it now) version of VS.NET. I have the Standard paid edition (several hundred Euro) of VS2008 and I was pretty ticked that it's not included.

Jeremy
Thanks Jeremy. This explains a lot! I thought I was NOT doing something right. The sad part is, a compatible pgort.dll is not found on the internet.
http://dl.dropbox.com/u/11904592/pgort.zip

Here are pgort90 and pgort100. They should do the trick. There are 4 depending on if you are compiling for amd64 or x86 and for both VS2010 compilers or VS2008.

Both Ultimate and Professional editions of Visual Studio have the optimizing compiler. I thought the standard edition did as well. It is not always evident from the GUI however. Get a command and run "link". If you see the option /LTCG, then there should not be a problem.

On a side note, MS put out a free optimizing compiler some years ago in the MSVCPP Toolkit 2003. It's not fully compliant, however, but it does produce very fast binaries when it works.

Prima
Posts: 328
Joined: Tue Dec 14, 2010 6:12 am

Re: How to compile from Source Codes and the Tools

Post by Prima » Wed Feb 02, 2011 12:47 am

gaard wrote:http://dl.dropbox.com/u/11904592/pgort.zip

Here are pgort90 and pgort100. They should do the trick. There are 4 depending on if you are compiling for amd64 or x86 and for both VS2010 compilers or VS2008.

Both Ultimate and Professional editions of Visual Studio have the optimizing compiler. I thought the standard edition did as well. It is not always evident from the GUI however. Get a command and run "link". If you see the option /LTCG, then there should not be a problem.

On a side note, MS put out a free optimizing compiler some years ago in the MSVCPP Toolkit 2003. It's not fully compliant, however, but it does produce very fast binaries when it works.
Gaad, thanks for your consideration and help.

After installing your pgor90 & 100.dll (placed in c:\Windows\System32), I still get incompatible error report. I did notice a difference between the pgort100.dll and the pgort100.dll I got from the inter: yours is 34.8KB and mine is 100KB. Still got the same error though

Here's the exact message attached.
Attachments
NonCompatiblePgort100dll-ErrorReport.PNG
Non compatible Pgort100.dll error

User avatar
Uly
Posts: 838
Joined: Thu Jun 10, 2010 5:33 am

Re: How to compile from Source Codes and the Tools

Post by Uly » Wed Feb 02, 2011 4:42 am

Bo Persson wrote:If you have a machine with 64-bit Windows, you probably have at least hundreds of GBs of disk space. Why do you believe 7 GB is important?
I only have 5.5 GB free, so the option would be to free 2GB and then live on with only 500MB free...

Post Reply