No Gaviota EGTB probing for ChessGUI ?

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

No Gaviota EGTB probing for ChessGUI ?

Post by Matthias Gemuh »

GAVIOTA32TB.LIB contains invalid OMF record, type 0x21 (possibly COFF)

After many failed attempts to compile and link Gaviota EGTB probing into
ChessGUI, I now have to give up. ChessGUI compiler is Borland C++ Builder 5. Because Gaviota EGTB probing has very many source files (too many for my ChessGUI project), I compiled them into a static library using MS VC2008. However, the Borland compiler refuses to link this library into ChessGUI.
Linker Error: GAVIOTA32TB.LIB contains invalid OMF record, type 0x21 (possibly COFF).
I guess I will have to wait for Miguel (or someone else) to provide Gaviota EGTB probing as a DLL or a static library.

Matthias.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
User avatar
michiguel
Posts: 6401
Joined: Thu Mar 09, 2006 8:30 pm
Location: Chicago, Illinois, USA

Re: No Gaviota EGTB probing for ChessGUI ?

Post by michiguel »

Matthias Gemuh wrote:GAVIOTA32TB.LIB contains invalid OMF record, type 0x21 (possibly COFF)

After many failed attempts to compile and link Gaviota EGTB probing into
ChessGUI, I now have to give up. ChessGUI compiler is Borland C++ Builder 5. Because Gaviota EGTB probing has very many source files (too many for my ChessGUI project), I compiled them into a static library using MS VC2008. However, the Borland compiler refuses to link this library into ChessGUI.
Linker Error: GAVIOTA32TB.LIB contains invalid OMF record, type 0x21 (possibly COFF).
I guess I will have to wait for Miguel (or someone else) to provide Gaviota EGTB probing as a DLL or a static library.

Matthias.
What is exactly the problem with having a given number of files for compilation? Is there a limit? Or the problem is of different nature? One possibility is to remove the support for all the alternative compression schemes. As long as compression scheme #4 is supported (the default), everything should be ok. I foresee that people will end up having only the set that occupies less space. Maybe I can provide a switch for only scheme 4 compilation. Would that help? that would cut down the number of files significantly.

Miguel
Aaron Becker
Posts: 292
Joined: Tue Jul 07, 2009 4:56 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Aaron Becker »

I created a 32 bit dll you can try; it's at http://charm.cs.uiuc.edu/~abecker/gtb.dll
I can't verify that it works because I don't have access to a Windows system right now, but it compiled cleanly at least.
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Matthias Gemuh »

michiguel wrote:
Matthias Gemuh wrote:GAVIOTA32TB.LIB contains invalid OMF record, type 0x21 (possibly COFF)

After many failed attempts to compile and link Gaviota EGTB probing into
ChessGUI, I now have to give up. ChessGUI compiler is Borland C++ Builder 5. Because Gaviota EGTB probing has very many source files (too many for my ChessGUI project), I compiled them into a static library using MS VC2008. However, the Borland compiler refuses to link this library into ChessGUI.
Linker Error: GAVIOTA32TB.LIB contains invalid OMF record, type 0x21 (possibly COFF).
I guess I will have to wait for Miguel (or someone else) to provide Gaviota EGTB probing as a DLL or a static library.

Matthias.
What is exactly the problem with having a given number of files for compilation? Is there a limit? Or the problem is of different nature? One possibility is to remove the support for all the alternative compression schemes. As long as compression scheme #4 is supported (the default), everything should be ok. I foresee that people will end up having only the set that occupies less space. Maybe I can provide a switch for only scheme 4 compilation. Would that help? that would cut down the number of files significantly.

Miguel
This "solution" fails also. Initial LIB is 508 kB big but resulting LIB file is only 2 kB small, with a bunch of unresolved externals.

Code: Select all

[Linker Error] [...]\NAME.LIB contains invalid OMF record, type 0x21 (possibly COFF)
The library is of the wrong type. Use coff2omf.exe, located in CBuilder/bin, to convert it to the correct type.

Example:

    * First copy the anyName.lib and coff2omf.exe to a temporary folder
    * Type:

coff2omf anyName.lib anyName.~lib
copy anyName.~lib anyName.lib

    * When prompted, do overwrite the old library file (keep a copy somewhere!!!).
    * Copy the anyName.lib to Cbuilder6/Lib (so it will be found without setting paths)
    * Delete the temporary folder.
There is no limit to number of files, but nobody is pleased to have more "foreign" files in one's own project than native files.
Nalimov comes with only 3 files for probing EGTB.

Matthias.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by jwes »

Borland and Microsoft .obj files are incompatible. You could use Borland to create a static library and link that to your project.
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Matthias Gemuh »

Aaron Becker wrote:I created a 32 bit dll you can try; it's at http://charm.cs.uiuc.edu/~abecker/gtb.dll
I can't verify that it works because I don't have access to a Windows system right now, but it compiled cleanly at least.
Thanks, Aaron.

I will try to figure out how to grab function adresses from the DLL.
Sometimes a small LIB file holds those adresses. Must find out where that LIB comes from. Without a LIB file, access is unbearably slow for a chess GUI during blitz/bullet games.

Matthias.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Matthias Gemuh »

jwes wrote:Borland and Microsoft .obj files are incompatible. You could use Borland to create a static library and link that to your project.
I will try that. Thanks.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
Aaron Becker
Posts: 292
Joined: Tue Jul 07, 2009 4:56 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Aaron Becker »

I believe the functions you need are LoadLibrary and GetProcAddress.
User avatar
Matthias Gemuh
Posts: 3245
Joined: Thu Mar 09, 2006 9:10 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Matthias Gemuh »

Aaron Becker wrote:I believe the functions you need are LoadLibrary and GetProcAddress.
That approach may be too slow.
I think those functions can be avoided, if the LIB I have generated (using IMPLIB.exe) from your DLL, is properly used.

Matthias.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de
Aaron Becker
Posts: 292
Joined: Tue Jul 07, 2009 4:56 am

Re: No Gaviota EGTB probing for ChessGUI ?

Post by Aaron Becker »

You only need to call those functions once to get a function pointer. Then you can use that pointer for the lifetime of your program. Calling them every time you want to call the function would definitely be slow.